Selective LoRA Loader (SDXL)
Toggle SDXL's 13 blocks per LoRA
- model
- clip
- model
- clip
- info
SDXL is small enough - 13 blocks worth tracking - that block-level LoRA control is actually practical to reason about by hand, not just a novelty. This is the standalone loader half of that: a drop-in replacement for the normal LoRA loader with a toggle and strength slider on every block.
What it is and why you'd reach for it
This is the V1 selective loader for SDXL: load a LoRA, then switch off whichever of its 13 tracked blocks you don't want influencing the output. The pack's own node description states the intended workflow directly - run the separate "LoRA Loader + Analyzer" node on the LoRA first to see per-block impact scores, then come here and disable the low-scoring ones to cut unwanted bleed. It also names the two blocks worth remembering without an analyzer at all: output_1 is typically strongest for style and color, input_8/output_0 for composition.
It's one of 31 nodes in ShootTheSound/comfyUI-Realtime-Lora. If you'd rather have the analysis and the loading in a single node instead of wiring two together, the pack also ships a combined "SDXL Analyzer + Selective Loader V2" that does both at once - this V1 node is for when you want the analyzer feeding a loader you control separately.
How it works
Wire the analysis_json output from the LoRA Loader + Analyzer into this node's own analysis_json input and the block checkboxes color themselves by impact - blue for low, red for very high - so the highest-impact blocks are obvious at a glance instead of something you have to infer from a text report. Disabled blocks stay visible but dimmed rather than disappearing, so you can still see how much weight you turned off.
Inputs and outputs that matter
- model / clip - the standard SDXL pipeline pair; this is a normal-shaped LoRA loader that both get patched through.
- lora_name, strength - pick and global weight.
- preset - UNet Only, High Impact, Text Encoders Only, Decoders Only, Encoders Only, Style Focus, Composition Focus, Face Focus, or All Off/All Blocks, before you drop to Custom for hand-tuning.
- text_encoder_1, text_encoder_2, input_4, input_5, input_7, input_8, unet_mid, output_0 through output_5, plus other_weights - each with its own toggle and a -5 to 5 strength slider.
- lora_path_opt (optional) - a direct path input (useful straight from the pack's SDXL trainer node) that overrides the
lora_namedropdown when connected. - analysis_json (optional) - the input that switches on impact coloring.
- Outputs: model, clip (patched, feed to your sampler/text-encode nodes), info (a plain-text summary of what got applied).
Installing it
ComfyUI Manager: search "Realtime LoRA Trainer." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora
Restart ComfyUI. This works out of the box; no extra downloads or dependencies for loading and analyzing. Those only matter if you're using the pack's trainer nodes.
Troubleshooting
No colors on the checkboxes. They only light up once analysis_json is wired in from an analyzer node run on that same LoRA. Either add the LoRA Loader + Analyzer node upstream, or switch to the combined "SDXL Analyzer + Selective Loader V2" node that does both jobs at once and needs no separate wiring.
lora_name dropdown is empty. It only lists LoRAs already in your loras folder - feed a freshly trained one through lora_path_opt instead.
Disabled output_1 and the style barely moved. That block guide describes typical SDXL LoRA behavior, not every LoRA - some checkpoints, especially ones trained with unusual rank/alpha settings or as LoKR/LoHa, spread style weight differently. Check the actual analysis scores for that specific LoRA rather than assuming the general block guide applies.
Text encoder toggles seem to do nothing on an image-only change. text_encoder_1/text_encoder_2 affect the CLIP conditioning path, which mostly shows up in how well the prompt is followed rather than in visual style - if you're chasing a look, the UNet output blocks are usually where to look first.
Inputs (35)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_name | COMBO | SDXL LoRA file to load | |
| strength | FLOAT | 1.00-5–5 | Overall LoRA strength |
| preset | COMBO | All Blocks | Quick preset selection. Choose 'Custom' to use individual toggles below. |
| text_encoder_1 | BOOLEAN | true | — |
| text_encoder_1_str | FLOAT | 1.00-5–5 | — |
| text_encoder_2 | BOOLEAN | true | — |
| text_encoder_2_str | FLOAT | 1.00-5–5 | — |
| input_4 | BOOLEAN | true | — |
| input_4_str | FLOAT | 1.00-5–5 | — |
| input_5 | BOOLEAN | true | — |
| input_5_str | FLOAT | 1.00-5–5 | — |
| input_7 | BOOLEAN | true | — |
| input_7_str | FLOAT | 1.00-5–5 | — |
| input_8 | BOOLEAN | true | — |
| input_8_str | FLOAT | 1.00-5–5 | — |
| unet_mid | BOOLEAN | true | — |
| unet_mid_str | FLOAT | 1.00-5–5 | — |
| output_0 | BOOLEAN | true | — |
| output_0_str | FLOAT | 1.00-5–5 | — |
| output_1 | BOOLEAN | true | — |
| output_1_str | FLOAT | 1.00-5–5 | — |
| output_2 | BOOLEAN | true | — |
| output_2_str | FLOAT | 1.00-5–5 | — |
| output_3 | BOOLEAN | true | — |
| output_3_str | FLOAT | 1.00-5–5 | — |
| output_4 | BOOLEAN | true | — |
| output_4_str | FLOAT | 1.00-5–5 | — |
| output_5 | BOOLEAN | true | — |
| output_5_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 | — |