Nodes/ComfyUI_JR_MiniMaxH3Node/JR MiniMax H3 Temporal Chunk Sampler
ComfyUI Node

JR MiniMax H3 Temporal Chunk Sampler

Sampling long H3 clips in chunks — and the honest limits of phase 1

By Goldlionren·Created 21 days ago·Updated about 9 hours ago· 28
JR MiniMax H3 Temporal Chunk Sampler
  • noise
  • guider
  • sampler
  • sigmas
  • latent_image
  • output
  • status
chunk_duration_seconds15.0
aggressive_memory_cleanupfalse

Long videos are where H3's VRAM bill starts to hurt: the latent and the intermediate activations grow with the number of frames, and a 20-second clip can blow past what a consumer card holds. The JR H3 Temporal Chunk Sampler is this pack's phase-1 answer: instead of sampling the whole timeline at once, it slices the AV latent along the shared timeline, samples each chunk with ComfyUI's native SamplerCustomAdvanced, and writes the results straight into CPU-preallocated buffers. Sampling memory stays bounded by one chunk instead of the whole video.

The interface is deliberately the standard advanced-sampler contract: noise, guider, sampler, sigmas, latent_image in - output (LATENT) plus a status string out. If you know SamplerCustomAdvanced, you know this node. chunk_duration_seconds (default 15, tooltip: "Approximate maximum chunk duration. Internal cuts align to H3's 17-frame cycle.") sets the chunk size, and aggressive_memory_cleanup (default off) runs ComfyUI's soft_empty_cache after each chunk - the README says it's usually slower, so leave it off unless you're chasing OOMs.

Read the phase-1 fine print before you trust it

This is where most people get burned, so the README is blunt about it:

  • No cross-chunk continuity. There's no hidden-state carry, no overlap/blending, no boundary resampling. Each chunk is sampled as its own short clip by the native sampler. That means the result is not numerically equivalent to a single full-length sample, and boundary continuity isn't guaranteed. It's a memory-reduction tool, not a free lunch.
  • Cut points follow H3's real rhythm. Video latent ticks on the 5-token/17-frame cycle; audio ticks at 40Hz. The node aligns cuts to the video's 17-frame cycle, then converts to audio boundaries from the same global 24fps frame line - it slices a shared timeline, not two independent lengths.
  • noise_mask is rejected outright. The node can't safely guess how a mask maps across the packed video/audio streams, so it refuses instead of guessing.
  • minimax_keyframes get rejected too. Native keyframes use absolute frame numbers across the full timeline, and with no public chunk-offset contract the node refuses rather than silently misplacing your keyframe conditioning. Reference conditioning doesn't use such anchors, so it flows through normally.

Noise handling is worth a note: single-chunk runs use your input noise as-is (native seed semantics preserved); multi-chunk runs derive a stable per-chunk sub-stream from the official RandomNoise (base seed + absolute frame_start), so same-shape chunks are reproducible but not bit-identical. DisableNoise keeps its native all-zero semantics. Other generic noise objects are rejected because ComfyUI has no public clone/offset protocol for them.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Goldlionren/ComfyUI_JR_MiniMaxH3Node
<your-comfyui-python> -m pip install -r ComfyUI_JR_MiniMaxH3Node/requirements.txt

or ComfyUI Manager → search ComfyUI_JR_MiniMaxH3Node.

Troubleshooting

  • Seams/popping between chunks - that's the documented phase-1 limitation, not a bug. Reduce chunk_duration_seconds only if you're memory-bound; don't expect chunk count to be free.
  • "Unsupported noise" error - you fed a generic/custom noise object. Use RandomNoise or DisableNoise (or sample in one chunk, which uses native single-pass semantics).
  • Keyframes refused - expected for now; the pack explicitly declines to fake a chunk-position contract.
CategoryJR MiniMax H3/Sampling

Inputs (7)

NameTypeDefaultDescription
noiseNOISE
guiderGUIDER
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT
chunk_duration_secondsFLOAT15.01–3600Approximate maximum chunk duration. Internal cuts align to H3's 17-frame cycle.
aggressive_memory_cleanupBOOLEANfalseRun ComfyUI soft_empty_cache after each completed chunk. Slower; normally leave disabled.

Outputs (2)

NameTypeDescription
outputLATENT
statusSTRING