Apply VDN-H3 (MiniMax-H3 Hybrid Attention)
Run MiniMax-H3's hybrid attention on your GPU, with the hype stripped out
- model
- MODEL
The pitch, minus the press release
VDN-H3 stops MiniMax-H3's attention from going quadratic as your clip grows. Nearby frames keep exact softmax attention; distant context gets rerouted through a separate "Video Delta Attention" linear branch that carries state forward at constant cost. The longer the clip, the flatter the attention bill. That's the whole sell, and it genuinely holds up.
This node (one of two in Saganaki22/ComfyUI-VDN-H3) is the plain version: it takes your loaded MiniMax-H3 model, applies a downloaded VDN-H3 checkpoint as a runtime patch, and hands back a MODEL. Drop it between your MiniMax-H3 loader and the sampler and change nothing else.
One honest caveat: nobody on the usual forums is talking about this yet, and not because it's bad. Upstream VDN-H3 was built for a cluster of 8× B200s with FlashAttention-4 kernels consumer Blackwell can't even run. This pack is Saganaki22's faithful PyTorch port of the architecture - same released checkpoints, same math, unit-tested against the reference. Expect single-GPU gains near the architectural ~2.6× on long clips, not the headline 74.5× that also counts 8-GPU parallelism and distillation. If your VRAM or RAM is limited, the author's own README says this repo isn't for you.
How it works
VDN is a different attention shape patched onto your loaded MiniMax-H3 model at runtime - nothing is converted on disk. The checkpoint ships only branch weights plus LoRA-shaped adapters (no base), and the node re-keys its diffusers-format tensors onto ComfyUI's module paths in memory, then hands the patched model back to your sampler.
The inputs that matter
The node is one MODEL in, one MODEL out, and you genuinely touch only three things on a normal run:
vdn_checkpoint- a stage directory undermodels/vdn. You'll typically havestage-dmd-step-250(the 8-step distilled model) and/orstage-b-step-2000(the 50-step dense one).apply_turbo_adapter- this is the one people get wrong. ON means the 8-step DMD model: run 8 sampler steps. OFF means the 50-step model it was distilled from: run ~50. Mixing the schedules is the classic cause of "wrong-looking motion."lora_mode- leave it onmerge. The README is blunt thatbypassdegrades 8-step DMD checkpoints: rounding noise in activation space gets amplified by the deep blocks into grainy output.mergefolds the adapters into the weights and reproduces the validated model. It's the default for a reason.
Everything else has a sane default. strength is adapter strength (1.0 is the released model). branch_weights streams the ~4.3 GB of branch weights per block (stream, safe on small cards) or pins them resident (cache_gpu, keep ~4.3 GB VRAM free). attention_backend picks between exact grouped SDPA and one compiled FlexAttention kernel (flex) - measured at parity so far, so grouped stays default. verbose logs what actually got applied; turn it on when debugging.
Install
Clone into ComfyUI/custom_nodes and restart (ComfyUI Manager can do this too - search "ComfyUI-VDN-H3"):
cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-VDN-H3
Then download the VDN branch+adapters into ComfyUI/models/vdn, keeping the release layout (model_spec.json, linear_branch/, adapters/) intact:
hf download OpenVDN/vdn-minimax-h3 --include "stage-dmd-step-250/*" --local-dir <ComfyUI>/models/vdn
That's the extra bit. You still need the normal MiniMax-H3 stack - diffusion model (minimax_h3_fl2va_int8_convrot.safetensors recommended), the qwen3 text encoder, and the video and audio VAEs from Comfy-Org/MiniMax-H3. The 72 GB diffusers base in the VDN HF repo is not needed. Silver lining: requirements.txt is empty - this runs on the torch and safetensors ComfyUI already ships. No Triton, no flash-attn builds, no pip install. Both the fl2va and ref2va MiniMax-H3 base variants work.
Gotchas worth knowing
- Do not stack the "MiniMax H3 Scheduled Sol Attention" patch on top. SOL replaces the same
blocks.*.attn.forwardpath VDN owns, so wherever SOL handles a call, VDN's linear branch silently stops running and you get VDN's LoRAs on attention they weren't trained for. - The 8-step model's
turboadapter replaces (doesn't stack with) community MiniMax-H3 turbo LoRAs. - Check your territory. The MiniMax-H3 base weights sit under the H3 Community License, which excludes the US, EU, UK and South Korea - and the exclusion reaches outputs, not just weights. If you're in one of those regions, running the local base is on shaky ground regardless of how clean this node is.
- Video renders but looks like the plain model? On clips of ~15 latent frames or fewer the window covers everything and VDN correctly falls back to dense attention. Not a bug.
- OOM:
branch_weights: stream,lora_mode: merge, shorter clips, lower resolution - in that order. - "checkpoint has N blocks but the loaded model has M": you've paired a stage with a base of a different depth. Load the matching MiniMax-H3 base.
The example workflow (example_workflows/vdn_h3_t2v_8step.json) runs 8 steps with er_sde/beta - start from it rather than guessing sampler settings. VDN-H3 is niche-on-niche right now, but on a 24 GB+ card it's the one node that actually attacks MiniMax-H3's attention cost.
Inputs (9)
| 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 (stage-dmd = the 8-step VDN-H3 model). OFF gives the 50-step model the checkpoint was distilled from. Use 8 sampler steps with it ON, 50 with it OFF. |
| strength | FLOAT | 1.000–2 | Adapter strength. 1.0 is the released model. |
| lora_mode | COMBO | merge | merge: adapters folded into the weights -- reproduces the validated model exactly. REQUIRED for 8-step DMD checkpoints (stage-dmd-*): bypass's activation-space rounding noise is amplified by the deep blocks and visibly degrades output. |
| 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: the ~4.3 GB of linear-branch weights are moved 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). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |