ComfyUI Node
LoRA Layers Operation
Modify specific layers in a LoRA by zeroing them out (when scale=0) or scaling them (otherwise) based on pattern matching.
LoRA Layers Operation
- lora
- modified_lora
◄layer_pattern.*transformer_blocks\.(\d+)\.►
◄layer_indices59►
◄scale_factor1.00►
CategoryLoraUtils
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| lora | LORA | The LoRA state dictionary to modify. | |
| layer_pattern | STRING | .*transformer_blocks\.(\d+)\. | Regex pattern to match layer names. Use groups to extract layer indices. |
| layer_indices | STRING | 59 | Comma-separated list of layer indices to operate on, with support for ranges (e.g., '59', '10,11,12', or '50-53'). |
| scale_factor | FLOAT | 1.00-10–10 | Scale factor to apply. Use 0 to zero out layers. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| modified_lora | LORA | — |