VRGDG H3 Chunked Pass 2
MiniMax H3 Pass 2 in Bite-Sized Windows, for Scenes That Won't Fit
- latent
- model
- conditioning
- upscale_model
- sampler
- sigmas
- head_latent
- head_vae
- refined_av_latent
- chunk_report
The problem this thing solves
MiniMax H3 renders short: 4–15 seconds per clip, 24 fps, with the stereo audio generated jointly with the picture and living in the same latent. That same latent is why this node is picky about its input.
The normal 2 Pass workflow is the video version of hires fix: upscale the latent, then run a short low-denoise refine. It upscales every frame of the clip at once and samples the entire thing in one SamplerCustomAdvanced call - a memory bill most cards can't pay at 15 seconds and 2×. Chunked Pass 2 does the identical work one temporal window at a time: only the current window sits on the GPU, the refined pieces get stitched together on the CPU, and the first-pass audio comes out untouched.
How the windows actually work
H3 video tokens run on a 1,4,4,4,4 temporal cycle - five tokens is 17 pixel frames. So windows have to start on a multiple of 5 tokens and hold 5k + 2 tokens. Defaults come from the pack's A/B test: 3-second windows, 1.6 s overlap, locked mode, 0.7 s tail trim, per_window upscale.
Each window samples with a noise mask that zeroes the locked overlap, so the previous window's refined frames aren't re-rolled - they're context, not material. crossfade refines both copies of the overlap and blends them instead. The tail trim is the subtle one: the last 0.7 s of every window was sampled blind to what comes next, so it's thrown away and redone by the next window, which has refined history on its left and real content on its right. Audio comes through exactly as pass one produced it.
Inputs worth touching
latent must be the joint H3 video+audio latent, before any AV separation - the node validates the [B,24,T,H,W] video plus [B,32,2,T40] audio layout and refuses anything else. Then model, conditioning, sampler, sigmas as in any custom-sampler graph, and upscale_model, which is a VRGDG_MINIMAX_H3_LATENT_UPSCALE_MODEL from the pack's learned latent-upscaler loader.
The knobs that matter: chunk_seconds (smaller = less VRAM, more seams), overlap_seconds, overlap_mode, and scale. The optional ones are where the traps live - upscale set to whole_clip gives window edges real neighbours, but the upscaler then holds the entire clip, which defeats the point. max_window_tokens sizes windows by token budget instead of seconds (floor is 7 latent frames). head_latent/head_vae take a predecessor window from the masked-continuation nodes so its frames become the locked head of the refined clip.
Outputs are refined_av_latent (into VAE Decode, or Save Latent if you want it on disk) and chunk_report, a string listing the plan and each window's peak VRAM. Read it - it's the honest number on whether you need a smaller chunk_seconds.
Install
Manager → Install Custom Nodes → search vrgamedev, or:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl.git
Then install requirements with the Python that runs ComfyUI. Heads up: this pack's requirements.txt is heavy - demucs, llama-cpp-python, stable-ts, torchcodec, librosa. On Windows portable, do the README's pip install --upgrade pip setuptools wheel and Cython scikit-build-core step first - llama-cpp-python compiles when no wheel matches, and Python 3.12 is friendlier. Restart, then hard refresh the browser.
The learned upscaler itself needs ComfyUI 0.44.0+ (built in) or the Comfyui_Minimax_h3_latent_Upscaler pack on older builds, plus a model file in ComfyUI/models/latent_upscale_models/ whose filename contains minimax_h3_latent_upscaler - otherwise the loader's dropdown comes up empty.
Where people get burned
- Split the AV latent first and this errors out. The message is explicit: connect a joint H3 latent before AV separation.
- Odd clip lengths fail. The pass-one latent has to be
5k + 2tokens (17k+5 frames). Round-tripping through a trim or an odd resize and you'll get aValueErrorabout the token grid instead of a render. - Tail trim needs overlap.
tail_trim_secondsneeds at least two 5-token groups (1.6 s) of overlap; below that it silently trims nothing and you keep the weak tails you were trying to drop. - Masked continuation pins your ComfyUI version.
head_latentgoes through the pack's Apply Masked Continuation node, which needs the H3 per-token AV noise masks (ComfyUI 0.34.0+). - The Video Builder only swaps this in for Reference-to-Video and RefMod conditioning, above 8 s of rendered clip by default, and 2 Pass Advanced forces it off. On a hand-built Image-to-Video graph you're wiring it yourself.
- Seams are an eyeball judgement, not a setting. The pack's runtime test stubs the sampler; only a real render tells you if 1.6 s of overlap is enough.
Under 8 seconds a scene doesn't need this; the whole-clip pass is simpler and it fits. Past that, this node is the difference between a finished render and an OOM at pass two.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | The first-pass joint video+audio latent. | |
| model | MODEL | — | |
| conditioning | CONDITIONING | — | |
| upscale_model | VRGDG_MINIMAX_H3_LATENT_UPSCALE_MODEL | — | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| scale | FLOAT | 2.01–4 | — |
| chunk_seconds | FLOAT | 3.00.1–120 | — |
| overlap_seconds | FLOAT | 1.60–30 | — |
| overlap_mode | COMBO | locked pins the previous refined overlap while the next window samples. crossfade refines both versions of the overlap and blends them. | |
| seed | INT | 420–18446744073709550000 | — |
| tail_trim_secondsopt | FLOAT | 0.70–10 | Throw away this much of each window's tail (snapped to 0.708 s groups) and let the next window redo it with refined history on the left and content on the right. Needs an overlap of at least two groups (1.6 s). 0 keeps every window's tail. |
| max_window_tokensopt | INT | 00–2000000 | Size windows by video tokens instead of seconds. 0 turns the budget off. A budget below the smallest window (7 latent frames) uses that window and says so. |
| upscaleopt | COMBO | per_window upscales only the current window, so upscaler memory is one window. whole_clip upscales the entire clip first: window edges get real neighbours, but upscaler memory grows with the clip. | |
| head_latentopt | LATENT | Masked continuation: the predecessor window from VRGDG H3 Load Latent (masked_av). It becomes the locked first tokens of the refined clip. | |
| head_vaeopt | VAE | Video VAE, used only to resize a head that was saved at another size. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| refined_av_latent | LATENT | — |
| chunk_report | STRING | — |