Nodes/ComfyUI_YuE2/YuE2 Official Decode Audio
ComfyUI Node

YuE2 Official Decode Audio

Latents to a 48 kHz Stereo File

By jeankassio·Created 7 days ago·Updated 4 days ago· 2
YuE2 Official Decode Audio
  • models
  • latents
  • options
  • audio
  • report

Decode Audio is where YuE2 stops being abstract. It takes acoustic latents, runs them through the official VAE, and hands ComfyUI a normal AUDIO object you can save, play, or push into another graph. It's the only node in the staged chain that outputs sound, and the only one whose output the pack bothers to validate.

That validation is stricter than you might expect: the runtime result must be two-dimensional, exactly two channels, exactly 48,000 Hz, and entirely finite - otherwise you get "Official YuE2 runtime returned invalid stereo 48 kHz audio." In practice you'll never see that unless something upstream went genuinely wrong, but it tells you the contract: this pack produces stereo 48k, full stop. No resampling options, no mono.

The decoder is not chosen here

Here's the thing that catches people: this node has no VAE selector. models and latents are its only required inputs. The decoder was picked all the way back at the Model Loader's vae field - YuE2-Vae for generated music, YuE2-Vae-legacy when you're reproducing the published evaluation protocol.

So the practical question "which decoder sounds better?" is answered by swapping a setting on the loader and re-running the decode, against latents you kept. And the README is emphatic about doing it that way: decode the same latents twice, don't generate two different songs and credit the VAE for the difference. Between two unrelated generations, decoder differences are noise.

What you actually control

decode_full from Generation Options, default false. Off means chunked decoding, with the chunk size set on the loader by vae_core_frames (1024 by default). On means the whole thing goes through in one pass - more VRAM, fewer seams to worry about. The author's framing is that the quality defaults are FP32 VAE decoding, and neither mode changes that; decode_full is a memory-versus-simplicity switch.

If you're on a tight card, vae_core_frames is the underrated control: drop it and chunks get smaller. You'll want to listen for seams around chunk boundaries before deciding it's free.

Outputs are audio and report. Wire audio to Save Audio (Advanced) - the example workflows use FLAC, and given the model's output is clean stereo 48k, I'd keep the lossless container. No normalization, effects or mastering get applied anywhere in this pack, by design. That's your job, downstream, and it's a deliberate choice: the adapter is trying to hand you the official model output rather than a mastered version of it.

Install

Part of the pack, under audio/YuE2 Official. Everything still rides on the two isolated runtimes and the converted models:

cd ComfyUI/custom_nodes
git clone https://github.com/jeankassio/ComfyUI_YuE2
cd ComfyUI_YuE2 && sh setup-runtime.sh && sh scripts/download-models.sh && sh convert-models.sh

Restart ComfyUI and open example_workflows/02-staged-generation.json; this is the node right before Save Audio. On Windows, backend=torch-eager on the loader.

Troubleshooting

If the graph refuses to run, check whether models is actually from a loader with a valid vae selection - the stage nodes hard-fail with "Run the YuE2 Model Loader and select an official model and decoder" rather than guessing.

If Decode runs but the audio is silent or truncated, go read the report. The README flags this explicitly: playable audio can carry truncated=true because a semantic or ABC token ceiling cut generation short. A file that plays fine and stops mid-phrase is not a decode problem - it's an upstream ceiling, and you fix it in Generation Options.

And if you just updated the pack, rerun the earlier stages. Artifacts live under ComfyUI/temp/yue2/ and references from a previous format won't resolve; the error looks like bad wiring, and it isn't.

Categoryaudio/YuE2 Official

Inputs (3)

NameTypeDefaultDescription
modelsYUE2_MODELS—
latentsYUE2_LATENT—
optionsoptYUE2_OPTIONS—

Outputs (2)

NameTypeDescription
audioAUDIO—
reportSTRING—