HunyuanFoley VAE Decode
The Node That Turns Foley Latents Into Audio You Can Actually Hear
- samples
- audio
HunyuanFoley VAE Decode is the last hop in the Vantage-HunyuanFoley pipeline, and the one people skip on the way to the interesting stuff. The Denoiser does the magic, the encoders feed it, but this node is what turns the audio latents into an AUDIO output you can wire into VHS_VideoCombine and actually hear. It's also the point where the whole thing falls over if you didn't download the VAE file, so it deserves more respect than it gets.
If you've used ComfyUI for images this is the audio version of the standard VAE Decode you know: latents in, renderable media out. What makes it feel different is that the "VAE" here is a DAC - Descript's audio codec, the one from the descript-audio-codec project the README credits. The model file is vae_128d_48k.pth, a 128-dimensional latent codec running at a 48kHz sample rate, and the node loads it straight from ComfyUI/models/hunyuan_foley. Unlike an image VAE there's no encoder half being exercised at generation time: the Denoiser already produced the latents, so this node only runs the decoder side, then trims the waveform to match the duration baked into the samples.
What you actually set
The node is deliberately boring, and that's the point:
- samples (LATENT) - straight from HunyuanFoley Denoiser. It's a dict that carries both the latent tensor and the
audio_len_in_sthe sampler embedded, which is how the node knows how long the clip should be. - to_gpu (bool, default on) - moves the VAE to CUDA for the decode.
- move_back_to_cpu (bool, default on) - shoves the VAE back to CPU and empties the CUDA cache afterward.
That's the whole input list. No duration, no sample-rate selector, no trim knob. The length comes from audio_len_in_s inside the latents, which the Visual Encode node computed as frame_count / fps. The single output is audio, a standard ComfyUI AUDIO dict of {waveform, sample_rate} that any audio-aware node in the graph can consume - in the pack's example workflow it feeds VHS_VideoCombine.audio to mux the generated sound back onto the silent video.
Installing it
The node ships in the Vantage-HunyuanFoley pack, so it comes down with the rest. ComfyUI Manager, search Vantage-HunyuanFoley, install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-HunyuanFoley.git
cd Vantage-HunyuanFoley
pip install -r requirements.txt
Then the part that actually bites: the model files are not downloaded for you. You need to create ComfyUI/models/hunyuan_foley/ and drop vae_128d_48k.pth in it (it's in the Tencent/HunyuanVideo-Foley repo on Hugging Face) alongside the foley checkpoint, the Synchformer state dict, and the siglip2/ and clap/ model folders the other nodes need.
Where people get burned
The most common failure is the least interesting: no vae_128d_48k.pth in the models folder, and the node dies with a clear "VAE file not found" error before it ever touches the GPU. Double-check the filename - it must match exactly.
The subtler one is length. Because the clip duration rides along inside the samples, if you fed Visual Encode a wrong fps (or the frame batch doesn't match what you think it is), the decoded audio will be shorter or longer than your video, and you'll wonder why the muxed file drifts out of sync. Fix it at the Visual Encode node, not here. And while this node is light - the DAC is tiny next to the diffusion model - leaving move_back_to_cpu on is still the right call on 8–12GB cards so the next stage starts with a clean CUDA cache.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| to_gpu | BOOLEAN | true | — |
| move_back_to_cpu | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |