Audio VAE Decode
Bring an audio latent back to a waveform you can hear
- latent
- vae
- audio
Every audio latent in this pack eventually has to become sound you can actually hear, and that's the whole job of AudioVAEDecode. It takes a LATENT and a Stable Audio VAE and hands you an AUDIO output - the thing you feed to a save-audio node or a preview. There's no flash here, which is the point. It's the exit ramp from the latent rabbit hole.
How it works
Straightforward: the latent tensor goes through vae.decode(), moves back to CPU, and gets wrapped in the (waveform, sample_rate) tuple that ComfyUI's AUDIO type expects. The sample rate is pulled from metadata the encoder stored when the latent was created - so if you encoded at 44100, you get 44100 back, not a guess. The one real control is denormalize (default true), which clamps the output to the valid -1.0 to 1.0 range. Leave it on. If you turn it off, you're asking for clipped audio and, occasionally, silence.
The inputs that matter
latent- anything this pack produces: an interpolation, a style transfer, a manipulated latent, or the direct output of a sampler.vae- the Stable Audio VAE, same one you encoded with.denormalize- leave true.
Output is audio, an AUDIO you can wire straight into a save node. If you've done latent surgery that left the latent a different length than it started (temporal_stretch in AudioLatentManipulator, for instance), decode will just give you back whatever's there - the node doesn't complain, it renders.
Installing it
Ships in DavidPiazza/network_bending ("Network Bending" in ComfyUI Manager), or:
cd ComfyUI/custom_nodes
git clone https://github.com/DavidPiazza/network_bending.git
Restart, and don't skip the audio dependencies (torchaudio, librosa) from requirements-audio.txt. Missing audio deps make the whole audio half of the pack not load - silently.
Gotchas
The one thing that reliably bites people: decoding a latent that was never meant for this VAE. The vae port has no way of knowing whether your latent came from the matching encoder, and if it didn't, you'll get noise or a burble instead of audio. Keep one VAE for the whole workflow. Also, if your decode comes back silent, check denormalize and then check whether you clamped everything to zero somewhere upstream - a lot of this pack's knobs go to zero before they go to "slightly less."
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | Audio latent to decode | |
| vae | VAE | Stable Audio VAE model | |
| denormalizeopt | BOOLEAN | true | Denormalize output audio |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |