Nodes/Realtime LoRA Trainer/Qwen Analyzer + Selective Loader V2
ComfyUI Node

Qwen Analyzer + Selective Loader V2

Block-level control for Qwen-Image LoRAs

By shootthesound·Created 10 months ago·Updated 2 months ago· 568
Qwen Analyzer + Selective Loader V2
  • model
  • positive
  • negative
  • model
  • positive
  • negative
  • analysis
  • analysis_json
  • weights_output
◄lora_name▾►
◄strength1.00►
◄presetDefault►
◄block_0true►
◄block_0_str1.00►
◄block_1true►
◄block_1_str1.00►
◄block_2true►
◄block_2_str1.00►
◄block_3true►
◄block_3_str1.00►
◄block_4true►
◄block_4_str1.00►
◄block_5true►
◄block_5_str1.00►
◄block_6true►
◄block_6_str1.00►
◄block_7true►
◄block_7_str1.00►
◄block_8true►
◄block_8_str1.00►
◄block_9true►
◄block_9_str1.00►
◄block_10true►
◄block_10_str1.00►
◄block_11true►
◄block_11_str1.00►
◄block_12true►
◄block_12_str1.00►
◄block_13true►
◄block_13_str1.00►
◄block_14true►
◄block_14_str1.00►
◄block_15true►
◄block_15_str1.00►
◄block_16true►
◄block_16_str1.00►
◄block_17true►
◄block_17_str1.00►
◄block_18true►
◄block_18_str1.00►
◄block_19true►
◄block_19_str1.00►
◄block_20true►
◄block_20_str1.00►
◄block_21true►
◄block_21_str1.00►
◄block_22true►
◄block_22_str1.00►
◄block_23true►
◄block_23_str1.00►
◄block_24true►
◄block_24_str1.00►
◄block_25true►
◄block_25_str1.00►
◄block_26true►
◄block_26_str1.00►
◄block_27true►
◄block_27_str1.00►
◄block_28true►
◄block_28_str1.00►
◄block_29true►
◄block_29_str1.00►
◄block_30true►
◄block_30_str1.00►
◄block_31true►
◄block_31_str1.00►
◄block_32true►
◄block_32_str1.00►
◄block_33true►
◄block_33_str1.00►
◄block_34true►
◄block_34_str1.00►
◄block_35true►
◄block_35_str1.00►
◄block_36true►
◄block_36_str1.00►
◄block_37true►
◄block_37_str1.00►
◄block_38true►
◄block_38_str1.00►
◄block_39true►
◄block_39_str1.00►
◄block_40true►
◄block_40_str1.00►
◄block_41true►
◄block_41_str1.00►
◄block_42true►
◄block_42_str1.00►
◄block_43true►
◄block_43_str1.00►
◄block_44true►
◄block_44_str1.00►
◄block_45true►
◄block_45_str1.00►
◄block_46true►
◄block_46_str1.00►
◄block_47true►
◄block_47_str1.00►
◄block_48true►
◄block_48_str1.00►
◄block_49true►
◄block_49_str1.00►
◄block_50true►
◄block_50_str1.00►
◄block_51true►
◄block_51_str1.00►
◄block_52true►
◄block_52_str1.00►
◄block_53true►
◄block_53_str1.00►
◄block_54true►
◄block_54_str1.00►
◄block_55true►
◄block_55_str1.00►
◄block_56true►
◄block_56_str1.00►
◄block_57true►
◄block_57_str1.00►
◄block_58true►
◄block_58_str1.00►
◄block_59true►
◄block_59_str1.00►
◄other_weightstrue►
◄other_weights_str1.00►
◄lora_path_opt—►
◄schedule_presetCustom►
◄strength_schedule►
◄save_refined_lorafalse►
◄save_path►
◄save_filename►
◄block_weights_string►

If you've ever loaded a Qwen-Image LoRA and gotten 90% of what you wanted plus one thing you didn't - a face that's a little off, a background style that leaked in when you only wanted the subject - this node is how you go find out exactly which part of the LoRA is doing that, and turn just that part down.

What it is

Qwen-Image's DiT has 60 transformer blocks, and a LoRA doesn't touch them evenly. Some blocks carry almost all of a character's likeness; others are quietly nudging the whole image toward a color palette or a composition habit you never asked for. This node loads a Qwen LoRA, scores every one of those 60 blocks by how much weight the LoRA actually put into it (0-100%, based on weight magnitude), and gives you a toggle plus a strength slider for each one - live, in the same node, no separate analyzer step required. That's the "V2" part: earlier versions of this pack split analysis and selective loading into two nodes you had to wire together; this one does both.

It's part of a much bigger pack - ShootTheSound/comfyUI-Realtime-Lora, "Realtime LoRA Trainer," 31 nodes covering training, analysis, block editing, and model debiasing across eight architectures. The author is active enough on Reddit that bug reports from a Saturday post get fixed and pushed the same afternoon.

