H3 Memory Optimization
The H3 node that makes a 33B video model fit on your card
- model
- MODEL
H3 Memory Optimization is the workhorse of the H3-Optimizations pack - the node you drop in when MiniMax H3 works but is eating your VRAM alive or crawling. It's a model patch, meaning it sits between the H3 model loader and your sampler and rewrites how the model executes, not what it produces. A 33B model with 42 GB of weights will never be small, but it doesn't have to materialize everything at once, and that's the whole trick.
How it works
Three things happen under the hood. First, QKV projection is chunked: compatible ConvRot INT8 checkpoints stream their projection in 4K-token chunks straight into Comfy Kitchen's INT8 carriers instead of building the full-sequence Q/K/V in memory. Second, MLP layers and the FinalLayer norm/modulation/output projection run in bounded token chunks - the chunk_rows input (default 4096) is your dial for how big each chunk is. Third, on FP8-capable hardware, ordinary BF16/FP16 weights can be converted to FP8 E4M3 for further savings.
That last bit is the one thing worth being careful about. The precision_mode combo defaults to Preserve precision, which forbids new weight quantization entirely - the author's clear preference. Flip it to Allow FP8 conversion and you get extra memory/perf headroom, but FP8 conversion is lossy and can shift output. (The old preserve_precision boolean you'll see on saved workflows is a legacy slot that's ignored now; precision_mode is authoritative.)
The inputs that matter:
fused_qkv(auto/off) - whether chunked QKV projection runs. Auto picks the compatible provider; off forces standard Comfy QKV.mlp_memory(auto/off) - whether MLP gets the bounded-chunk treatment.chunk_rows(256–65536) - larger chunks are faster but use more activation memory. The beginner fix for OOM: lower it.qkv_streaming_mode(Auto/Off/Forced) - Auto preserves an explicit attention selector if one claims the model; Forced lets this node replace dense attention with full-density Kitchen. Leave it on Auto.
The MODEL output feeds straight into your sampler chain, and the node prints a status line telling you which paths actually engaged.
The honest numbers
This node is a memory optimization, not a pure speed hack. The pack's own sweep shows chunked QKV plus bounded MLP adding roughly 7.5% at 5 seconds and 13.3% at 10 seconds - real but modest. The README is refreshingly candid that some of the observed QKV timing win is a CUTLASS config artifact, not magic. Its real job is cutting peak VRAM so the sparse-attention node and long clips fit at all.
Install and gotchas
Install the pack once - Manager search "H3 Optimizations", or git clone https://github.com/Zironic/H3-Optimizations into custom_nodes and restart. No pip dependencies; the native kernels ship prebuilt for Windows x64 and Linux x86-64 (NVIDIA SM80+). Unsupported model families pass through unchanged, so it's safe to leave in the graph. If you see quality drift, check whether Allow FP8 conversion got turned on - that's the first suspect, not the chunking.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| fused_qkv | COMBO | auto | auto uses compatible chunked QKV projection providers. ConvRot INT8 keeps its specialized path; checkpoint-native FP8 uses held FP8 projection. With Allow FP8 conversion, BF16/FP16 may be converted to FP8 E4M3. Unsupported quantized formats use standard Comfy QKV. off always uses standard H3 QKV. |
| mlp_memory | COMBO | auto | auto uses the ConvRot two-slice path when compatible and held chunked FP8 for FP8 checkpoints. With Allow FP8 conversion, ordinary BF16/FP16 weights may be converted to FP8 E4M3 when supported. Preserve precision keeps floating weights floating while retaining bounded MLP chunking. Explicit off remains off. |
| chunk_rows | INT | 4096256–65536 | Maximum token rows processed by one MLP or FinalLayer chunk. Larger chunks may be faster but use more activation memory. |
| preserve_precision | BOOLEAN | true | Legacy serialized workflow slot. The value is ignored; Precision mode is authoritative. |
| precision_mode | COMBO | Preserve precision | Preserve precision introduces no new weight quantization. Allow FP8 conversion permits supported BF16/FP16 QKV and MLP weights to be converted to FP8 E4M3 for additional memory/performance savings. |
| qkv_streaming_mode | COMBO | Auto | Off disables streamed QKV and preserves existing attention. Auto uses full-density Kitchen streaming when no explicit attention selector has claimed the input model, but preserves an explicit selector. Forced explicitly allows this node to replace dense attention with full-density Comfy Kitchen. An H3 Sparse Attention request is always authoritative. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |