MiniMax H3 Video Merge (Concat)
Stitch MiniMax H3 clips without the pop, the stutter, or the drift
- images_b
- images_a
- audio_a
- audio_b
- images
- audio
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:
- Resolution-aligns. If the two clips differ in size,
images_ais upscaled with Lanczos to matchimages_b's canvas - so the new clip's resolution is the one that wins. - Color-matches
images_btoimages_a. The defaultcolor_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_stdremaps B's whole tone to A's when the clips have drifted beyond the seam;disabledkeeps native colors. - 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. - Concatenates audio. If both
audio_aandaudio_bare 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 onseam_fadeunless you can see a whole-clip tone mismatch that seam matching doesn't cure.blend_frames- default 0, and keep it there whileseam_smooth ≥ 1. Above 0 it switches to a true crossfade: the lastkframes of A and firstkof 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.fpsonly 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-pythonisn'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_ais upscaled toimages_b- generate your continuation at the resolution you actually want the final cut to be, or the old clip gets silently resized to match.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images_b | IMAGE | Current newly rendered clip frames (e.g. from Loop Trim). | |
| images_aopt | IMAGE | Previous clip frames (e.g. from Load Video). If empty, passes images_b through. | |
| audio_aopt | AUDIO | Previous clip audio (from Load Video or previous decode). | |
| audio_bopt | AUDIO | Current clip audio (e.g. from Loop Trim). | |
| seam_smoothopt | INT | 10–4 | Anti-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_framesopt | INT | 00–16 | Crossfade transition frames at the seam (0 = direct cut with seam_smooth). Setting >0 blends tail/head frames. |
| color_matchopt | COMBO | seam_fade | Color 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. |
| fpsopt | FLOAT | 24.0001–240 | Frame rate for calculating audio crossfade duration when blend_frames > 0. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | Merged image sequence (images_a + images_b) or images_b if images_a is empty. |
| audio | AUDIO | Merged audio track (audio_a + audio_b) or audio_b if audio_a is empty. |