Nodes/Realtime LoRA Trainer/Selective LoRA Loader (SDXL)
ComfyUI Node

Selective LoRA Loader (SDXL)

Toggle SDXL's 13 blocks per LoRA

By shootthesound·Created 8 months ago·Updated 2 months ago· 538
Selective LoRA Loader (SDXL)
  • model
  • clip
  • model
  • clip
  • info
lora_name
strength1.00
presetAll Blocks
text_encoder_1true
text_encoder_1_str1.00
text_encoder_2true
text_encoder_2_str1.00
input_4true
input_4_str1.00
input_5true
input_5_str1.00
input_7true
input_7_str1.00
input_8true
input_8_str1.00
unet_midtrue
unet_mid_str1.00
output_0true
output_0_str1.00
output_1true
output_1_str1.00
output_2true
output_2_str1.00
output_3true
output_3_str1.00
output_4true
output_4_str1.00
output_5true
output_5_str1.00
other_weightstrue
other_weights_str1.00
lora_path_opt
analysis_json

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_name dropdown 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.

Categoryloaders/lora

Inputs (35)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBOSDXL LoRA file to load
strengthFLOAT1.00-5–5Overall LoRA strength
presetCOMBOAll BlocksQuick preset selection. Choose 'Custom' to use individual toggles below.
text_encoder_1BOOLEANtrue
text_encoder_1_strFLOAT1.00-5–5
text_encoder_2BOOLEANtrue
text_encoder_2_strFLOAT1.00-5–5
input_4BOOLEANtrue
input_4_strFLOAT1.00-5–5
input_5BOOLEANtrue
input_5_strFLOAT1.00-5–5
input_7BOOLEANtrue
input_7_strFLOAT1.00-5–5
input_8BOOLEANtrue
input_8_strFLOAT1.00-5–5
unet_midBOOLEANtrue
unet_mid_strFLOAT1.00-5–5
output_0BOOLEANtrue
output_0_strFLOAT1.00-5–5
output_1BOOLEANtrue
output_1_strFLOAT1.00-5–5
output_2BOOLEANtrue
output_2_strFLOAT1.00-5–5
output_3BOOLEANtrue
output_3_strFLOAT1.00-5–5
output_4BOOLEANtrue
output_4_strFLOAT1.00-5–5
output_5BOOLEANtrue
output_5_strFLOAT1.00-5–5
other_weightsBOOLEANtrue
other_weights_strFLOAT1.00-5–5
lora_path_optoptSTRINGOptional: Connect from LoRA Analyzer to use its selected LoRA
analysis_jsonoptSTRINGOptional: Connect from LoRA Analyzer for impact-colored checkboxes

Outputs (3)

NameTypeDescription
modelMODEL
clipCLIP
infoSTRING