Nodes/ComfyUI-Minimax-H3-Extender/MiniMax H3 Video Extender
ComfyUI Node

MiniMax H3 Video Extender

Make MiniMax H3 continue a video — not restart it

By pmhaidn·Created a day ago·Updated a day ago· 2
MiniMax H3 Video Extender
  • conditioning
  • latent
  • vae
  • prev_frames
  • prev_latent
  • prev_audio
  • audio_vae
  • conditioning
  • trim_frames
modeauto
context_length22
encode_modevideo
anchor_modehead
cropdisabled
audio_context_length22
audio_modetimeline

MiniMax H3 turns out beautiful 4–15 second clips with native audio, but it's a one-shot model in the way that matters: every new sample starts from a blank latent. Ask it for a second clip and it has zero idea how the first one ended - different camera, different subject, a soundtrack that restarts from silence. MiniMax H3 Video Extender is the fix. It's a drop-in conditioning adapter that sits between your H3 conditioning node and the sampler: feed it the tail of your previous clip and it returns conditioning that tells the denoiser "this is what just happened, keep going," motion and audio included.

Why this node exists

The stock ComfyUI H3 graph - conditioning node (Reference/Image/Text-to-Video from the official Comfy-Org pack) → KSampler → VAE decode - is fine for single clips. The moment you want a longer continuous take you hit the context wall. This node is the pack's answer to chaining clips, and it's optional on every connection: leave prev_frames and prev_latent unwired and it's a pure passthrough returning your conditioning untouched with trim_frames = 0, so it slots into an existing workflow and changes nothing until you actually connect a previous clip.

How it works

When you connect a previous clip, the node slices the tail of it - context_length frames, default 22 - and pins those frames onto the new clip's latent timeline through the conditioning. The sampler then denoises with real frames of the prior clip sitting at the head of the timeline, so it continues the motion instead of starting fresh. And because H3 generates audio jointly with video, it carries the previous clip's tail audio forward too, end-aligned on the new timeline (audio_mode = "timeline") so the soundtrack stays phase-locked instead of merely similar.

The one choice that actually matters is how you hand it the previous clip:

  • prev_latent - the sampler-output latent of the previous clip. It slices the motion guide and audio straight out of the latent, skipping the lossy VAE decode→encode round-trip - the quality path, and the reason this pack also ships MiniMax H3 Save/Load AV Latent: save clip 1's exact latent, then load it into prev_latent for clip 2. Connect a latent without prev_frames and it auto-decodes the reference frames from it.
  • prev_frames / prev_audio - decoded frames (and optionally audio) from a file or an earlier decode. The easy path for extending external MP4s, but you're round-tripping through the VAE - the source of the color drift and motion jitter people blame on the model. Feeding prev_audio also requires audio_vae.

The few inputs a beginner actually touches:

  • mode - auto (default) extends when a previous clip is wired and passes through otherwise; disabled forces passthrough; always_extend raises an error if nothing is connected, which is a handy guardrail in an automated batch.
  • context_length - default 22 frames pinned. H3's native run lengths (1, 5, 22, 39…) encode as one efficient video guide; 5 is lighter if you're tight on VRAM.
  • audio_context_length - defaults to following context_length; 0 does that, or set it explicitly for longer audio carryover.

Outputs are two: a conditioning (wire into KSampler) and trim_frames (an INT) - and this is where people get burned. Because the pinned context sits at the head of the new timeline, your decoded clip includes those overlapping frames. Drop them by wiring trim_frames into MiniMax H3 Extension Trim, which cuts the same leading frames from both video and audio so sync never drifts - skip it and every extension glues a frozen, duplicated head onto the seam.

Install

The pack is tiny and its only hard dependency is OpenCV:

cd ComfyUI/custom_nodes
git clone https://github.com/pmhaidn/ComfyUI-Minimax-H3-Extender.git
pip install -r requirements.txt

Easier: ComfyUI Manager → search MiniMax H3 Extender → Install, then restart. Or comfy node install comfyui-minimax-h3-extender. This pack does not include the H3 model - you still need the official Comfy-Org MiniMax H3 nodes for the base conditioning and the VAEs. Two H3 facts before you build the whole chain: the weights run ~33B/~42.5 GB (serious VRAM), and the Community License geofences local-weights use out of the US, EU, UK and Korea - check you're in the Applicable Territory first.

Common issues

  • Nothing extends and I expected it to. In auto mode that's correct behavior when nothing is wired. If you're automating, switch to always_extend so a missing connection fails loudly.
  • Duplicated/frozen frames at the seam. You skipped the trim. Wire trim_frames into MiniMax H3 Extension Trim.
  • Colors drift or motion jitters between clips. You fed decoded prev_frames where a prev_latent was available. Latent-in, latent-out is the point of this pack's recommended workflow.
  • Crashes that look Turbo-LoRA-related. The pack hot-patches the ComfyUI-MiniMax-H3-Turbo AdaLN forward at load so reference and audio tokens don't blow up shape matching - automatic, nothing to configure, but it does assume that Turbo pack is present and compatible.
Categoryconditioning/minimax

Inputs (14)

NameTypeDefaultDescription
conditioningCONDITIONINGConditioning from MiniMaxH3ReferenceToVideo, MiniMaxH3ImageToVideo, or TextToVideo.
latentLATENTEmpty H3 AV latent for the NEW clip (from the conditioning node).
vaeVAEMiniMax H3 video VAE.
modeCOMBOautoauto: extend if prev_frames is wired, else generate new video. disabled: bypass extend entirely. always_extend: fail if prev_frames is not wired.
context_lengthINT221–39Number of frames from previous video to pin (typically 22 or 5).
encode_modeCOMBOvideovideo: compresses motion into latent space (recommended).
anchor_modeCOMBOheadhead: pinned frames at start of timeline, trimmed after decode.
cropCOMBOdisabledCrop mode when resizing context frames to target resolution.
audio_context_lengthINT220–240Frames of tail audio to carry over. 0 follows context_length.
audio_modeCOMBOtimelinetimeline: phase-locked seamless sound continuation.
prev_framesoptIMAGEDecoded frames of previous video clip (e.g. from Load Video / VAEDecode).
prev_latentoptLATENTSampler output latent of previous clip. When connected, extracts motion guide and audio directly from the sampler latent without a lossy VAE decode/encode round-trip, preventing color drift and motion jitter.
prev_audiooptAUDIODecoded audio of previous clip (if prev_latent is not available).
audio_vaeoptVAEMiniMax H3 audio VAE (required when using prev_audio).

Outputs (2)

NameTypeDescription
conditioningCONDITIONINGConditioning with motion context applied (or original conditioning if bypassed).
trim_framesINTNumber of pinned leading frames to trim. Wire to MiniMax H3 Contex Loop Trim.