Nodes/ComfyUI-MiniMaxH3-PrefixStream/MiniMax H3 Safe VAE Decode (Audio)
ComfyUI Node

MiniMax H3 Safe VAE Decode (Audio)

Don't crash when there's no sound yet

By knoic·Created 2 days ago·Updated about 16 hours ago· 0
MiniMax H3 Safe VAE Decode (Audio)
  • vae
  • samples
  • AUDIO

MiniMax H3's headline trick is that audio isn't bolted on afterwards - it's generated jointly with the video and travels in the same latent. Which means your decode chain has an audio half, and it has exactly the same first-clip problem as the video half: when the Clip Bin Picker is in initial mode there's no previous clip, no audio latent, and a stock audio decoder handed None samples will throw. MiniMaxSafeVAEDecodeAudio ("MiniMax H3 Safe VAE Decode (Audio)") is the audio-side fuse - it decodes the audio stream out of a joint H3 latent when one exists, and returns a safe None/empty result when it doesn't, so your graph survives clip one without special-casing.

Think of it as the sibling of the Safe VAE Decode (Video) node: same design philosophy, same failure tolerance, other modality. You'll usually add both together so the video and audio branches of your graph behave identically across the first-clip boundary.

How it behaves

  • With a real joint AV latent in samples, it extracts the audio stream from the H3 NestedTensor and calls vae.decode() on it - a full-fidelity audio decode, identical to what you'd get decoding normally.
  • With samples absent, or a latent that contains no audio stream at all, it logs and returns None for the audio rather than crashing. That's the "safe" part: no audio → graceful empty result → downstream nodes keep running.
  • If a decode genuinely fails, it catches the exception, logs a warning, and returns None instead of tearing down the graph.

Inputs are just vae (required - your H3 audio VAE) and samples (optional LATENT). The single output is type AUDIO, wired to whatever consumes your audio: a Trim Prefix node for synced trimming, a VideoHelperSuite combine as the muxed track, or the Clip Bin Saver when you want the archive to include sound.

Where you'd reach for it

The pack files it under MiniMaxH3/ClipBin because it's the natural companion to the Picker's initial-clip placeholder behavior - the same branch that can hand a None video latent can hand a None audio latent, and you want both decoders to be equally unbothered. Its reference workflow instead uses core VAEDecodeAudio on the happy path, so the safe nodes are genuinely there for the awkward-but-real cases: your own Auto loop, a gallery branch that previews archived clips, or any graph where "no previous context yet" is a state you must survive.

Honest caveats, same shape as the video version: when the node returns None, that's safe only for consumers that tolerate missing audio (most audio muxing nodes skip an absent track fine, but check yours). And because a failed real decode also degrades to None, a blank-sounding output should send you to the console log - the warning there distinguishes "no audio existed" from "decode errored," and you want to know which.

Install

Standard pack install - ComfyUI Manager (search "MiniMaxH3 PrefixStream") or:

cd ComfyUI/custom_nodes
git clone https://github.com/knoic/ComfyUI-MiniMaxH3-PrefixStream.git
cd ComfyUI-MiniMaxH3-PrefixStream
pip install -r requirements.txt

Restart ComfyUI, Ctrl+F5. Nothing extra to download - this is a thin safety wrapper around your existing H3 audio VAE decode.

CategoryMiniMaxH3/ClipBin

Inputs (2)

NameTypeDefaultDescription
vaeVAE
samplesoptLATENT

Outputs (1)

NameTypeDescription
AUDIOAUDIO