How it works

Blocks aren't labeled by function, but the pack groups Qwen's 60 into rough zones you can reason about: 0-14 early (structure gets set here), 15-29 early-mid, 30-44 mid-late, 45-59 late (fine detail territory). There's also an other_weights slider for anything the LoRA touches outside the numbered blocks - worth using. The pack author has posted community findings on Z-Image showing style weight concentrating almost entirely in that "other" bucket while character likeness sat in a narrow band of numbered layers; Qwen behaves the same way often enough that skipping that slider means you're not actually seeing the whole LoRA.

Connect the analysis_json output from a plain analyzer (or feed one lora_path in through the optional input) and the checkboxes color themselves by impact - blue for low, red for very high - so you can eyeball which blocks matter before you touch anything.

Inputs and outputs that matter

  • model / positive / negative - the base pipeline; this node patches all three because strength scheduling hooks through conditioning.
  • lora_name / strength - standard LoRA pick and global strength.
  • preset - quick zone presets (Late Only 45-59, Skip Early, Face-style groupings, etc.) instead of clicking 60 toggles by hand; set to Custom once you start hand-tuning.
  • block_0 through block_59, each with its own on/off and a -5 to 5 strength slider, plus other_weights.
  • strength_schedule (optional) - a step:strength list like 0:0,1:1 to fade the whole LoRA in or out over the generation, with 40+ named presets to pick from instead of typing your own curve.
  • save_refined_lora (optional) - export whatever block combination you landed on as its own .safetensors file, so you don't have to rebuild the same toggle state every session.
  • Outputs: model, positive, negative (patched, wire straight into your sampler), analysis (readable text breakdown), analysis_json (for chaining to other selective loaders).

Installing it

Search "Realtime LoRA Trainer" in ComfyUI Manager, or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora

Restart ComfyUI. This node needs nothing beyond that - no training backend, no extra Python packages. That requirement only kicks in for the pack's trainer nodes.

Troubleshooting

The lora_name dropdown is empty. It only lists files ComfyUI can already see in your loras folder - if you haven't dropped a Qwen-Image LoRA in there yet, or you're feeding a freshly trained one via the lora_path_opt string input instead, the dropdown having zero choices is expected, not broken.

Disabling blocks tanked the likeness instead of the style. A well-trained LoRA can genuinely spread its signal across most of the network; nuking half the blocks because they scored "medium" impact will cost you more than it fixes. Treat the color-coded impact as a starting hypothesis, not a rule - disable the lowest-scoring handful first, generate, and walk back up only if the problem persists.

Strength schedule doing nothing. The format is strict: step:strength pairs, comma-separated, steps expressed as a 0-1 fraction of the run - 0:0, 1:1 fades in, not 0,1:0,20 in raw step counts. Reach for the preset dropdown before hand-writing a curve; there are over 40 already built, including bell curves and step functions for exactly this.

Categoryloaders/lora

Inputs (135)

