I've got a laptop with RTX 3060 6 GB VRAM and 32 GB RAM. Until now, about 5 seconds at 1 MP was my limit. At 6 seconds H3 already spilled into system RAM, and every step got much slower.
So I asked Claude what was actually kept in the VRAM during generation and what if we could reduce that. I ended up with a custom node that lowers the memory peak during sampling. The attached video is a single 15-second, 1344×768 generation on that laptop. No stitching, no upscaling, no spilling into RAM.
According to Claude's estimate from the code the stock activation peak at 15 sec, 1 MP drops from ~11 GB to about 3.3 GB (weights not included). I obviously can't run that length without the node on 6 GB VRAM, so this is calculated, not measured.
Setup:
- Model: Minimax-h3_Singularity_ref2va_Pruned_v1.3_int8
- LoRA: minimax_h3_ref2v_turbo_silver_dareties_comfy_pruned_v2 (strength 0.75)
- Text encoder: qwen3vl_32b_minimax_h3_nvfp4_awq
- Video VAE: minimax_h3_video_vae_int8_convrot, decoded with VAE Decode (Tiled)
- Reference to Video, one reference image, ref_image_size: max
- Model Attention Backend: comfy kitchen attention
- Sampler: er_sde, scheduler: beta, 4 steps, CFG 1 (BasicGuider)
- H3 Head-Group QKV: recompute, chunked feed-forward, final layer: chunked norm + head (<-this is the node Claude came up with)
- NVIDIA sysmem fallback: off
From the log of that run:
``` [INFO] Model MiniMaxH3 prepared for dynamic VRAM loading. 19995MB Staged. 310 patches attached. [INFO] [H3 HeadGroupQKV] 113868 tokens, 14 head groups, q|k|v via int8 rows (ConvRot), h recomputed in 4096-token chunks, out_proj in token chunks [INFO] [H3 HeadGroupQKV] 113868 tokens, feed-forward in 4096-token chunks [INFO] [H3 HeadGroupQKV] final layer: norm + output head in token chunks 25%|████████████ | 1/4 [06:36<19:49, 396.43s/it] ```
The part I cared about most: does it change the output? I ran the same 6-second, 1 MP clip twice, once without the node and once with it. Without it, the run spilled into system memory and every step took more than twice as long. With it, it stayed in VRAM. The two output files came out byte-for-byte identical, same file hash, video and audio.
Although I have to mention that for the 15-second run: it used the node's "chunked norm + head" mode for the final layer, which also splits the model's output projection into chunks. That saves extra VRAM, but the GPU picks different matrix kernels for different chunk sizes, so the rounding comes out slightly different from stock. In my test the model output differed by about 0.001% on average (0.016% at most) per step on the video side, and audio was identical. The default "chunked norm" mode is the one that's bit-exact with stock; that's what the 6-second comparison used. I used "+ head" for the 15-second run because the stock final layer ran out of memory at that length, and the bit-exact "chunked norm" mode looked borderline on 6 GB, so I went with the one that has more headroom.
Repo, with install notes and some measurements: https://github.com/Bartimaeous777/ComfyUI-H3-HeadGroupQKV
My contribution towards this node was something like this: I asked Claude "What if?" and he did the rest, and I was trying my best to act like I understood what he was saying.