WanVideo Lora Block Edit
Turn a LoRA off in specific transformer blocks
- blocks
A LoRA strength slider is a blunt instrument - it scales the whole LoRA up or down uniformly, every transformer block treated the same. This node is the opposite of blunt: Wan's diffusion transformer has 40 blocks, and this gives you a checkbox for every single one, letting you decide exactly which blocks a LoRA actually gets to influence. Flip a block off and the LoRA's weights are excluded from it entirely, strength slider notwithstanding.
Why you'd want this
Different blocks in a diffusion transformer tend to specialize - earlier blocks lean toward broad structure and composition, later ones toward fine detail - which is roughly the same intuition behind Wan 2.2's high-noise/low-noise MoE split, just applied at a finer grain within a single model rather than across two experts. If a LoRA you're using nails the thing you trained it for (a face, a style) but also drags in unwanted side effects - motion getting stiffer, composition drifting, color shifts - selectively disabling the blocks responsible can preserve what you want and drop what you don't, in a way a single strength value can't.
This is an advanced, experimental-feeling knob. There's no universal map of "block 12 controls faces, block 30 controls lighting" - Wan's block behavior isn't formally documented at that granularity anywhere in the ecosystem, and figuring out which blocks matter for your specific LoRA is trial and error. Don't reach for this before you've tried the basics (adjusting strength, trying the LoRA on the low-noise pass only, checking merge_loras behavior on the LoRA-select node) - it's a scalpel for when those don't get you the rest of the way.
The inputs and output that matter
The bulk of the node is 40 boolean toggles, blocks.0. through blocks.39., every one defaulting to true (LoRA active in that block). Untick specific blocks to exclude them. There's also an optional layer_filter (STRING, multiline) for finer-grained control by name pattern rather than clicking through 40 checkboxes one at a time, if you know which named layers within a block you want to target.
Output is a single blocks (SELECTEDBLOCKS) - this doesn't do anything on its own. It's meant to feed into the blocks input on WanVideo Lora Select By Name, the node that actually loads and applies your LoRA. This node only defines the selection; the LoRA-select node is what applies it.
How to install it
Via ComfyUI Manager, search WanVideoWrapper and install, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
then restart. No model download for this node itself - it's a pure selection/config node that only matters once wired into your LoRA loading.
Common issues & troubleshooting
You built a block selection and nothing changed. Check that its blocks output is actually wired into the blocks input on WanVideo Lora Select By Name - this node produces a selection object, it doesn't apply anything by itself.
All 40 toggles left at default is the same as not using this node. Every block starts enabled, so unless you've actually unchecked something, the LoRA behaves exactly as if you'd skipped this node entirely.
Trial and error is genuinely the expected workflow here. There's no shortcut to knowing which blocks to disable for your specific problem - start by disabling a broad range (say, the back half of the blocks) and narrow in from there, rather than guessing at individual block numbers first.
Inputs (41)
| Name | Type | Default | Description |
|---|---|---|---|
| blocks.0. | BOOLEAN | true | — |
| blocks.1. | BOOLEAN | true | — |
| blocks.2. | BOOLEAN | true | — |
| blocks.3. | BOOLEAN | true | — |
| blocks.4. | BOOLEAN | true | — |
| blocks.5. | BOOLEAN | true | — |
| blocks.6. | BOOLEAN | true | — |
| blocks.7. | BOOLEAN | true | — |
| blocks.8. | BOOLEAN | true | — |
| blocks.9. | BOOLEAN | true | — |
| blocks.10. | BOOLEAN | true | — |
| blocks.11. | BOOLEAN | true | — |
| blocks.12. | BOOLEAN | true | — |
| blocks.13. | BOOLEAN | true | — |
| blocks.14. | BOOLEAN | true | — |
| blocks.15. | BOOLEAN | true | — |
| blocks.16. | BOOLEAN | true | — |
| blocks.17. | BOOLEAN | true | — |
| blocks.18. | BOOLEAN | true | — |
| blocks.19. | BOOLEAN | true | — |
| blocks.20. | BOOLEAN | true | — |
| blocks.21. | BOOLEAN | true | — |
| blocks.22. | BOOLEAN | true | — |
| blocks.23. | BOOLEAN | true | — |
| blocks.24. | BOOLEAN | true | — |
| blocks.25. | BOOLEAN | true | — |
| blocks.26. | BOOLEAN | true | — |
| blocks.27. | BOOLEAN | true | — |
| blocks.28. | BOOLEAN | true | — |
| blocks.29. | BOOLEAN | true | — |
| blocks.30. | BOOLEAN | true | — |
| blocks.31. | BOOLEAN | true | — |
| blocks.32. | BOOLEAN | true | — |
| blocks.33. | BOOLEAN | true | — |
| blocks.34. | BOOLEAN | true | — |
| blocks.35. | BOOLEAN | true | — |
| blocks.36. | BOOLEAN | true | — |
| blocks.37. | BOOLEAN | true | — |
| blocks.38. | BOOLEAN | true | — |
| blocks.39. | BOOLEAN | true | — |
| layer_filteropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| blocks | SELECTEDBLOCKS | The modified lora model |