Nodes/H3 Temporal Sampler/H3 Temporal Sampler
ComfyUI Node

H3 Temporal Sampler

Getting a 2K MiniMax H3 render onto the GPU you actually own

By ehsrzv·Created 22 days ago·Updated 15 days ago· 5
H3 Temporal Sampler
  • noise
  • guider
  • sampler
  • sigmas
  • latent_image
  • output
  • denoised_output
◄Enabletrue►
◄Num Segments4►
◄Smart Boundsfalse►
◄Overlap Frames5►
◄Blend Modemultiband►
◄Seam Locktrue►
◄Seam Lock Frames2►

H3's 2K output is the pitch, and also the wall

MiniMax H3 is the 33B omni-modal model that turns out 4–15 second clips at up to 2K/24fps with native stereo audio, generated alongside the picture rather than bolted on after. The size is the selling point and the problem: a single pass over the full audio-video latent is fine at 768p, then you run the latent-upscale stage toward 2K and your card quits.

H3 Temporal Sampler knocks that wall down. It's a drop-in replacement for SamplerCustomAdvanced that cuts the latent into overlapping segments along the time axis, denoises each inside a VRAM budget, and joins them back into one continuous AV latent. Fit-the-thing lever, not a speed lever.

One caveat first: H3's Community License excludes the US, EU, UK and South Korea from its applicable territory, outputs included. Not the pack's fault, but a bad surprise to find late.

How the tiling actually works

H3's latent isn't a normal tensor. It's a NestedTensor holding video [B, 24, Tv, H, W] and audio [B, 32, 2, Ta] side by side. The sampler unbinds it, plans cut points on the time axis, and re-packs the pieces.

Two details do the heavy lifting:

  • Everything snaps to a grid of 5 latent frames (roughly 17 pixel frames - the model's keyframe-token block). Boundaries, overlap, all of it. A cut mid-block leaves you with half a block, and H3 can't denoise half a block coherently.
  • The noise is sliced, not regenerated. One full-length noise field is generated, each segment takes its slice, and every segment gets the same seed. So neighbours' overlap regions start from identical noise and see identical per-step noise throughout - they denoise to nearly the same thing, and the crossfade blends two agreeing samples instead of hiding a disagreement.

Segments are edge-padded to a common length so the model compiles once instead of once per segment, then trimmed back. The last one is extended backward instead of padded, because its tail is never cross-faded - padding would stamp replicated frames onto your final frame. With Seam Lock on (default), the leading frame or two of each later segment are pinned to the already-merged timeline through the denoise mask, releasing gradually. (The class docstring still describes an older step-synchronised scheme; v1.5 samples segments one after another, then merges.)

The inputs and outputs that matter

Five wires work exactly like SamplerCustomAdvanced: noise, guider, sampler, sigmas, latent_image. latent_image must be the full-length H3 AV latent - the shipped example workflow builds it with the core AV concat node, then feeds the same noise/guider/sampler/sigma chain you'd otherwise hand SamplerCustomAdvanced.

The widgets you'll actually touch: Num Segments (default 4, 1–10), your VRAM dial - more segments, shorter segments, less memory. Overlap Frames (default 5, 5–20 in steps of 5), how much neighbours share; bigger is smoother and slower. Seam Lock Frames (default 2, 1–4), where 1 is a hard single-frame lock and 2–4 tapers it out. Blend Mode - linear, adaptive (rushes through frames that disagree), or multiband (default; blends fine detail over a narrow band, which is what you want when texture is the thing that would otherwise flicker). And two toggles: Enable, off making the node a plain SamplerCustomAdvanced; and Smart Bounds, which puts boundaries at motion valleys instead of evenly, falling back to even spacing when it can't.

Outputs are output (the merged latent - to VAEDecode and VAEDecodeAudio, or another sampler stage) and denoised_output (the sampler's x0 prediction, merged the same way; it mirrors output if the guider reports no x0).

Install

cd ComfyUI/custom_nodes
git clone https://github.com/ehsrzv/comfyui-h3_temporal_sampler.git

Restart ComfyUI, or search h3-temporal-sampler in ComfyUI Manager. There's no requirements.txt and nothing to pip install - plain Python on top of ComfyUI and torch. Both nodes land under the h3 temporal sampler category. You need a recent ComfyUI, a working H3 setup, and an H3 AV latent to feed it.

Tuning, and what goes wrong

Still OOM? Raise Num Segments. The cap is computed from frame-pixels - the author's validated reference is 34 latent frames at 84×144 - so higher resolutions get shorter segments automatically.

Expect slower, not faster. Each segment is a full denoise pass: four segments means four passes where there used to be one.

What the console tells you:

[H3TemporalSampler] expected an H3 AV latent (nested samples), got <class 'torch.Tensor'>

Plain latent in the latent_image slot; it wants the nested AV one.

[H3TemporalSampler] num_segments adjusted to 3 for 12 latent frames

A short latent can't be cut into that many grid-snapped segments. Harmless.

[H3TemporalSampler] seam quality (lower is better): boundary0: multiband ov=5 score=1.12 CHECK

CHECK flags a score of 1.0 or worse at that join. Bump Overlap Frames up a step, and/or raise Seam Lock Frames.

If the tiling widgets look greyed out, that's the pack's front-end extension working: it disables them whenever Enable is off, and disables Seam Lock Frames whenever Seam Lock is off.

And when you want to stop re-running stage 1 while you tune this, use the pack's other node, H3 Latent Cache - core Save/Load Latent won't survive an H3 latent.

Categoryh3 temporal sampler

Inputs (12)

NameTypeDefaultDescription
EnableBOOLEANtrueON: tiled sampling with overlap blending. OFF: one plain pass over the full latent, like SamplerCustomAdvanced.
noiseNOISEFull-length noise field; sliced per segment so overlaps share identical initial noise.
guiderGUIDERConditioning guider (prompt + reference). Applied identically to every segment.
samplerSAMPLERSampler algorithm used for every segment.
sigmasSIGMASSigma schedule; identical for every segment so the tiles match.
latent_imageLATENTFull-length H3 AV latent to denoise in tiled segments.
Num SegmentsINT41–10How many overlapping time segments the latent is split into.
Smart BoundsBOOLEANfalseON: place segment boundaries at motion valleys (low-motion points) instead of even spacing. Falls back to even spacing if infeasible.
Overlap FramesINT55–20Overlap between neighbours, snapped to multiples of 5 latent frames. Larger = smoother joins, more compute.
Blend ModeCOMBOmultibandJoin style for the final assembly: linear (straight ramp) / adaptive (rushes through disagreeing frames) / multiband (fine detail blended narrowly, best for fine textures).
Seam LockBOOLEANtrueON: pin each segment's leading frame(s) to the merged timeline (seam lock via denoise mask). OFF: pure crossfade blending.
Seam Lock FramesINT21–4How many leading frames of each segment are pinned (1 = hard single-frame lock; 2-4 = tapered lock releasing gradually). Clamped to the overlap.

Outputs (2)

NameTypeDescription
outputLATENT—
denoised_outputLATENT—