Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Contex Loop Segment + Checkpoint
ComfyUI Node

MiniMax H3 Contex Loop Segment + Checkpoint

Checkpoint your MiniMax H3 scene before you're allowed to be happy with it

By ethanfel·Created 17 days ago·Updated about 18 hours ago· 315
MiniMax H3 Contex Loop Segment + Checkpoint
  • state
  • images
  • sampled_latent
  • audio
  • images_with_overlap
  • denoised_latent
  • segment
  • status

Segment Save is the durability layer of the Contex Loop pack - the node that takes one finished H3 scene and writes it down properly, so you can review it, resume the chain from it, and eventually assemble the full movie from the pieces. It's the direct descendant of the "Save Latent" idea from NikoDemon80's H3 Motion Context, rebuilt for the 0.5 checkpointed production model.

The whole recursive-loop design depends on this being a hard boundary: every scene is written to disk before Review Gate appears and before Loop End recurses into the next scene. That's why a six-scene production can resume from scene four instead of restarting at one - scenes one through three are already safe in their checkpoint files.

What it actually saves

Feed it the state from Current Shot (which scene this is), the delivered images after Loop Trim (the frame count must exactly match the scene's planned delivered length - a mismatch is a hard error, not a warning), and the raw sampled_latent from the sampler before VAE decoding. From those it writes:

  • an H.264 MP4 of the delivered clip,
  • a safetensors resume checkpoint containing the compact AV streams,
  • the exact prompt metadata, so what you actually generated is recoverable even if you've since edited the Plan,
  • a generated-audio WAV sidecar (when you connect the audio input),
  • and workflow-recovery sidecars for later reconstruction.

Optional inputs add headroom: images_with_overlap from Loop Trim (only needed when video_blend_frames is above 0, for blend-ready assembly), and denoised_latent from SamplerCustomAdvanced - the explicit clean x0 saved alongside the terminal sampler output so a deferred learned upscaler can prefer it.

The audio caveat

The audio input deserves attention. It wants the decoded audio after Loop Trim with match_tail enabled - connect Trim's audio output directly, and the private AV overlap gets checkpointed too. The README is blunt: connect it in every audio mode to preserve H3's generated sound as WAV sidecars; it's required for generated_audio and for synchronized Review Gate review. The bundled generation workflow already makes this connection for you, and final assembly reads the saved sidecars without needing a separate audio wire. If your saved scenes come out with no sound at assembly, this is where you missed a wire.

Outputs: segment (the persisted scene record, wired to Review Gate and Loop End) and a status string with the saved scene number, paths, frame count and duration.

Install

Part of ComfyUI-MiniMaxH3-Contex-Loop. ComfyUI Manager → search "ComfyUI-MiniMaxH3-Contex-Loop", or:

cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop.git

Restart. No pip requirements - the pack rides on ComfyUI's own video/audio plumbing. ffmpeg on PATH is preferred for encoding; ComfyUI's bundled PyAV is the fallback. Current ComfyUI with the native Add Guide for MiniMax H3 node (PR #15439) is expected. Models aren't bundled, and the MiniMax H3 weights are geofenced out of the US/EU/UK/South Korea by the Community License.

Where people get burned

Frame-count mismatch is the classic one: if the images you hand in don't match the planned delivered length, the save fails loudly. The other is treating this node as optional. It's not decorative - the review gate, resume, and assembly all read from what it wrote. Skip it or wire it wrong and your "checkpointed production loop" is just an expensive sampler with extra steps.

Categoryconditioning/minimax/contex_loop

Inputs (6)

NameTypeDefaultDescription
stateH3_CHAIN_STATECurrent state from H3 Chain Current Shot.
imagesIMAGEDelivered images AFTER MiniMax H3 Contex Loop Trim. The frame count must exactly match this scene's planned delivered length.
sampled_latentLATENTRaw sampler output for the current scene, before VAE decoding. Its compact AV streams are saved for checkpoint resume and audio context.
audiooptAUDIODelivered decoded audio AFTER MiniMax H3 Contex Loop Trim with match_tail enabled. Connect Trim's audio output directly so its private AV overlap can also be checkpointed. Connect it in every audio mode to preserve H3's generated sound as WAV sidecars. Required for generated_audio and synchronized review. The bundled generation workflow already makes this connection; final assembly reads the saved sidecars without another audio wire.
images_with_overlapoptIMAGEBlend-ready output from Loop Trim. Required only when Plan video_blend_frames is above 0. It contains the retained repeated head followed by the normal delivered frames and is saved as a separate disk-backed assembly artifact.
denoised_latentoptLATENTOptional SamplerCustomAdvanced denoised_output. Saved beside the terminal sampler output so a deferred learned upscaler can prefer explicit clean x0 while older checkpoints remain usable.

Outputs (2)

NameTypeDescription
segmentH3_CHAIN_SEGMENTPersisted scene record for Review Gate and Loop End.
statusSTRINGSaved scene number, video/checkpoint paths, frame count, and duration.