Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Existing Video Context
ComfyUI Node

MiniMax H3 Existing Video Context

Start an H3 chain from footage you already have

By ethanfel·Created 17 days ago·Updated about 18 hours ago· 315
MiniMax H3 Existing Video Context
  • plan
  • source_video
  • source_frames
  • source_audio
  • external_context
  • status
source_fps24.000
prepend_originaltrue

MiniMax H3 Existing Video Context is how you turn "generate a movie from nothing" into "continue this clip I already have." It takes an existing video - from core Load Video, or a decoded frame batch from VHS - and makes it scene 1's visual and audio predecessor, exactly as if it had been generated by the chain itself. Combined with prepend_original, it's the tool for extensions and continuations where the original footage should lead and H3 picks up from its tail.

The main thing to understand is the asymmetry: this node doesn't feed the whole clip into H3. It prepares the tail as context. Just like a later scene carries its predecessor's last frames forward, scene 1 here carries the imported video's last frames - that's the external_context output, a typed object for Loop Start that contains the small recursive context plus verified prelude artifact paths. The rest of the clip is parked on disk and only surfaces again at assembly time, when prepend_original places the normalized original before the generated scenes.

The inputs

  • plan - the active H3 Chain Plan. Its canvas, crop, context length, quality and run folder determine how the imported tail is prepared. This is why the node has a Plan input at all: it conforms your footage to the chain's geometry.
  • source_video (optional) - a native ComfyUI VIDEO. Its frames, embedded audio and exact FPS are decoded directly. Preferred when you have it.
  • source_frames (optional) - a decoded IMAGE batch from VHS or another loader. If you go this route, set source_fps to the loader's actual output rate. Connect either source_video or source_frames, never both.
  • source_audio (optional) - the soundtrack, for the source_frames route, or to override a native VIDEO's embedded audio. Its tail can seed scene 1 audio.
  • prepend_original - default true. Persists a normalized copy of the complete existing video and places it before generated scenes during assembly. Turn it off if you only want the extension.

The status output reports source/normalized frame counts, context duration, audio availability and prepend status - genuinely useful the first time you feed it oddly-shaped footage, because it tells you what actually got normalized.

How it fits the loop

Its external_context output connects to Loop Start's optional external_context input. When connected, scene 1 continues from that video's tail, and its repeated head is trimmed exactly like every later scene's - so the whole loop treats scene 1 as "just another continuation." That consistency is the point: you don't get a different code path for imported video, you get the same context machinery pointed at footage instead of a checkpoint.

Installing it

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

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

Restart ComfyUI. You'll want ffmpeg on PATH for the prepend/assembly normalization (PyAV is the fallback). H3 weights and a current ComfyUI (native Add Guide, PR #15439) are the standing requirements.

Common issues

The classic mistake is connecting both source_video and source_frames - the node rejects that, and rightly, because it can't reconcile two frame sources. Also, with source_frames, forgetting source_fps means your context tail is the wrong duration; set it to the loader's actual rate, not a guess. And when a continuation drifts or jumps at the handoff, check that the Plan's crop matches your footage shape - a mismatched aspect ratio gets resized or center-cropped, and either changes framing mid-run.

Categoryconditioning/minimax/contex_loop

Inputs (6)

NameTypeDefaultDescription
planH3_CHAIN_PLANThe active H3 Chain Plan. Its canvas, crop, context length, quality, and run folder are used to prepare the imported video tail.
source_fpsFLOAT24.0000.001–1000Actual frame rate represented by source_frames when using the separate IMAGE/AUDIO route. It is ignored when source_video is connected, because native VIDEO carries its own exact FPS.
prepend_originalBOOLEANtruePersist a normalized copy of the complete existing video and place it before generated scenes during partial/final assembly. Disable to output only the extension.
source_videooptVIDEONative ComfyUI VIDEO from core Load Video or another VIDEO-producing loader. Its frames, embedded audio, and exact FPS are decoded directly. Connect either source_video or source_frames, not both.
source_framesoptIMAGEDecoded IMAGE batch from VHS or another video loader. Set source_fps to the loader's actual output rate. Connect either source_frames or source_video, not both.
source_audiooptAUDIOOptional soundtrack decoded from the existing video. Use it with source_frames, or connect it to override a native VIDEO's embedded audio. Its tail can seed scene 1 audio; when prepend is enabled it is preserved before the extension.

Outputs (2)

NameTypeDescription
external_contextH3_CHAIN_EXTERNAL_CONTEXTTyped imported-video tail for Loop Start. It contains only the small recursive context plus verified prelude artifact paths.
statusSTRINGSource/normalized frame counts, context duration, audio availability, and prepend status.