Hunyuan Video LoRA Loader - Edit Blocks
Which blocks does your Hunyuan LoRA actually live in?
- model
- model
Here's the situation that makes you want this node: you've got a Hunyuan Video LoRA that nukes your composition, or a style LoRA that also drags in a face you didn't ask for. A normal LoraLoader has one dial - strength - and strength fixes everything about nothing. HunyuanLoadAndEditLoraBlocks gives you the surgical version: 20 on/off toggles, one per double block, so you can pick apart which part of the model the LoRA is actually touching.
Hunyuan Video is a 13B diffusion transformer - an MMDiT with 20 double-stream blocks and 40 single-stream blocks. LoRAs trained on it patch those blocks, and different blocks carry different responsibilities: identity tends to live in some, motion and composition in others. Block-level control is a well-worn practice in the DiT world - the whole "block weights" school of LoRA fiddling - and this node brings that thinking to Hunyuan without you needing to know a single block's number off the top of your head. Just toggle, run, look.
How it works
The node builds a dict of block settings from its toggles, then filters the LoRA's tensors by key name: any tensor whose name contains an enabled block prefix (like double_blocks.7.) survives; everything from a disabled block gets dropped. The filtered tensors go into ComfyUI's normal load_lora_for_models. So it's not a strength multiplier per block - it's binary. Block on, block off.
The inputs that matter
The node surface is busy but only a few fields deserve your attention:
- lora_name - pick from your
models/lorasfolder. - strength - global strength, default 1.0, range -10 to 10. This is where you go down, not up.
- double_blocks.0. through double_blocks.19. - the actual point. 20 booleans, all on by default. Flip one off, rerun, compare.
- use_single_blocks - a single all-or-nothing switch for the 40 single blocks (default off). There's no per-block granularity here, which is the main thing you'll wish for.
- save_settings - when true, writes your double-block choices to the pack's cache so the Load From Cache node can replay them later. Default true, and this is the node's real purpose: it's how you build that cache.
Output is a patched model, same as any loader.
The trap in the room
The node's change-detection signature (IS_CHANGED) only hashes the LoRA name, strength, and file mtime - not the block toggles. In practice that can mean flipping a toggle alone doesn't force a re-run because ComfyUI serves the cached result. If you toggle a block and nothing visibly changes, nudge the strength up by 0.01 and back - that changes the signature and forces a fresh execution. Annoying, but a two-second workaround.
Also worth knowing: only the double-block toggles get saved to cache. Single blocks are a live, per-load decision, so a workflow that "replays" your settings via cache will remember your double blocks but silently default your single blocks to off.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/PixelFunAI/ComfyUI_PixelFun
Restart ComfyUI, or find "Hunyuan LoRA Loader Nodes" in ComfyUI Manager. No extra Python deps, no model downloads - the only dependency beyond ComfyUI itself is yaml, which you already have.
A note on expectations: block-toggling is fiddly by nature, and the results are rarely binary good/bad. You'll spend a few renders going down a rabbit hole of "was it block 11 or 12?". The one I'd actually reach for: when a Hunyuan LoRA is doing almost what you want, disable the low double blocks first - that's where the coarser structural signal tends to sit. And if you want per-single-block control, this node won't give it to you - you'd be writing a custom loader.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lora_name | COMBO | 0 options: | |
| strength | FLOAT | 1.00-10–10 | — |
| save_settings | BOOLEAN | true | — |
| use_single_blocks | BOOLEAN | false | — |
| double_blocks.0. | BOOLEAN | true | — |
| double_blocks.1. | BOOLEAN | true | — |
| double_blocks.2. | BOOLEAN | true | — |
| double_blocks.3. | BOOLEAN | true | — |
| double_blocks.4. | BOOLEAN | true | — |
| double_blocks.5. | BOOLEAN | true | — |
| double_blocks.6. | BOOLEAN | true | — |
| double_blocks.7. | BOOLEAN | true | — |
| double_blocks.8. | BOOLEAN | true | — |
| double_blocks.9. | BOOLEAN | true | — |
| double_blocks.10. | BOOLEAN | true | — |
| double_blocks.11. | BOOLEAN | true | — |
| double_blocks.12. | BOOLEAN | true | — |
| double_blocks.13. | BOOLEAN | true | — |
| double_blocks.14. | BOOLEAN | true | — |
| double_blocks.15. | BOOLEAN | true | — |
| double_blocks.16. | BOOLEAN | true | — |
| double_blocks.17. | BOOLEAN | true | — |
| double_blocks.18. | BOOLEAN | true | — |
| double_blocks.19. | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |