Qwen Analyzer + Selective Loader V2
Block-level control for Qwen-Image LoRAs
- model
- positive
- negative
- model
- positive
- negative
- analysis
- analysis_json
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:strengthlist like0:0,1:1to 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
.safetensorsfile, 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.
Inputs (134)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | Positive conditioning from CLIP encode | |
| negative | CONDITIONING | Negative conditioning from CLIP encode | |
| lora_name | COMBO | LoRA file to load and analyze | |
| strength | FLOAT | 1.00-10–10 | Overall LoRA strength (ignored when using schedule) |
| preset | COMBO | Default | Quick preset selection. Individual toggles below override when changed. |
| block_0 | BOOLEAN | true | — |
| block_0_str | FLOAT | 1.00-5–5 | — |
| block_1 | BOOLEAN | true | — |
| block_1_str | FLOAT | 1.00-5–5 | — |
| block_2 | BOOLEAN | true | — |
| block_2_str | FLOAT | 1.00-5–5 | — |
| block_3 | BOOLEAN | true | — |
| block_3_str | FLOAT | 1.00-5–5 | — |
| block_4 | BOOLEAN | true | — |
| block_4_str | FLOAT | 1.00-5–5 | — |
| block_5 | BOOLEAN | true | — |
| block_5_str | FLOAT | 1.00-5–5 | — |
| block_6 | BOOLEAN | true | — |
| block_6_str | FLOAT | 1.00-5–5 | — |
| block_7 | BOOLEAN | true | — |
| block_7_str | FLOAT | 1.00-5–5 | — |
| block_8 | BOOLEAN | true | — |
| block_8_str | FLOAT | 1.00-5–5 | — |
| block_9 | BOOLEAN | true | — |
| block_9_str | FLOAT | 1.00-5–5 | — |
| block_10 | BOOLEAN | true | — |
| block_10_str | FLOAT | 1.00-5–5 | — |
| block_11 | BOOLEAN | true | — |
| block_11_str | FLOAT | 1.00-5–5 | — |
| block_12 | BOOLEAN | true | — |
| block_12_str | FLOAT | 1.00-5–5 | — |
| block_13 | BOOLEAN | true | — |
| block_13_str | FLOAT | 1.00-5–5 | — |
| block_14 | BOOLEAN | true | — |
| block_14_str | FLOAT | 1.00-5–5 | — |
| block_15 | BOOLEAN | true | — |
| block_15_str | FLOAT | 1.00-5–5 | — |
| block_16 | BOOLEAN | true | — |
| block_16_str | FLOAT | 1.00-5–5 | — |
| block_17 | BOOLEAN | true | — |
| block_17_str | FLOAT | 1.00-5–5 | — |
| block_18 | BOOLEAN | true | — |
| block_18_str | FLOAT | 1.00-5–5 | — |
| block_19 | BOOLEAN | true | — |
| block_19_str | FLOAT | 1.00-5–5 | — |
| block_20 | BOOLEAN | true | — |
| block_20_str | FLOAT | 1.00-5–5 | — |
| block_21 | BOOLEAN | true | — |
| block_21_str | FLOAT | 1.00-5–5 | — |
| block_22 | BOOLEAN | true | — |
| block_22_str | FLOAT | 1.00-5–5 | — |
| block_23 | BOOLEAN | true | — |
| block_23_str | FLOAT | 1.00-5–5 | — |
| block_24 | BOOLEAN | true | — |
| block_24_str | FLOAT | 1.00-5–5 | — |
| block_25 | BOOLEAN | true | — |
| block_25_str | FLOAT | 1.00-5–5 | — |
| block_26 | BOOLEAN | true | — |
| block_26_str | FLOAT | 1.00-5–5 | — |
| block_27 | BOOLEAN | true | — |
| block_27_str | FLOAT | 1.00-5–5 | — |
| block_28 | BOOLEAN | true | — |
| block_28_str | FLOAT | 1.00-5–5 | — |
| block_29 | BOOLEAN | true | — |
| block_29_str | FLOAT | 1.00-5–5 | — |
| block_30 | BOOLEAN | true | — |
| block_30_str | FLOAT | 1.00-5–5 | — |
| block_31 | BOOLEAN | true | — |
| block_31_str | FLOAT | 1.00-5–5 | — |
| block_32 | BOOLEAN | true | — |
| block_32_str | FLOAT | 1.00-5–5 | — |
| block_33 | BOOLEAN | true | — |
| block_33_str | FLOAT | 1.00-5–5 | — |
| block_34 | BOOLEAN | true | — |
| block_34_str | FLOAT | 1.00-5–5 | — |
| block_35 | BOOLEAN | true | — |
| block_35_str | FLOAT | 1.00-5–5 | — |
| block_36 | BOOLEAN | true | — |
| block_36_str | FLOAT | 1.00-5–5 | — |
| block_37 | BOOLEAN | true | — |
| block_37_str | FLOAT | 1.00-5–5 | — |
| block_38 | BOOLEAN | true | — |
| block_38_str | FLOAT | 1.00-5–5 | — |
| block_39 | BOOLEAN | true | — |
| block_39_str | FLOAT | 1.00-5–5 | — |
| block_40 | BOOLEAN | true | — |
| block_40_str | FLOAT | 1.00-5–5 | — |
| block_41 | BOOLEAN | true | — |
| block_41_str | FLOAT | 1.00-5–5 | — |
| block_42 | BOOLEAN | true | — |
| block_42_str | FLOAT | 1.00-5–5 | — |
| block_43 | BOOLEAN | true | — |
| block_43_str | FLOAT | 1.00-5–5 | — |
| block_44 | BOOLEAN | true | — |
| block_44_str | FLOAT | 1.00-5–5 | — |
| block_45 | BOOLEAN | true | — |
| block_45_str | FLOAT | 1.00-5–5 | — |
| block_46 | BOOLEAN | true | — |
| block_46_str | FLOAT | 1.00-5–5 | — |
| block_47 | BOOLEAN | true | — |
| block_47_str | FLOAT | 1.00-5–5 | — |
| block_48 | BOOLEAN | true | — |
| block_48_str | FLOAT | 1.00-5–5 | — |
| block_49 | BOOLEAN | true | — |
| block_49_str | FLOAT | 1.00-5–5 | — |
| block_50 | BOOLEAN | true | — |
| block_50_str | FLOAT | 1.00-5–5 | — |
| block_51 | BOOLEAN | true | — |
| block_51_str | FLOAT | 1.00-5–5 | — |
| block_52 | BOOLEAN | true | — |
| block_52_str | FLOAT | 1.00-5–5 | — |
| block_53 | BOOLEAN | true | — |
| block_53_str | FLOAT | 1.00-5–5 | — |
| block_54 | BOOLEAN | true | — |
| block_54_str | FLOAT | 1.00-5–5 | — |
| block_55 | BOOLEAN | true | — |
| block_55_str | FLOAT | 1.00-5–5 | — |
| block_56 | BOOLEAN | true | — |
| block_56_str | FLOAT | 1.00-5–5 | — |
| block_57 | BOOLEAN | true | — |
| block_57_str | FLOAT | 1.00-5–5 | — |
| block_58 | BOOLEAN | true | — |
| block_58_str | FLOAT | 1.00-5–5 | — |
| block_59 | BOOLEAN | true | — |
| block_59_str | FLOAT | 1.00-5–5 | — |
| other_weights | BOOLEAN | true | — |
| other_weights_str | FLOAT | 1.00-5–5 | — |
| lora_path_optopt | STRING | Optional: Override LoRA selection with a path | |
| schedule_presetopt | COMBO | Custom | Select a preset schedule (populates the text field below for editing) |
| strength_scheduleopt | STRING | Strength schedule: 0:.2,.5:.8,1:1.0 (step:strength pairs). Edit freely after selecting preset. | |
| save_refined_loraopt | BOOLEAN | false | Enable to save the refined LoRA to disk |
| save_pathopt | STRING | Directory to save refined LoRA | |
| save_filenameopt | STRING | Filename for saved LoRA (timestamp auto-appended). Leave empty for auto-name. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | Model with LoRA applied (filtered by enabled blocks). |
| positive | CONDITIONING | Positive conditioning (with hooks if using schedule). |
| negative | CONDITIONING | Negative conditioning (with hooks if using schedule). |
| analysis | STRING | Per-block analysis showing impact scores. |
| analysis_json | STRING | JSON analysis data for UI coloring. |