Nodes/ComfyUI-MiniMax-H3-LongMedia/MiniMax H3 • Merge AV Latents
ComfyUI Node

MiniMax H3 • Merge AV Latents

Blend a new video stream into an old clip without touching its audio

By vizart-vj·Created 14 days ago·Updated 2 days ago· 71
MiniMax H3 • Merge AV Latents
  • target_av
  • source_av
  • av_latent
video_mix1.00
audio_mix0.00
fit_mode
alignment
video_denoise0.00
audio_denoise0.00

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) and alignment (start / end / center) - how source and target reconcile when lengths differ. crop_pad + alignment handles the mismatch; strict errors.
  • 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.

CategoryMiniMax H3/LongMedia/Streams

Inputs (8)

NameTypeDefaultDescription
target_avLATENT
source_avLATENT
video_mixFLOAT1.000–1
audio_mixFLOAT0.000–1
fit_modeCOMBO2 options: strict, crop_pad
alignmentCOMBO3 options: start, end, center
video_denoiseFLOAT0.000–1
audio_denoiseFLOAT0.000–1

Outputs (1)

NameTypeDescription
av_latentLATENT