Nodes/MiniMax H3 Context Loop/MiniMax H3 Pixel Continuity • Protect Tail
ComfyUI Node

MiniMax H3 Pixel Continuity • Protect Tail

Stop USDU from re-inventing the frames you already generated

By ethanfel·Created 2 months ago·Updated a day ago· 516
MiniMax H3 Pixel Continuity • Protect Tail
  • state
  • video
  • video
  • mask
  • anchor_context
  • continuity
  • status

Long-form video is chaining, and chaining has one recurring injury: the seam. H3's masked-AV continuation clips carry a repeated RAW prefix - the previous scene's tail, re-fed as context - and when you later pixel-upscale that second clip with USDU, the upscaler happily re-samples those 39 frames into something subtly different from the HQ tail you already approved. Now the join has a visible step in it that was never in your checkpoint.

Protect Tail removes that failure mode by refusing to let the upscaler touch the carried head at all.

How it works

For scenes explicitly marked Continue previous shot (pixel upscale) in Checkpoint Manager, this node opens the previous saved HQ scene and the incoming DLSS output of the current one, streams both, and writes a new video where the repeated head frames are the previous HQ tail pixels. No frame blending, no retiming, no audio change. It then builds the two things USDU needs: a mask that is zero across the carried prefix and one across the rest - the region pass 2 is allowed to refine - and anchor_context=True, so the upscaler treats that head as fixed rather than inferred.

The contracts are strict and checked frame by frame. Both clips must be 24 fps, the same size, and the exact expected frame count, with timestamp drift under a thousandth of a second. The previous scene must be adjacent, and the scene's visual context has to be exactly one previous-shot tail of the same length as the RAW overlap: raw_frames - delivered_frames. If the scene's saved context isn't literally the selected previous scene's ending, this errors rather than guessing. Marks live in the Checkpoint Manager's workflow selection, and they're revision-bound - change either take and the mark is dropped.

Unmarked scenes take the fast exit: no mask allocation, no media decode, no disk I/O, and the video passes through untouched. An unmarked shot returns False anchor context and no continuity payload, which is exactly what the old graph did.

The file-backed VIDEO transport comes from ComfyUI-ContextAnchoredTile-videopath, resolved by node registration rather than install path - and it's used purely as transport. No CAT refinement is involved.

Inputs and outputs

  • state - the upscale-loop scene state.
  • video - the incoming DLSS/USDU-side video for the current scene.

Outputs: video (the tail-protected clip) goes into the USDU node; mask goes to its temporal mask input; anchor_context feeds the matching anchor socket; continuity goes to MiniMax H3 Pixel Continuity • Finish, which restores the protected head exactly afterwards and optionally fades a small per-channel tone correction into the new footage; status names what happened, including the "Independent shot" path.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/seitanism/ComfyUI-H3-Motion-Context-MultiRef.git
git clone --branch main https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop.git

Restart, then add the CAT videopath pack from ComfyUI Manager if you don't have it - without it the node raises a plain "requires ComfyUI-ContextAnchoredTile-videopath" error the moment a marked scene runs. The pack itself is listed in Manager as MiniMax H3 Context Loop. Weights aren't shipped; H3's licence also excludes the US, EU, UK and South Korea from its territory, so check your position before running local weights.

Does it actually help?

The pack published its own numbers, and they're refreshingly modest. On a real two-clip continuation (512×288, 124-frame clips, 39-frame overlap, delivered 209 frames), the mean absolute RGB difference at the join dropped from 0.042417 to 0.035590 - about 16% - and the join-difference-to-nearby-frame ratio went from 1.28 to 1.08, which is the more meaningful one. Brightness drop across three frames improved from 0.0030 to 0.0019. The restored 39-frame prefix matched the prior HQ tail exactly in decoded RGB16, and delivered audio stayed bit-identical. That's a motion-sensitive diagnostic, not a perceptual score, but a 16% reduction in a seam metric is real.

Where people get burned

The mark is the whole feature. If Protect Tail reports an independent shot and you expected protection, you either didn't tick the box, ticked it for a hard cut, or the mark got discarded because a take changed. Start one scene earlier than the scene you care about and keep its saved HQ result in the same profile - a marked scene needs its predecessor present and already upscaled.

Feed it the RAW scene. A trimmed MP4 or an assembled chapter fails the frame-count and clock checks; editorial trims belong at assembly. And these results are profile-bound: resuming an old profile whose recipe no longer matches is how you get confusing mid-branch failures.

Categoryconditioning/minimax/context_loop/upscale

Inputs (2)

NameTypeDefaultDescription
stateH3_CHAIN_UPSCALE_STATE—
videoVIDEO—

Outputs (5)

NameTypeDescription
videoVIDEO—
maskMASK—
anchor_contextBOOLEAN—
continuityH3_PIXEL_CONTINUITY—
statusSTRING—