Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Upscale Segment Save
ComfyUI Node

MiniMax H3 Upscale Segment Save

Persist one upscaled MiniMax H3 scene so the rest of the chain (and a Drift-Control scene) can use it

By ethanfel·Created 17 days ago·Updated about 18 hours ago· 315
MiniMax H3 Upscale Segment Save
  • state
  • images
  • upscaled_latent
  • recovered_audio
  • segment
  • status

Upscale Segment Save is the child-loop twin of the main loop's Segment + Checkpoint node: it persists one trimmed, upscaled scene as a self-contained assembly checkpoint so the child loop can resume, merge, and keep going. But it has one extra job the generation-side save doesn't: it must always retain the small HQ tail that a following Drift-Control scene needs, while making the full HQ latent optional.

That split - "always keep the small, sometimes keep the large" - is the design detail that makes long upscale chains affordable. If every upscaled scene required persisting its entire HQ latent, a 6-scene chain would balloon the run folder and slow every checkpoint write. So the node guarantees the compact context tail that continuity and resume actually need, and leaves the big latent to a switch.

What it does

Inputs: state (the current child-run state from Upscale Current) and images - the decoded HQ RAW scene frames including the source scene's repeated head. This node trims that head exactly, so the persisted scene's frame count matches the delivered contract rather than the raw one. That's the same trim discipline the generation side applies, and it's what keeps the child loop's frame accounting honest.

Optional upscaled_latent - the final HQ latent. The tooltip is explicit: required when save_latent is enabled and whenever a following Drift-Control scene needs its compact HQ context tail. So even with save_latent: false on the Adapter, if your loop chain includes a Drift-Control refinement, the tail still gets saved.

Optional recovered_audio - RAW-clock audio from an H3 Audio Recover node (the de-rope path). When connected, Segment Save applies the same repeated-head trim to audio as it does to video and replaces the source checkpoint audio - so the persisted scene's sound matches the refined picture, not the original generation's.

Outputs: segment (the verified HQ scene record for Upscale Loop End) and status (saved scene path, dimensions, and whether the HQ latent was persisted).

Why the tail matters

The Drift-Control family in this pack's continuation modes keeps the accepted predecessor clean while a per-model-evaluation mask protects the seam. For that to work across an upscale, the next scene needs the predecessor's HQ context - which is exactly the compact tail this node guarantees. Skip saving it and a Drift-Control scene downstream has nothing to anchor to, and you're back to generational drift across your upscaled scenes.

Install

From ComfyUI-MiniMaxH3-Contex-Loop. ComfyUI Manager → search the pack, or:

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

Restart. No pip deps; current ComfyUI with native Add Guide for MiniMax H3 expected; H3 weights not bundled (and geofenced out of the US/EU/UK/South Korea under the Community License).

Gotchas

The images input must be the RAW frames with the repeated head still present - this node is what removes it. Feed it trimmed frames and the trim math double-cuts, producing a scene shorter than the contract, which the loop will flag. And if you're using a Drift-Control continuation, don't set out to economize by skipping upscaled_latent: the compact tail is exactly what you'd be losing, and the savings aren't worth the drift.

Categoryconditioning/minimax/contex_loop/upscale

Inputs (4)

NameTypeDefaultDescription
stateH3_CHAIN_UPSCALE_STATECurrent child-run state from Upscale Current Scene.
imagesIMAGEDecoded HQ RAW scene frames, including the source scene's repeated head. This node trims it exactly.
upscaled_latentoptLATENTFinal HQ latent. Required when save_latent is enabled and whenever a following Drift-Control scene needs its compact HQ context tail.
recovered_audiooptAUDIOOptional RAW-clock audio from H3 Audio Recover. When connected, Segment Save applies the same repeated-head trim as video and replaces the source checkpoint audio.

Outputs (2)

NameTypeDescription
segmentH3_CHAIN_UPSCALE_SEGMENTVerified HQ scene record for Upscale Loop End.
statusSTRINGSaved scene path, dimensions, and HQ latent persistence result.