DiT Block Lora Loader(DiTBlockLoraLoader)
This node reads the specified LoRA file and applies it to the model. Supports dynamic loading of multiple LoRA files with adjustable intensity.
Di T Block Lora Loader
The DiT Block Lora Loader node, technically, works by reading the specified LoRA file (supports `
The DiT Block Lora Loader is a node designed to load and apply LoRA (Low-Rank Adaptation) fine-tuning modules to a diffusion model. Its core function is to allow users to selectively inject LoRA weights into specific blocks of a DiT (Diffusion Transformer) model, enabling fine-grained control over the model's generation style or content at a relatively low computational cost.
Node Functionality
Technically, this node works by reading the specified LoRA file (supports .safetensors or .ckpt formats) and merging its weights with the corresponding parameters of the base diffusion model. Its core mechanism lies in supporting the selective application of LoRA to specific Transformer blocks within the DiT model. This means users can choose to affect only certain layers of the model rather than the entire model, providing the possibility for more precise style adjustments.
Node Parameter Description - DiT Block Lora Loader
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
model | MODEL | Yes | - | - | The diffusion model the LoRA will be applied to. |
lora_name | COMBO | No | - | - | lora_name (Input Parameter): Selects the name of the LoRA file to apply from the list of loaded LoRA files. |
blocks | SELECTEDDITBLOCKS | No | - | - | blocks (Input Parameter): Specifies the specific blocks within the DiT model where the LoRA weights should be applied, enabling selective fine-tuning. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
strength_model | FLOAT | Yes | 1.0 | -100.0 - 100.0 (Step: 0.01) | How strongly to modify the diffusion model. This value can be negative. |
opt_lora_path | STRING | No | - | - | Absolute path of the LoRA. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| model | MODEL | model (Output Parameter): Outputs the modified diffusion model with the applied LoRA weights. |
| rank | STRING | rank (Output Parameter): Outputs the possible rank information of the loaded LoRA, typically as a string. |
Usage Scenarios
In a specific workflow, you can connect this node after loading a base DiT model (such as the DiT backbone of Stable Diffusion 3). For example, when you want the generated images to have a specific artistic style (like "Van Gogh style") but only want this style to affect the high-level semantic structure of the image without altering its underlying composition, you can use this node and specify the specific modules where LoRA should be applied via the blocks parameter.
Notes
Please note that this node belongs to the experimental category, and its stability and compatibility may not be as robust as core nodes. Before use, ensure the LoRA file is compatible with the current DiT model architecture. Setting the strength_model parameter too high or too low may lead to unpredictable generation results.
DiT Block Lora Loader Node Source Code Link
The DiT Block Lora Loader node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.