MiniMax H3 • Merge AV Latents
Blend a new video stream into an old clip without touching its audio
- target_av
- source_av
- av_latent
Most editing in latent space is really just "put this stream here, keep that one." That's what Merge AV Latents is for: it blends video and audio independently from a source H3 AV latent into a target AV latent. The target defines the output geometry - its resolution and duration win - and you get separate sliders for how much of the source's video and audio to mix in. If that sounds like Replace Stream with more nuance, that's basically right; this is the version that lets you crossfade instead of swapping.
The inputs that matter
target_av- the latent whose geometry (size, length) defines the result.source_av- the latent whose content you're blending in.video_mix(default 1) - how much source video lands in the output. 1 = source video replaces target video; 0 = keep target video entirely.audio_mix(default 0) - same idea for audio. Note the asymmetry: default is full video, no audio. If you want to replace audio you must raise this.fit_mode(strict/crop_pad) andalignment(start/end/center) - how source and target reconcile when lengths differ.crop_pad+alignmenthandles the mismatch;stricterrors.video_denoise/audio_denoise(both default 0) - how much of the blended stream then gets re-denoised during sampling. 0 keeps the blend as-is; 1 fully regenerates it.
One output: the merged av_latent, ready to sample or decode.
When you'd actually use it
The classic case: you have a generated clip and a separate reference-style video you want to inject motion or identity from, but you want to keep your original audio track. With audio_mix at 0, the source's soundtrack never reaches the output. The reverse - swapping in new audio over retained video - is the same node with video_mix at 0 and audio_mix at 1. The in-between values are where it gets interesting: a video_mix around 0.5 blended with a low video_denoise gives you a partial-motion-transfer effect you'd otherwise build with a video reference in the sampler.
It pairs naturally with the stream utilities: Split AV Latents to pull the streams apart, Merge (or Replace Stream) to put them back, Pack AV Streams when you're starting from raw encoded video and audio. This is the "assembly" tier of the pack, and Merge is the most flexible single tool in it.
Install
Ships in ComfyUI-MiniMax-H3-LongMedia. Manager search "MiniMax-H3-LongMedia", or:
cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia
restart. You'll want the H3 checkpoint + VAEs around (MiniMaxAI/MiniMax-H3, ~42.5 GB, community license excludes US/EU/UK/Korea), though the node itself is pure latent math.
Troubleshooting
If strict throws, your source and target latents don't share a compatible shape - that's what crop_pad is for, so use it. If the output looks like nothing changed, check the mix defaults: video_mix defaults to 1 and audio_mix to 0, so "nothing changed in audio" is expected behavior, not a bug. And if you're merging latents that came from different workflows, verify both are H3 AV latents via the AV Latent Info node - feeding a plain video latent into source_av produces a cryptic NestedTensor error.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| target_av | LATENT | — | |
| source_av | LATENT | — | |
| video_mix | FLOAT | 1.000–1 | — |
| audio_mix | FLOAT | 0.000–1 | — |
| fit_mode | COMBO | 2 options: strict, crop_pad | |
| alignment | COMBO | 3 options: start, end, center | |
| video_denoise | FLOAT | 0.000–1 | — |
| audio_denoise | FLOAT | 0.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| av_latent | LATENT | — |