Selective LoRA Loader (Z-Image)
Turn individual layers on and off
- model
- clip
- model
- clip
- info
What it is
A normal LoRA loader gives you one strength slider for the whole adapter. This one gives you 30 - one per transformer layer in Z-Image, plus an "other weights" catch-all for anything outside the published layer list. It exists for a specific, common complaint: a Z-Image LoRA nails your subject's face but drags along style baggage you didn't ask for, or two LoRAs stacked together collapse into mush. Turning off the layers that aren't pulling their weight for your use case fixes both.
This is genuinely useful territory, not a gimmick. The pack's own author, testing this on his release thread, found that character likeness on Z-Image concentrates in the late layers - roughly 18 through 28 - while style tends to spread across the earlier layers and the "other weights" bucket. His own workaround: chain two of these loaders, each pointed at a different LoRA, and split the range - take style from LoRA A's early layers, identity from LoRA B's late ones. That's the move this node is built for.
How it works
A LoRA doesn't apply as one blob; it's a set of small weight deltas, one set per transformer layer (plus some miscellaneous weights that don't map cleanly to a layer index - the "other weights" bucket). This node loads the LoRA file, then lets you individually disable or reweight each layer's delta before it patches onto your model and CLIP. Feed in the optional analysis_json from LoRALoaderWithAnalysis and the checkboxes color themselves by measured impact - blue for low, red for very high - so you're not guessing which layers matter for the specific LoRA you loaded.
Inputs and outputs that matter
model,clip,lora_name- the standard trio any LoRA loader needs.strength- the global multiplier (-5 to 5) applied on top of whatever per-layer strengths you set.preset- a dropdown of ready-made layer selections: Late Only (20–29), Mid-Late (15–29), Skip Early (10–29), Peak Impact (18–25), Face Priority (16–24) and an Aggressive variant, Evens/Odds Only, and more. Given the author's own finding above, Late Only or Peak Impact is a reasonable first thing to try if a character LoRA is bleeding style it shouldn't.layer_0throughlayer_29, each paired with a_strstrength slider - toggle and reweight any individual layer.other_weights/other_weights_str- the catch-all for weights outside the numbered layers; the author notes some LoRAs concentrate real signal here, so don't ignore it if a layer-only edit isn't producing the effect you expect.- Optional
lora_path_optoverrides the dropdown with a direct file path - useful chained straight off a trainer node's output. Optionalanalysis_jsonenables the impact-colored checkboxes.
Outputs: model, clip (both patched, wire onward as usual), and info - a text summary of what got applied.
Installing it
This node works the moment the pack is installed - no external trainer backend required. ComfyUI Manager (search "Realtime LoRA Trainer") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora
Restart ComfyUI.
Common issues
Turning off a layer doesn't visibly change anything. Not every layer carries meaningful weight for every LoRA - run LoRA Loader + Analyzer first and feed its analysis_json in here, so the checkboxes tell you which layers are actually worth touching instead of clicking through all 30 blind.
LoRA looks weaker overall after disabling layers. Expected - you removed some of its total contribution. Compensate by raising strength or the remaining layers' individual _str sliders rather than assuming the LoRA itself got worse.
Style bleed persists even with early layers off. Check other_weights - some LoRAs (this shows up especially with LoKr-format Z-Image LoRAs, which the community has increasingly moved to for character work) park a surprising amount of signal outside the numbered layers, and that bucket needs its own toggle.
Inputs (69)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_name | COMBO | Z-Image LoRA file to load | |
| strength | FLOAT | 1.00-5–5 | Overall LoRA strength |
| preset | COMBO | All Layers | Quick preset selection. Choose 'Custom' to use individual toggles below. |
| layer_0 | BOOLEAN | true | — |
| layer_0_str | FLOAT | 1.00-5–5 | — |
| layer_1 | BOOLEAN | true | — |
| layer_1_str | FLOAT | 1.00-5–5 | — |
| layer_2 | BOOLEAN | true | — |
| layer_2_str | FLOAT | 1.00-5–5 | — |
| layer_3 | BOOLEAN | true | — |
| layer_3_str | FLOAT | 1.00-5–5 | — |
| layer_4 | BOOLEAN | true | — |
| layer_4_str | FLOAT | 1.00-5–5 | — |
| layer_5 | BOOLEAN | true | — |
| layer_5_str | FLOAT | 1.00-5–5 | — |
| layer_6 | BOOLEAN | true | — |
| layer_6_str | FLOAT | 1.00-5–5 | — |
| layer_7 | BOOLEAN | true | — |
| layer_7_str | FLOAT | 1.00-5–5 | — |
| layer_8 | BOOLEAN | true | — |
| layer_8_str | FLOAT | 1.00-5–5 | — |
| layer_9 | BOOLEAN | true | — |
| layer_9_str | FLOAT | 1.00-5–5 | — |
| layer_10 | BOOLEAN | true | — |
| layer_10_str | FLOAT | 1.00-5–5 | — |
| layer_11 | BOOLEAN | true | — |
| layer_11_str | FLOAT | 1.00-5–5 | — |
| layer_12 | BOOLEAN | true | — |
| layer_12_str | FLOAT | 1.00-5–5 | — |
| layer_13 | BOOLEAN | true | — |
| layer_13_str | FLOAT | 1.00-5–5 | — |
| layer_14 | BOOLEAN | true | — |
| layer_14_str | FLOAT | 1.00-5–5 | — |
| layer_15 | BOOLEAN | true | — |
| layer_15_str | FLOAT | 1.00-5–5 | — |
| layer_16 | BOOLEAN | true | — |
| layer_16_str | FLOAT | 1.00-5–5 | — |
| layer_17 | BOOLEAN | true | — |
| layer_17_str | FLOAT | 1.00-5–5 | — |
| layer_18 | BOOLEAN | true | — |
| layer_18_str | FLOAT | 1.00-5–5 | — |
| layer_19 | BOOLEAN | true | — |
| layer_19_str | FLOAT | 1.00-5–5 | — |
| layer_20 | BOOLEAN | true | — |
| layer_20_str | FLOAT | 1.00-5–5 | — |
| layer_21 | BOOLEAN | true | — |
| layer_21_str | FLOAT | 1.00-5–5 | — |
| layer_22 | BOOLEAN | true | — |
| layer_22_str | FLOAT | 1.00-5–5 | — |
| layer_23 | BOOLEAN | true | — |
| layer_23_str | FLOAT | 1.00-5–5 | — |
| layer_24 | BOOLEAN | true | — |
| layer_24_str | FLOAT | 1.00-5–5 | — |
| layer_25 | BOOLEAN | true | — |
| layer_25_str | FLOAT | 1.00-5–5 | — |
| layer_26 | BOOLEAN | true | — |
| layer_26_str | FLOAT | 1.00-5–5 | — |
| layer_27 | BOOLEAN | true | — |
| layer_27_str | FLOAT | 1.00-5–5 | — |
| layer_28 | BOOLEAN | true | — |
| layer_28_str | FLOAT | 1.00-5–5 | — |
| layer_29 | BOOLEAN | true | — |
| layer_29_str | FLOAT | 1.00-5–5 | — |
| other_weights | BOOLEAN | true | — |
| other_weights_str | FLOAT | 1.00-5–5 | — |
| lora_path_optopt | STRING | Optional: Connect from LoRA Analyzer to use its selected LoRA | |
| analysis_jsonopt | STRING | Optional: Connect from LoRA Analyzer for impact-colored checkboxes |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| info | STRING | — |