Apply VDN-H3 Advanced (Ablations & Fast Kernels)
The same MiniMax-H3 patch, with the training wheels off
- model
- MODEL
What this is (and isn't)
If you've read the plain Apply VDN-H3 node's page, you know the setup: a runtime patch that swaps MiniMax-H3's quadratic long-range attention for the linear Video Delta Attention branch, with nearby frames keeping exact softmax. The Advanced node is the exact same patch plus the knobs the author left off the simple one - per-adapter strengths, ablations that deviate from the checkpoint's trained spec, and an opt-in torch.compile pass for the branch's hot kernels. With every default left alone, it reproduces the released model exactly. This isn't a "more powerful" version you must tune; it's the experimenter's edition.
Reach for it over the base node in two situations: you want to play with why VDN works (turn parts of the hybrid attention off and watch what breaks), or you're chasing speed on long clips and want fast_kernels without giving up per-adapter control. If you just want to render video, the base node is simpler and you're not missing anything.
The knobs, and what each actually does
Required inputs mirror the base node - model, vdn_checkpoint, apply_turbo_adapter, lora_mode, branch_weights, attention_backend, verbose - with one meaningful upgrade:
stage_b_strengthandturbo_strength- the base node's single globalstrengthsplit into one per adapter. The "default" (Stage-B) adapter is the 50-step model's; the "turbo" one is the 8-step DMD distillation's. Want the 8-step model but a softer turbo contribution? This is where. Both default to 1.0.
The optional group is where the ablations live. Every one of these has a "trained: X" tooltip telling you what the released checkpoint was actually built with, and the node warns in the console when you deviate. Trained values: window_radius 1, window_chunk 5, anchor_frames "both", text_state on, linear_branch on.
window_radius/window_chunk- the shape of the exact-softmax window, expressed in chunks rather than frames.window_chunk: 0switches to a per-frame centered window. Bigger windows push more of the sequence through exact attention, which costs you the linear-attention speedup in exchange for more of the plain model's behavior.anchor_frames-both/columns/rows/none. Boundary-frame anchors keep the window chunk-aligned across a video's frame grid; the trained spec isboth, the rest are ablation.text_state- whether the prompt is written into the linear branch's states at init. Trained: on.linear_branch- the debug switch. OFF disables the branch entirely, leaving a window-only ablation - output loses all long-range context on any clip longer than the window. The tooltip says "debug" and means it; flip this only to see what the branch contributes.fast_kernels- torch.compiles the branch's hot spots (the RMSNorm+gate epilogue, the state gather, the frame-major q store) into single fused kernels. Same math, so output shouldn't change; the first run compiles and it falls back to eager if compile fails. This is the one pure win here if you can stand the compile wait - in the author's own benchmark table, the Advanced fast-kernels render drops an 8-step 1280×736 clip from ~2:04 to ~1:13.
Where beginners get burned
Same trap as the base node, worth repeating because this node makes it easier to stumble into: apply_turbo_adapter ON means 8 sampler steps, OFF means ~50, and lora_mode must stay on merge for the 8-step DMD checkpoints - bypass's rounding noise amplifies into visibly grainy output on the deep blocks. The extra knobs default to the trained spec and warn if you move them, but the step-count mismatch won't warn you; it'll just render weird motion. And remember the pack-level rules: don't stack this on the "MiniMax H3 Scheduled Sol Attention" patch (they own the same forward path, so SOL silently skips VDN's branch), and don't run the turbo adapter alongside community MiniMax-H3 turbo LoRAs.
Install
Identical to the base node - same pack, same nothing-to-install. Clone and restart:
cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-VDN-H3
Then put a VDN stage under ComfyUI/models/vdn (keep model_spec.json, linear_branch/, adapters/ together):
hf download OpenVDN/vdn-minimax-h3 --include "stage-dmd-step-250/*" --local-dir <ComfyUI>/models/vdn
You still need a normal ComfyUI MiniMax-H3 base (minimax_h3_fl2va_int8_convrot.safetensors, text encoder, both VAEs) - the VDN release contains branch weights and adapters only, no base, and the repo adds zero Python dependencies on top of ComfyUI's stock torch/safetensors.
The verdict
If your MiniMax-H3 renders are already working and you just want VDN's linear-attention savings, use the simple node. Grab this one when you want fast_kernels compile speedups with per-adapter control, or when you're curious enough about hybrid attention to poke at what each piece does - the trained-spec warnings make it a safe sandbox for that. It's experimental and VRAM-hungry by design, and nobody's built a community around it yet - but for long-clip H3 work on a big card, it's currently the only honest way to attack the quadratic wall without leaving ComfyUI.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The MiniMax-H3 diffusion model to patch. Chain once, between the model loader and the sampler. | |
| vdn_checkpoint | COMBO | The VDN stage directory (models/vdn) holding the linear-branch weights and spec. Must match the loaded base (stage-dmd-* = 8-step distilled model). | |
| apply_turbo_adapter | BOOLEAN | true | Apply the 'turbo' adapter when the checkpoint carries one (8-step model). See the base node's tooltip. |
| stage_b_strength | FLOAT | 1.000–2 | Strength of the 'default' (Stage-B) adapter. |
| turbo_strength | FLOAT | 1.000–2 | Strength of the 'turbo' (8-step DMD) adapter. |
| lora_mode | COMBO | merge | merge required for 8-step DMD checkpoints; see the base node's tooltip. |
| branch_weights | COMBO | auto | auto (default): cache_gpu when the free VRAM after the base load exceeds 1.5x the stage size + 4 GiB headroom, else stream (prefers the int8_convrot stage file under memory pressure). stream: branch weights move to the GPU per block per step with a one-block lookahead prefetch (safe on small cards). cache_gpu: resident on the GPU after the first step (faster; keep ~4.3 GB VRAM free). |
| retain_buffers | COMBO | auto | Retained branch scratch/banks (scan banks, delta solve, window gather, q/k/v copies + prefetch) trade ~0.5-1 GiB VRAM for churn-free steps. auto: retain when free VRAM >= stage + 10 GiB headroom, else transient (v1.3.1 allocation pattern, peak VRAM priority on small cards). on/off override. |
| verbose | BOOLEAN | false | Log the applied adapters and the per-forward layout to the console. |
| attention_backend | COMBO | grouped | How the windowed softmax runs. grouped: one dense SDPA per window group (portable, exact). flex: the whole pattern as one compiled FlexAttention kernel over the full sequence (faster on long clips; first run compiles, falls back to grouped if compile fails). |
| window_radiusopt | INT | 10–8 | Softmax window radius in chunks. Trained: 1. |
| window_chunkopt | INT | 50–64 | Chunk size for the aligned window; 0 = per-frame centered window. Trained: 5. |
| anchor_framesopt | COMBO | both | Boundary-frame anchors. Trained: both. |
| text_stateopt | BOOLEAN | true | Write the prompt into the linear branch's states at init. Trained: on. |
| linear_branchopt | BOOLEAN | true | Off = window-only ablation (debug; output then lacks all long-range context on clips longer than the window). |
| fast_kernelsopt | BOOLEAN | false | torch.compile the branch's hot spots (RMSNorm+gate epilogue, state gather, frame-major q store, and the bidirectional scan as one CUDA-graph replay). Same math; falls back to eager if compile fails. First run compiles. Known to drift on 8-step DMD stages (stage-dmd-*) on torch 2.10 -- ablation use only, keep off for final renders (a warning is logged). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |