H3 Reference Audio (stereo guard)
Why your H3 render crashed on a mono audio file
- audio
- AUDIO
H3 Reference Audio is a one-job node: it makes an audio clip safe to hand MiniMax-H3 as a reference. H3's latent layout reserves two audio channels, so a mono file doesn't just sound thinner - it crashes the sampler with an unhelpful shape mismatch deep in the encode. This node forces every reference to the shape the model expects: stereo, 32 kHz, and short enough that it doesn't drag every sampling step down.
You use it in a reference-heavy H3 chain when you want the voice of a character to persist across shots - voice anchoring is a real mechanism in this pack, and the audio reference is how the model locks a speaker's timbre. But it's equally useful just to stop the crash. Feed any audio you grabbed from somewhere else, and it comes out the other side in the format ref2va actually wants.
How it works
The node is honest about being a guard, not a feature. It does four small things:
- If the waveform is mono (one channel), it duplicates the channel to stereo. If it's got more than two channels, it keeps the first two.
- It resamples to 32 kHz - H3's VAE sample rate - using torchaudio.
- It trims to at most
max_seconds, because reference rows ride in the packed sequence on every sampling step. A 40-second reference costs you on every single step of every shot, not once at the start. - It prints a one-line report of what it changed, so you can see
mono -> stereo (duplicated)and know the guard fired.
The whole thing runs in milliseconds and passes the result straight out as an AUDIO output you wire into the sampler's reference audio input.
The input that matters
Only one: max_seconds (float, default 10, range 0.5–60). The tooltip spells out the trade - a long reference costs speed on every step, not just once. A few seconds of the speaker's voice carries the timbre; the rest is you paying for it repeatedly. Trim aggressively unless you specifically want a long acoustic context.
The output is a single AUDIO socket. Wire it to the reference-audio input on the H3 sampler, or drop it before a video reference node that expects its soundtrack already shaped.
Installing it
Part of the ComfyUI-H3-Multishot pack - no separate install:
cd ComfyUI/custom_nodes
git clone https://github.com/jlucasmcrell/ComfyUI-H3-Multishot
Or find H3 Multishot in ComfyUI Manager. Requires ComfyUI v0.30.0+ (native MiniMax-H3 support) and the H3 audio VAE from Comfy-Org/MiniMax-H3. The pack deliberately declares no Python dependencies, so nothing here fights your torch install.
Gotchas
The common failure this node prevents is real and confusing: a mono reference dies with a shape mismatch that names a tensor, not your audio file, and it's easy to chase the wrong variable for an hour. If a render with an audio reference ever crashes with a channel error, this node is the pre-emptive fix - every reference you load through it comes out stereo. One caveat: if torchaudio can't resample for some reason, the node logs a note and passes the audio through at its original rate anyway, expecting the sampler to resample downstream. That path is the exception, not the rule.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| max_seconds | FLOAT | 10.00.5–60 | Trim the reference to at most this long. Reference rows sit in the packed sequence for EVERY sampling step, so a long reference costs speed on every step, not just once. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |