MiniMax H3 Activation Chunk - Star7
MiniMax H3 keeps OOMing your card? This node chunks the real culprit.
- model
- model
MiniMax H3 is the 33B omni-modal video model that hit ComfyUI day one, and it's genuinely good - native stereo audio, 15-second clips, motion transfer people swear feels like Kling. It's also a memory monster. The packed sequence H3 pushes through its transformer isn't the few thousand tokens you're used to from an image model; attach a reference video and it can be 50,000 to 100,000+ tokens. Three intermediate operations - the QKV projection, the split-half RoPE, and the MLP's SwiGLU expansion - each allocate a temporary activation buffer proportional to that sequence, and on a 12-24GB card one of those three peaks is usually what kills the run. Not the model weights. The peaks.
That's exactly what this node exists for. MiniMax H3 Activation Chunk - Star7 is a pass-through patch: it doesn't change sampling, the latent layout, VAE, or output resolution. You drop it into the model chain -
UNET Loader -> LoRA -> (attention patch) -> Activation Chunk - Star7
-> Guider / Scheduler / Sampler
- and it re-implements QKV, the fused split-half RoPE, and the MLP expansion as row-independent chunked operations, so each temporary activation only ever holds a slice of the sequence. No frames dropped, no attention tokens cut. RoPE is written back into Q/K in place, MLP output still feeds the original block, and the upstream DiT path stays intact - which is why it coexists with INT8/ConvRot weights, LoRAs, and FP16/BF16. The
disable_dynamic_prefetchinput is a compatibility placeholder left over from an old experiment; it does nothing now. Ignore it.
The inputs you actually touch:
- model (MODEL) in, model (MODEL) out. Wire the output to your Guider/Sampler.
- chunk_tokens - RoPE chunk target, default 8192. RoPE's working set is comparatively small, so leave this high unless logs say RoPE OOM.
- mlp_chunk_tokens - the MLP expansion. This is the one to turn down first when VRAM is tight; on the author's 22GB card, MLP 8192 costs ~1970 MiB versus ~858 MiB at 2048. Default 8192.
- qkv_chunk_tokens - QKV projection working set. On SM75 (Turing / RTX 20-series) it's quality-capped at 4096 regardless of what you type; SM80+ has no cap.
- auto_halve_on_oom (default on) - if a reducible chunk OOMs, halves just that stage and retries down to 256, then remembers the working value for the rest of the session.
- attention_backend - the enum that trips people up. Default
comfy_kitchen_int8is approximate (INT8 attention); pickexistingto keep whatever upstream attention patch you already have (say, your KJNodes Sage) bit-for-bit. The foursla_*modes are architecture-specific sparsity paths - faster, but INT8, and they error rather than silently degrading, so don't reach for them on hardware they weren't built for.
Installing it
One package, four nodes. ComfyUI Manager (search MiniMax H3 Activation Chunk - Star7) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/star7code/minimax-h3-chunk-star7.git
Restart ComfyUI. The pack declares zero Python dependencies - no requirements.txt, nothing to pip install. Two hardware footnotes: SM75 (RTX 20-series) uses a precompiled CUDA kernel, so Windows needs a CUDA-13-capable NVIDIA driver (580+) and Linux needs 525.60.13+; SM80+ uses Triton and compiles its kernels on first run.
Common gotchas
- Tune MLP first, not RoPE. RoPE 8192→4096 saves a lot less than the same MLP drop. Only lower
chunk_tokenswhen the log calls out RoPE. - The live status readouts under the inputs. Each numeric input shows what's actually in use. If you see
degraded to N (set M), that'sauto_halve_on_oomremembering a working value - not the node lying to you, and your saved workflow still holds M. - An attention-kernel OOM isn't chunkable. Activation chunking can't shrink the attention core working set; switch backends or cut reference tokens instead.
- On RTX 20-series, pair it with the MiniMax H3 Native FP16 Loader - Star7 (a separate pack). The README's 20-series workflow uses that combo, and warns against stacking an old post-hoc "FP16 Exact Fix" node on top.
- The author's 22GB 2080 Ti numbers: ~620s full task on Comfy Kitchen INT8 vs ~470s with the recommended SM75 SLA mode - with the experimental All-INT8 mode at ~325s. Those are real numbers from one machine, not a promise for yours.
One last thing that isn't the node's fault: the H3 weights are geofenced out of the US, EU, UK, and South Korea by the MiniMax H3 Community License. Check your region before you build a whole pipeline around this.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| chunk_tokens | INT | 81920–65536 | H3 RoPE sequence tokens per chunk. 2080 Ti 22GB: use 8192 after a safe 4096 validation run. |
| auto_halve_on_oom | BOOLEAN | true | If a reducible RoPE, MLP, or QKV temporary chunk OOMs, halve only that stage and retry down to 256 tokens. Zero still tries one full sequence first, then may auto-reduce. |
| verbose | BOOLEAN | true | Print compact one-time configuration and shape summaries to the ComfyUI console. |
| mlp_chunk_tokens | INT | 81920–65536 | H3 MLP tokens per chunk. Keeps the upstream block path while streaming the large expansion activation. The default 8192 is validated on the 22GB reference workflow. |
| disable_dynamic_prefetch | COMBO | off | Off by default and zero-overhead. Auto proactively uses bounded out_proj chunks when current free VRAM cannot safely hold the estimated full contraction; this may reduce speed. |
| qkv_chunk_tokens | INT | 81920–65536 | H3 QKV projection workspace chunk. Zero tries the full sequence first; automatic reduction lowers only QKV after a QKV projection OOM. |
| out_proj_chunk_tokens | INT | 40960–65536 | Internal compatibility value retained for old workflows. Attention output memory protection selects its own safe tile automatically. |
| reuse_mlp_weights | BOOLEAN | true | Reuse prepared QKV/MLP weight snapshots across token chunks when safe. Falls back to streamed preparation on VRAM pressure. |
| attention_backend | COMBO | comfy_kitchen_int8 | existing keeps the incoming attention patch (for example KJ Sage). comfy_kitchen_int8 selects ComfyUI's native INT8 attention and overrides an earlier MiniMax Sage patch. SLA uses fixed Top-K Q128/K64 routing. Sol uses Q64/K64 threshold routing; the SM80+ recommended Sol mode directly calls NVIDIA official BF16 exact+approx Sol-Attn. SM75 exposes the native All-INT8 Sol path; it keeps exact selected blocks and centroid contributions for unselected blocks while quantizing PV. Hybrid modes schedule CK/SLA/CK or CK/Sol/CK by complete sampling step. Strict sparse modes never silently fall back. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |