Nodes/MiniMax H3 Extender/MiniMax H3 Video Merge (Concat)
ComfyUI Node

MiniMax H3 Video Merge (Concat)

Stitch MiniMax H3 clips without the pop, the stutter, or the drift

By pmhaidn·Created 21 days ago·Updated 21 days ago· 10
MiniMax H3 Video Merge (Concat)
  • images_b
  • images_a
  • audio_a
  • audio_b
  • images
  • audio
◄seam_smooth1►
◄blend_frames0►
◄color_matchseam_fade►
◄fps24.000►

So you used MiniMax H3 Video Extender to generate clip 2 as a continuation of clip 1, decoded both, and now you have two frame sequences and two audio tracks that are supposed to be one video. A naive concat gets you the telltale seam: a one-frame brightness pop where clip 2's exposure doesn't match clip 1's tail, a hesitation on clip 2's first generated frame, and - if your audio came from a file on one side and a latent decode on the other - sample rates that don't even agree. MiniMax H3 Video Merge (Concat) is the "join them cleanly" step in this pack: it takes the two clips, fixes the seam, and hands you one images stream and one audio stream ready for your video encoder.

What it does

images_b is the current, newly rendered clip (required). images_a is the previous clip (optional). The naming trips everyone once: a = old, b = new. If images_a is empty the node passes images_b straight through, so it's safe to leave sitting in a single-clip workflow. When both sides are present, it does four things in order:

  1. Resolution-aligns. If the two clips differ in size, images_a is upscaled with Lanczos to match images_b's canvas - so the new clip's resolution is the one that wins.
  2. Color-matches images_b to images_a. The default color_match = "seam_fade" matches luminance and chrominance at the exact boundary and cosine-fades back to the clip's native colors over ~24 frames - that's what kills the brightness flash. match_mean_std remaps B's whole tone to A's when the clips have drifted beyond the seam; disabled keeps native colors.
  3. Seam-smooths motion. seam_smooth (default 1) runs Farneback optical flow across the cut: it nudges clip B's first frame - the one diffusion models hesitate on - forward along its own motion and balances velocity at the boundary, without dropping frames, so your total count and audio timeline stay intact. Radius 2–3 smooths a wider window.
  4. Concatenates audio. If both audio_a and audio_b are present, it resamples to a common sample rate via torchaudio, pads any mono↔stereo mismatch, and joins them.

Outputs are images and audio, which you feed into whatever node actually saves the file (VHS VideoCombine and friends). Nothing in this node encodes video - it's purely the stitch.

The inputs that matter

  • seam_smooth - 0 turns optical flow off entirely; 1 smooths just the seam frames; 2–3 widen the transition. This is the one you'll fiddle with when motion feels sticky at the cut.
  • color_match - leave on seam_fade unless you can see a whole-clip tone mismatch that seam matching doesn't cure.
  • blend_frames - default 0, and keep it there while seam_smooth ≥ 1. Above 0 it switches to a true crossfade: the last k frames of A and first k of B get blended and the raw tails/heads dropped. It's an alternative to seam smoothing, not a stacking bonus - running both double-processes the boundary. fps only matters here, converting the frame crossfade into the matching audio crossfade duration.

Where it sits in the chain

This node is the back half of a two-node pipeline. The Extender pins your previous clip's tail into the new sample and outputs a trim_frames count; you decode, run MiniMax H3 Extension Trim to drop those overlap frames, then feed the result in as images_b with the previous clip as images_a. Went the pure-latent route? MiniMax H3 Load AV Latent hands you both images_a and audio_a with no VAE round-trip - which is why the pack's demo workflows lean on it for multi-step chains.

Install

Merge ships in the same pack as the Extender, so the install is identical: ComfyUI Manager → search MiniMax H3 Extender → Install → restart, or

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

That requirements file is a single line - opencv-python - and it genuinely matters here.

Common issues

  • Seam smoothing looks like a cheap crossfade. The optical flow path needs OpenCV; if opencv-python isn't installed, the node logs a warning and silently falls back to a plain linear blend. If Manager didn't pull deps, install it manually and restart - the difference is real.
  • Still seeing a color pop at the seam. Check both clips decoded through the same VAE pipeline, then try color_match = "match_mean_std" if the mismatch is whole-clip rather than boundary-only.
  • Audio is there but sounds slightly off. Merged audio is only as good as what you feed it. If clip A's audio came from an MP4 and clip B's from a latent decode, sample rates get aligned but the recordings won't be identical - the pure-latent continuation path upstream is what buys true continuity.
  • Final video came out at the wrong resolution. Remember images_a is upscaled to images_b - generate your continuation at the resolution you actually want the final cut to be, or the old clip gets silently resized to match.
Categoryconditioning/minimax

Inputs (8)

NameTypeDefaultDescription
images_bIMAGECurrent newly rendered clip frames (e.g. from Loop Trim).
images_aoptIMAGEPrevious clip frames (e.g. from Load Video). If empty, passes images_b through.
audio_aoptAUDIOPrevious clip audio (from Load Video or previous decode).
audio_boptAUDIOCurrent clip audio (e.g. from Loop Trim).
seam_smoothoptINT10–4Anti-stutter motion smoothing at the seam boundary (0=off, 1=smooth seam frames, 2-3=smooth transition window). Eliminates frame jitter/stutter while preserving exact total frame count.
blend_framesoptINT00–16Crossfade transition frames at the seam (0 = direct cut with seam_smooth). Setting >0 blends tail/head frames.
color_matchoptCOMBOseam_fadeColor correction for images_b to match images_a. 'seam_fade' (recommended) eliminates color flash/pop by matching boundary color and smoothly transitioning; 'match_mean_std' matches overall tone across the whole clip.
fpsoptFLOAT24.0001–240Frame rate for calculating audio crossfade duration when blend_frames > 0.

Outputs (2)

NameTypeDescription
imagesIMAGEMerged image sequence (images_a + images_b) or images_b if images_a is empty.
audioAUDIOMerged audio track (audio_a + audio_b) or audio_b if audio_a is empty.