MiniMax H3 Audio Transplant
Exact cross-resolution MiniMax H3 audio-latent transplantation for ComfyUI
MiniMax H3 Audio Transplant
A single ComfyUI node that copies the finished audio out of one MiniMax H3 audio+video latent and puts it into another, so you can re-render the video at a different resolution while keeping the exact same audio.
Why
MiniMax H3 generates video and audio together in one joint latent. A common workflow is to do a cheap low-resolution pass until the audio sounds right, then render the final video at full resolution. Re-sampling from scratch at the higher resolution would generate new audio. This node keeps the audio you already have.
Install
Clone into your ComfyUI custom_nodes folder and restart ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/Molinist/ComfyUI-MiniMaxH3-Audio-Transplant
Needs a ComfyUI build with MiniMax H3 support. There are no extra Python dependencies.
Usage
The node is MiniMax H3 Transplant Audio Latent, under model/latent/minimax.
| Input | What to connect |
| --- | --- |
| source_av_latent | The completed H3 latent (after sampling) whose audio you want to keep. |
| target_av_latent | A fresh, empty H3 latent at the resolution you want for the final video. |
The output LATENT is the target latent with:
- the target's video stream, unchanged
- the source's audio stream, copied exactly
- a noise mask of
1on video and0on audio, so the sampler regenerates the video and leaves the audio alone
Typical graph:
- Sample a low-resolution H3 latent until the audio is what you want.
- Create an empty H3 latent at the final resolution with the same frame count.
- Connect the first as
source_av_latentand the second astarget_av_latent. - Send the output to your sampler with denoise
1.0, then decode as usual.
Requirements and errors
The source and target can have different resolutions, but they must have the
same length, so their audio latents have identical shapes. The node never crops,
pads, resamples, re-encodes, or changes the dtype of the audio. If the shapes
don't match, it raises a clear error instead of guessing. It also rejects
latents that aren't MiniMax H3 joint latents, or that are off the H3 frame grid
(17n + 5 frames).
Tests
From the ComfyUI root:
python -m pytest custom_nodes/ComfyUI-MiniMaxH3-Audio-Transplant/tests --import-mode=importlib
License
MIT. See LICENSE. You can use, modify, and redistribute it, including commercially, as long as you keep the copyright notice.