Nodes/ComfyUI_YuE2/YuE2 Official Synthesize
ComfyUI Node

YuE2 Official Synthesize

The ODE Solver Stage (and Why It's Separate)

By jeankassio·Created 7 days ago·Updated 4 days ago· 2
YuE2 Official Synthesize
  • models
  • semantic
  • options
  • latents
  • report

Synthesize is the one stage in this pack that behaves like something you'd recognize from image generation: a fixed-step solver grinding through an iterative process to produce latents. It takes the semantic tokens and runs the official midpoint ODE solver to turn them into acoustic latents. No VAE, no audio, no waveform - just latents and a report.

If you've ever stared at a KSampler progress bar and wondered whether the last ten steps were worth it, this is the same argument, at a much coarser scale.

The mechanism

YuE2's acoustic stage is a flow/ODE-style model rather than a decoder stack. The pack calls the upstream midpoint solver with ode_steps from Generation Options - 32 by default, matching the official generation config. The solver method itself isn't exposed; only the step count is.

Each stage here is a separate process launch: the node spawns the isolated YuE2 worker, hands it the semantic artifact ID, and the worker loads the weights, solves, and writes latents into ComfyUI/temp/yue2/. The output is again just a reference, {"artifact_id": "synthesize-xxxxxxxx"}, which Decode resolves.

Progress is real, at least. The pack pipes the worker's step events back into ComfyUI's progress bar and mirrors them as tqdm bars in the console, so you can see actual steps against the actual total rather than a spinner. You can also cancel - the node touches a cancel file and the worker process gets terminated, Windows included.

Inputs and outputs

Required: models and semantic (from Semantic Tokens). Optional: options.

Out of options, exactly one field is yours to tune here: ode_steps. Fewer steps is faster and rougher; 32 is the official default and the sensible place to sit. The decode_full flag looks like it belongs to this stage - it doesn't, it's consumed downstream at decode. And the abc_* / semantic_* sampler families are already spent; changing them after Semantic Tokens has no effect on this node at all, because the tokens are frozen in the artifact.

Outputs: latents (YUE2_LATENT) into Decode Audio, and report (JSON) with timings, step counts and metadata. Read the report when a track is unexpectedly short - truncation upstream smells like a solver problem here, and it isn't.

Why you'd want this node instead of one-click Generate

Two reasons, both about holding variables still.

First, the decoder comparison. YuE2 ships a current listening VAE and a legacy one kept for reproducing published evaluation. The README's advice is unambiguous: decode the same latents twice, don't generate two unrelated songs and attribute the difference to the decoder. Having latents as an artifact is what makes that possible at all.

Second, cost. Synthesis is the heavy part of a run. If you're experimenting with ode_steps at all, you want to do it against latents that came from a semantic pass you already like - not pay for planning and token generation every time.

Be realistic about the payoff, though: swapping the decoder is a graph-level change (the vae field lives on the Model Loader), so in ComfyUI terms it's a fresh queue with a different loader setting rather than a live toggle.

Install

Ships with the pack under audio/YuE2 Official:

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, then open example_workflows/02-staged-generation.json, which chains Generate ABC → Semantic Tokens → Synthesize → Decode. On Windows keep backend=torch-eager; the CUDA Graph backend needs a FlashAttention kernel the official Windows Torch build doesn't carry.

Troubleshooting

If the run dies almost immediately, you're looking at a setup problem rather than a solver problem: a missing .venv gives you "The isolated runtime is missing", and an un-adapted model index gives you "YuE2 official models are not adapted yet." Both messages tell you which launcher to run.

A stale semantic reference - outputs from before a pack update, or a graph where Semantic Tokens never executed - comes back as an artifact-ID validation error. Re-queue upstream.

Memory failures here are usually the AR offload or the model itself rather than the solver, since the ODE steps operate on latents. If you're on a 24 GB card and it's tight, the levers are on the Model Loader: memory_budget_gib, offload_ar, and the quantization trade you should think twice about.

Categoryaudio/YuE2 Official

Inputs (3)

NameTypeDefaultDescription
modelsYUE2_MODELS—
semanticYUE2_SEMANTIC—
optionsoptYUE2_OPTIONS—

Outputs (2)

NameTypeDescription
latentsYUE2_LATENT—
reportSTRING—