Nodes/ComfyUI-FL-YuE2/FL YuE2 · Decode Audio
ComfyUI Node

FL YuE2 · Decode Audio

64 channels of latent in, 48 kHz stereo out

By filliptm·Created 3 days ago·Updated 3 days ago· 9
FL YuE2 · Decode Audio
  • audio_decoder
  • music_latents
  • audio
tile_frames1024

This is the least glamorous node in the pack and the one you'll think about exactly once - until a render OOMs on you, at which point it's the first lever you pull.

Its job is narrow and it does it well: take the YUE2_LATENTS that Render Music produced and turn them into an ordinary ComfyUI AUDIO you can preview, save, or process with any core audio node. The output is 48 kHz stereo.

The mechanism, briefly

YuE2's decoder is an Oobleck-style decoder - the same family ComfyUI already ships for Stable Audio - and this pack reuses comfy.ldm.audio.autoencoder rather than reimplementing it. The latents arrive as [batch, 64, frames], 64 channels, and come out as two channels of waveform.

The interesting design choice is in tile_frames. Long songs don't fit through the decoder in one pass, so it decodes in tiles - with a twist: instead of overlapping tiles and crossfading the seams, the code computes the decoder's actual input dependency range (walking convolutional strides and kernel sizes through the module tree) and crops the exact valid region out of each tile. Sound that genuinely requires neighbouring frames is recomputed, not blended. That means a tile boundary is not an audio artifact you need to worry about, and the pack's validation matched the upstream decoder including at tiled boundaries. It also means the halo has a floor, so absurdly small tiles aren't free.

The three inputs

  • audio_decoder - the YUE2_VAE output from Load Models. Easy to forget to wire, easy to be confused by when the node goes red.
  • music_latents - the YUE2_LATENTS from Render Music.
  • tile_frames - default 1024, range 64–2048 in steps of 64. The tooltip says it plainly: smaller tiles reduce decoder VRAM, and 1024 is the upstream default.

That's it. There's no quality knob here, no seed, nothing creative. Decoding is faithful by design; if the audio is wrong, the problem is upstream.

Output

audio, an AUDIO - the standard ComfyUI audio type, meaning everything you already know works:

  • Preview Audio for a quick listen in the browser.
  • Save Audio (Advanced) if you want FLAC. The shipped example saves under output/audio/YuE2/, and a finished song is a few megabytes, so FLAC is the sane default for a keep.
  • Any audio-processing node in your library - but remember the render is a stereo mix. If you want stems, that's a separate audio-separation step; the pack doesn't do it.

Battle-tested wiring

Render Music ──music_latents──┐
                              ├──> Decode Audio ──audio──> Preview Audio
Load Models ──audio_decoder───┘                └─────────> Save Audio (Advanced)

If it goes wrong

It tells you the shape is wrong. Feeding non-YuE2 latents gets you an explicit "expected YuE2 latents shaped [batch,64,frames]" error rather than a mystery crash. That's almost always a wiring mistake.

"YuE2 produced non-finite audio." This is the decoder noticing NaNs. In practice it comes from a run that broke down - usually memory pressure on the GPU elsewhere in the graph. Reduce max_duration on Render, lower tile_frames here, shut down other GPU work, and re-queue. The pack's decoder accumulates into a float32 CPU buffer precisely so that a decode can be checked this way instead of silently writing garbage to disk.

OOM during decode. Drop tile_frames to 512 or 256 and try again. Smaller tiles mean more halo recomputation, so it's slower - but it's the only VRAM dial this node has, and it's a real one.

A "song" that's silent or clipped to noise. Silence after Compose is usually a score problem, not a decode problem: go back and look at the ABC the Compose node printed, and check whether you told the planner off by accident or capped max_duration absurdly low. Worth noting the decoder clamps output to [-1, 1] before handing it to ComfyUI, so what you save is what you heard.

CategoryFL YuE2

Inputs (3)

NameTypeDefaultDescription
audio_decoderYUE2_VAE
music_latentsYUE2_LATENTS
tile_framesINT102464–2048Smaller tiles reduce decoder VRAM. 1024 is the upstream default.

Outputs (1)

NameTypeDescription
audioAUDIO