Wan Model Layer Editor
Scale Wan 2.2's 40 blocks on the base model, not the LoRA
- model
- model
- analysis
- analysis_json
This node edits Wan 2.2's checkpoint directly, block by block, before any LoRA gets layered on top. If a particular block is consistently doing something you don't want across every generation - not just with one specific LoRA - this is where you fix it once, upstream.
What it is and why you'd reach for it
Wan 2.2's DiT has 40 blocks, and this node gives each one an independent -2 to 2 strength multiplier, with 1.0 as unchanged. It's the base-model counterpart to the pack's Wan selective LoRA loaders: those work on a LoRA's own weights, this works on the checkpoint the LoRA gets applied to. That distinction matters more on video models than it sounds - Wan's documented failure modes (a character's face bleeding across the whole scene, quality collapsing when you stack more than one or two LoRAs) are partly about LoRA interference, but a base-model edit that's consistently biasing generation in an unwanted direction affects every LoRA you ever load on top of it, so fixing it here instead of per-LoRA is the more durable move.
It's one of six model layer editors in ShootTheSound/comfyUI-Realtime-Lora. The pack's block guide for Wan's selective LoRA loaders groups the 40 blocks into rough zones - 0-9 early, 10-19 early-mid, 20-29 mid-late, 30-39 late - which is a reasonable starting map here too, even though this node is editing the base weights rather than a LoRA's.
Inputs and outputs that matter
- model - the Wan 2.2 checkpoint to edit.
- preset - Default, All Off, Half Strength, Late Only (30-39), or Custom.
- block_0 through block_39, plus other for anything outside the numbered blocks - each with a toggle and a -2 to 2 strength slider.
- Outputs: model (patched, feed downstream to your LoRA loader or sampler), info (a text summary of what was applied). Unlike the pack's other model layer editors, this one doesn't output a structured
analysis_json- just the patched model and a readable report.
Installing it
ComfyUI Manager: search "Realtime LoRA Trainer." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora
Restart ComfyUI. No further install needed - model layer editors, like the rest of the pack's analysis and loading nodes, work out of the box. Video generation itself is still Wan's own VRAM burden regardless of this node; editing blocks doesn't reduce that.
Troubleshooting
Set a block to 0 and got artifacts instead of a clean removal. A strength of exactly 0.0 disrupts a block's residual path more aggressively than the number suggests - stay roughly in the 0.5-1.5 range for real adjustments, and treat the extremes as deliberate breakage tests rather than a normal setting.
Chained this after a LoRA loader and the effect got unpredictable. This node is meant to sit upstream - edit the base checkpoint here first, then let LoRAs patch on top of the edited version. Placed after a LoRA loader, you're scaling the LoRA's own contribution unevenly rather than the base model the block zones are describing.
Looking for the analysis_json output this pack's other model layer editors have. This node doesn't have one - it outputs model and info only. If you need structured per-block data to feed another node, use the info text output or work from the pack's Wan Analyzer + Selective Loader V2 instead, which is built for LoRA-side analysis with the fuller output set.
Inputs (91)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Model from LoadCheckpoint or LoadDiffusionModel | |
| preset | COMBO | Default | Quick preset selection. Individual controls below override when changed. |
| block_0 | BOOLEAN | true | — |
| block_0_str | FLOAT | 1.00-2–2 | — |
| block_1 | BOOLEAN | true | — |
| block_1_str | FLOAT | 1.00-2–2 | — |
| block_2 | BOOLEAN | true | — |
| block_2_str | FLOAT | 1.00-2–2 | — |
| block_3 | BOOLEAN | true | — |
| block_3_str | FLOAT | 1.00-2–2 | — |
| block_4 | BOOLEAN | true | — |
| block_4_str | FLOAT | 1.00-2–2 | — |
| block_5 | BOOLEAN | true | — |
| block_5_str | FLOAT | 1.00-2–2 | — |
| block_6 | BOOLEAN | true | — |
| block_6_str | FLOAT | 1.00-2–2 | — |
| block_7 | BOOLEAN | true | — |
| block_7_str | FLOAT | 1.00-2–2 | — |
| block_8 | BOOLEAN | true | — |
| block_8_str | FLOAT | 1.00-2–2 | — |
| block_9 | BOOLEAN | true | — |
| block_9_str | FLOAT | 1.00-2–2 | — |
| block_10 | BOOLEAN | true | — |
| block_10_str | FLOAT | 1.00-2–2 | — |
| block_11 | BOOLEAN | true | — |
| block_11_str | FLOAT | 1.00-2–2 | — |
| block_12 | BOOLEAN | true | — |
| block_12_str | FLOAT | 1.00-2–2 | — |
| block_13 | BOOLEAN | true | — |
| block_13_str | FLOAT | 1.00-2–2 | — |
| block_14 | BOOLEAN | true | — |
| block_14_str | FLOAT | 1.00-2–2 | — |
| block_15 | BOOLEAN | true | — |
| block_15_str | FLOAT | 1.00-2–2 | — |
| block_16 | BOOLEAN | true | — |
| block_16_str | FLOAT | 1.00-2–2 | — |
| block_17 | BOOLEAN | true | — |
| block_17_str | FLOAT | 1.00-2–2 | — |
| block_18 | BOOLEAN | true | — |
| block_18_str | FLOAT | 1.00-2–2 | — |
| block_19 | BOOLEAN | true | — |
| block_19_str | FLOAT | 1.00-2–2 | — |
| block_20 | BOOLEAN | true | — |
| block_20_str | FLOAT | 1.00-2–2 | — |
| block_21 | BOOLEAN | true | — |
| block_21_str | FLOAT | 1.00-2–2 | — |
| block_22 | BOOLEAN | true | — |
| block_22_str | FLOAT | 1.00-2–2 | — |
| block_23 | BOOLEAN | true | — |
| block_23_str | FLOAT | 1.00-2–2 | — |
| block_24 | BOOLEAN | true | — |
| block_24_str | FLOAT | 1.00-2–2 | — |
| block_25 | BOOLEAN | true | — |
| block_25_str | FLOAT | 1.00-2–2 | — |
| block_26 | BOOLEAN | true | — |
| block_26_str | FLOAT | 1.00-2–2 | — |
| block_27 | BOOLEAN | true | — |
| block_27_str | FLOAT | 1.00-2–2 | — |
| block_28 | BOOLEAN | true | — |
| block_28_str | FLOAT | 1.00-2–2 | — |
| block_29 | BOOLEAN | true | — |
| block_29_str | FLOAT | 1.00-2–2 | — |
| block_30 | BOOLEAN | true | — |
| block_30_str | FLOAT | 1.00-2–2 | — |
| block_31 | BOOLEAN | true | — |
| block_31_str | FLOAT | 1.00-2–2 | — |
| block_32 | BOOLEAN | true | — |
| block_32_str | FLOAT | 1.00-2–2 | — |
| block_33 | BOOLEAN | true | — |
| block_33_str | FLOAT | 1.00-2–2 | — |
| block_34 | BOOLEAN | true | — |
| block_34_str | FLOAT | 1.00-2–2 | — |
| block_35 | BOOLEAN | true | — |
| block_35_str | FLOAT | 1.00-2–2 | — |
| block_36 | BOOLEAN | true | — |
| block_36_str | FLOAT | 1.00-2–2 | — |
| block_37 | BOOLEAN | true | — |
| block_37_str | FLOAT | 1.00-2–2 | — |
| block_38 | BOOLEAN | true | — |
| block_38_str | FLOAT | 1.00-2–2 | — |
| block_39 | BOOLEAN | true | — |
| block_39_str | FLOAT | 1.00-2–2 | — |
| other | BOOLEAN | true | — |
| other_str | FLOAT | 1.00-2–2 | — |
| save_preset_nameopt | STRING | Enter preset name, then click Save Preset button (or leave for file sync on execute) | |
| delete_preset_nameopt | STRING | Preset to delete (filled automatically by Delete button) | |
| browser_presets_jsonopt | STRING | {} | JSON of all browser presets (auto-filled by JS for sync) |
| save_modelopt | BOOLEAN | false | Save modified model to disk (large files!) |
| save_pathopt | STRING | Directory to save modified model | |
| save_filenameopt | STRING | Filename for saved model (timestamp added) | |
| source_model_pathopt | STRING | Path to original model file (for copying metadata). Required for saved model to load correctly. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | Model with block modifications applied |
| analysis | STRING | Text analysis of model structure |
| analysis_json | STRING | JSON analysis data |