Nodes/ComfyUI-TangoFlux/TangoFluxVAEDecodeAndPlay
ComfyUI Node

TangoFluxVAEDecodeAndPlay

The node that turns TangoFlux latents into audio you can actually hear

By LucipherDev·Created 2 years ago·Updated about a year ago· 107
TangoFluxVAEDecodeAndPlay
  • vae
  • latents
  • audio
tile_size32
filename_prefixTangoFlux
formatwav
save_outputtrue

This is the last stop on the TangoFlux line. TangoFluxVAEDecodeAndPlay takes the latents your sampler just produced, decodes them into 44.1kHz audio, writes a file, and drops a little audio player right on the node so you can listen without leaving ComfyUI. If you're used to image workflows where you only see a PNG at the end, this is the closest audio has to a "Save + Preview" node - and it's the only node in this pack that counts as an output node.

The "AndPlay" isn't lying: the pack ships a tiny web route (/tangoflux/playaudio) and a frontend extension that renders an <audio> element directly in the node after it runs. No separate player, no API key, nothing to open. Run it and an inline player appears under the widgets. That part is genuinely slick for the first time you hear a prompt turn into sound.

What it does under the hood

The latents come from the sampler in a special TANGOFLUX_LATENTS container that also carries the duration. The node decodes them with the Oobleck VAE (the same latent audio decoder family Stable Audio uses), trims the waveform to exactly duration × 44100 samples, then saves with torchaudio. If a full-length decode blows up your VRAM, it catches the out-of-memory error and silently falls back to tiled decoding - it walks the latent timeline in chunks of tile_size, decodes each, and stitches them back. So you usually don't have to touch tile_size at all; it only exists for the OOM path.

Inputs worth knowing

Of the six, you'll actually touch four:

  • vae and latents - wire these from TangoFluxLoader and TangoFluxSampler respectively. Nothing renders without them.
  • filename_prefix - base name of the saved file (default TangoFlux), auto-numbered.
  • format - wav, mp3, flac, aac, wma. wav is the safe default; the compressed ones depend on your torchaudio build having the codecs. If aac or wma throws, just use wav and stop fighting it.
  • save_output - on, it writes to your ComfyUI output folder. Off, it goes to a temp folder with a random suffix (useful for one-off listening you don't want cluttering outputs).

The one output

audio (AUDIO). The README's tip: feed it into VideoHelperSuite's VideoCombine audio input to put TangoFlux sound in a video. Real talk: it won't sync to the video - the README says so in bold - so use it for ambience over b-roll, not lip-sync.

Installing it

is the same as the rest of the pack, since this node ships inside ComfyUI-TangoFlux. Easiest is ComfyUI Manager → search "TangoFlux" → install. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/LucipherDev/ComfyUI-TangoFlux
cd ComfyUI-TangoFlux
python install.py   # installs deps AND downloads the models

Then restart ComfyUI. The install.py step pulls a few gigabytes of models, so first run takes a while.

Troubleshooting

No audio player appears after running → your ComfyUI frontend is stale; hard-refresh and make sure you restarted after installing. OOM during decode → it auto-tiles, but if you're still dying, lower tile_size from 32 toward 8. Weird file format errors → switch to wav. If VideoCombine rejects the audio, keep save_output on and point VHS at the saved file. None of this is exotic - it's mostly "audio wants more RAM than your image workflow did."

CategoryTangoFlux

Inputs (6)

NameTypeDefaultDescription
vaeTANGOFLUX_VAE
tile_sizeINT328–128
latentsTANGOFLUX_LATENTS
filename_prefixSTRINGTangoFlux
formatCOMBOwav5 options: wav, mp3, flac, aac, wma
save_outputBOOLEANtrue

Outputs (1)

NameTypeDescription
audioAUDIO