Wan Analyzer + Selective Loader V2
Block-level control for Wan 2.2 LoRAs
- model
- positive
- negative
- model
- positive
- negative
- analysis
- analysis_json
Wan character LoRAs have a known problem: stack more than one or two and quality collapses, or a single strong LoRA bleeds its face onto every character in frame. Block-level control is one of the few real levers against that, and this node is the whole toolkit - analyze which of Wan's 40 blocks a LoRA actually uses, then keep only the ones you want.
What it is and why you'd reach for it
Wan 2.2's DiT has 40 transformer blocks, and this node scores each one for a given LoRA (0-100% by weight magnitude) and gives you a toggle plus strength slider for every single one - live, in the same node that does the loading. That "combined" behavior is the V2 generation of this pack's design: earlier versions split analysis and selective loading across two nodes you had to wire together yourself.
This matters more for Wan than for most architectures. The community's documented failure mode with Wan character work is a LoRA's face bleeding across an entire scene when you only wanted it on one subject, or multiple LoRAs fighting each other into a blurry mess when stacked. Turning off the blocks a LoRA doesn't actually need is a direct answer to both: less surface area for a LoRA to interfere on, more headroom to stack a second one without collision.
It's one of 31 nodes in ShootTheSound/comfyUI-Realtime-Lora, which also trains Wan 2.2 LoRAs directly (High/Low/Combo noise modes) via Musubi Tuner, so you can go from training run to selectively-loaded LoRA without leaving the workflow.
How it works
The 40 blocks are grouped into rough zones - 0-9 early, 10-19 early-mid, 20-29 mid-late, 30-39 late - and there's an other_weights slider for anything a LoRA touches outside the numbered set, which matters more than it sounds: LoKR and LoHa (both auto-detected here) don't always land cleanly inside the numbered blocks. The V2 node also connects to analysis_json from a separate analyzer if you'd rather do a first pass elsewhere, and the checkboxes color themselves by impact once that's wired - blue low, red high.
Inputs and outputs that matter
- model / positive / negative - the pipeline this patches; conditioning is touched too since V2's schedule hooks run through it.
- lora_name, strength - pick and global weight.
- preset - jump to Late Only (30-39), Mid-Late (20-39), Skip Early, Mid Only (15-25), Early Only, or Half Strength before hand-tuning individual blocks.
- block_0 through block_39, plus other_weights - each a toggle with a -5 to 5 strength slider.
- strength_schedule (optional) -
step:strengthpairs for fading the LoRA's strength across the run, with 40+ named presets. - save_refined_lora (optional) - bake your surviving-blocks combination into a new
.safetensorsfile, so a stacking experiment that finally worked doesn't live only in your node graph's toggle state. - Outputs: model, positive, negative (patched), analysis (readable), analysis_json (for chaining).
Installing it
Search "Realtime LoRA Trainer" in ComfyUI Manager, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora
Restart ComfyUI. This node needs nothing beyond that - no video model, no training backend. Those are only relevant to the pack's Wan trainer node.
Troubleshooting
lora_name dropdown is empty. It only lists Wan LoRAs already sitting in your loras folder. If you just trained one with this pack's own Wan trainer, feed its lora_path output into lora_path_opt instead - the dropdown is ignored once that's connected.
Stacking two LoRAs still collapses quality even with blocks trimmed down. Selective loading reduces interference, it doesn't eliminate it - Wan's documented multi-LoRA problem is real and block trimming is a mitigation, not a fix. If two full-strength LoRAs still fight, try lowering the strength on the less important one before pruning more blocks off it.
A Wan 2.1-trained LoRA behaves oddly on 2.2. Wan 2.1 LoRAs are broadly forward-compatible with 2.2, but "compatible" isn't "identical" - the block impact map you see here is for whatever architecture you loaded the LoRA against, so re-run the analysis rather than assuming a 2.1 LoRA's block scores carry over unchanged.
Inputs (94)
| 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 | — |
| 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. |