NameTypeDefaultDescription
modelMODEL—
positiveCONDITIONINGPositive conditioning from CLIP encode
negativeCONDITIONINGNegative conditioning from CLIP encode
lora_nameCOMBOLoRA file to load and analyze
strengthFLOAT1.00-10–10Overall LoRA strength (ignored when using schedule)
presetCOMBODefaultQuick preset selection. Individual toggles below override when changed.
block_0BOOLEANtrue—
block_0_strFLOAT1.00-5–5—
block_1BOOLEANtrue—
block_1_strFLOAT1.00-5–5—
block_2BOOLEANtrue—
block_2_strFLOAT1.00-5–5—
block_3BOOLEANtrue—
block_3_strFLOAT1.00-5–5—
block_4BOOLEANtrue—
block_4_strFLOAT1.00-5–5—
block_5BOOLEANtrue—
block_5_strFLOAT1.00-5–5—
block_6BOOLEANtrue—
block_6_strFLOAT1.00-5–5—
block_7BOOLEANtrue—
block_7_strFLOAT1.00-5–5—
block_8BOOLEANtrue—
block_8_strFLOAT1.00-5–5—
block_9BOOLEANtrue—
block_9_strFLOAT1.00-5–5—
block_10BOOLEANtrue—
block_10_strFLOAT1.00-5–5—
block_11BOOLEANtrue—
block_11_strFLOAT1.00-5–5—
block_12BOOLEANtrue—
block_12_strFLOAT1.00-5–5—
block_13BOOLEANtrue—
block_13_strFLOAT1.00-5–5—
block_14BOOLEANtrue—
block_14_strFLOAT1.00-5–5—
block_15BOOLEANtrue—
block_15_strFLOAT1.00-5–5—
block_16BOOLEANtrue—
block_16_strFLOAT1.00-5–5—
block_17BOOLEANtrue—
block_17_strFLOAT1.00-5–5—
block_18BOOLEANtrue—
block_18_strFLOAT1.00-5–5—
block_19BOOLEANtrue—
block_19_strFLOAT1.00-5–5—
block_20BOOLEANtrue—
block_20_strFLOAT1.00-5–5—
block_21BOOLEANtrue—
block_21_strFLOAT1.00-5–5—
block_22BOOLEANtrue—
block_22_strFLOAT1.00-5–5—
block_23BOOLEANtrue—
block_23_strFLOAT1.00-5–5—
block_24BOOLEANtrue—
block_24_strFLOAT1.00-5–5—
block_25BOOLEANtrue—
block_25_strFLOAT1.00-5–5—
block_26BOOLEANtrue—
block_26_strFLOAT1.00-5–5—
block_27BOOLEANtrue—
block_27_strFLOAT1.00-5–5—
block_28BOOLEANtrue—
block_28_strFLOAT1.00-5–5—
block_29BOOLEANtrue—
block_29_strFLOAT1.00-5–5—
block_30BOOLEANtrue—
block_30_strFLOAT1.00-5–5—
block_31BOOLEANtrue—
block_31_strFLOAT1.00-5–5—
block_32BOOLEANtrue—
block_32_strFLOAT1.00-5–5—
block_33BOOLEANtrue—
block_33_strFLOAT1.00-5–5—
block_34BOOLEANtrue—
block_34_strFLOAT1.00-5–5—
block_35BOOLEANtrue—
block_35_strFLOAT1.00-5–5—
block_36BOOLEANtrue—
block_36_strFLOAT1.00-5–5—
block_37BOOLEANtrue—
block_37_strFLOAT1.00-5–5—
block_38BOOLEANtrue—
block_38_strFLOAT1.00-5–5—
block_39BOOLEANtrue—
block_39_strFLOAT1.00-5–5—
block_40BOOLEANtrue—
block_40_strFLOAT1.00-5–5—
block_41BOOLEANtrue—
block_41_strFLOAT1.00-5–5—
block_42BOOLEANtrue—
block_42_strFLOAT1.00-5–5—
block_43BOOLEANtrue—
block_43_strFLOAT1.00-5–5—
block_44BOOLEANtrue—
block_44_strFLOAT1.00-5–5—
block_45BOOLEANtrue—
block_45_strFLOAT1.00-5–5—
block_46BOOLEANtrue—
block_46_strFLOAT1.00-5–5—
block_47BOOLEANtrue—
block_47_strFLOAT1.00-5–5—
block_48BOOLEANtrue—
block_48_strFLOAT1.00-5–5—
block_49BOOLEANtrue—
block_49_strFLOAT1.00-5–5—
block_50BOOLEANtrue—
block_50_strFLOAT1.00-5–5—
block_51BOOLEANtrue—
block_51_strFLOAT1.00-5–5—
block_52BOOLEANtrue—
block_52_strFLOAT1.00-5–5—
block_53BOOLEANtrue—
block_53_strFLOAT1.00-5–5—
block_54BOOLEANtrue—
block_54_strFLOAT1.00-5–5—
block_55BOOLEANtrue—
block_55_strFLOAT1.00-5–5—
block_56BOOLEANtrue—
block_56_strFLOAT1.00-5–5—
block_57BOOLEANtrue—
block_57_strFLOAT1.00-5–5—
block_58BOOLEANtrue—
block_58_strFLOAT1.00-5–5—
block_59BOOLEANtrue—
block_59_strFLOAT1.00-5–5—
other_weightsBOOLEANtrue—
other_weights_strFLOAT1.00-5–5—
lora_path_optoptSTRINGOptional: Override LoRA selection with a path
schedule_presetoptCOMBOCustomSelect a preset schedule (populates the text field below for editing)
strength_scheduleoptSTRINGStrength schedule: 0:.2,.5:.8,1:1.0 (step:strength pairs). Edit freely after selecting preset.
save_refined_loraoptBOOLEANfalseEnable to save the refined LoRA to disk
save_pathoptSTRINGDirectory to save refined LoRA
save_filenameoptSTRINGFilename for saved LoRA (timestamp auto-appended). Leave empty for auto-name.
block_weights_stringoptSTRINGInput/Output block profile string. Positional text syncs with the UI. String input overrides UI values.

Outputs (6)

NameTypeDescription
modelMODELModel with LoRA applied (filtered by enabled blocks).
positiveCONDITIONINGPositive conditioning (with hooks if using schedule).
negativeCONDITIONINGNegative conditioning (with hooks if using schedule).
analysisSTRINGPer-block analysis showing impact scores.
analysis_jsonSTRINGJSON analysis data for UI coloring.
weights_outputSTRINGBlock profile string output for chaining or reuse.