YuE2 Official Generation Options
Sixteen Sampling Knobs You Should Mostly Leave Alone
- options
YuE2 Official Generation Options is the node that makes a YuE2 graph look intimidating. Sixteen inputs, half of them named abc_something and semantic_something, and no obvious answer to "which one makes vocals clearer?"
Here's the first thing worth knowing: you don't have to connect it at all. Every stage node treats options as optional, and when it's missing the pack falls back to its built-in copy of the official generation config. So a graph with no options node is not degraded - it's running the author's defaults, which are also upstream's defaults. Wire this only when you've decided to change something specific.
What the two prefixes mean
YuE2 does its work in two autoregressive passes. The ABC pass produces the symbolic plan - melody and chord notation. The semantic pass turns that plan into audio tokens, and those tokens are what the acoustic model later renders. Options exposes the full sampler set for both stages independently: temperature, top_p, top_k, repetition_penalty, penalty_window, min_tokens, max_tokens.
The defaults tell you a lot about how differently the two stages behave. ABC sampling is cool and tight - abc_temperature 0.7, abc_top_p 0.9, abc_top_k 30, abc_repetition_penalty 1.005 over a 100-token window. Semantic sampling is looser - semantic_temperature 1.0, semantic_top_p 0.95, semantic_top_k 100, and a repetition penalty of 1.2 over a 50-token window. Structure wants discipline; audio tokens want variety or you get a loop. Treat those two shapes as the design, not a starting point to nudge.
The knobs that actually earn their keep
semantic_max_tokens (default 9000) is the one people reach for first, and the one most often misunderstood. Semantic audio runs at 25 tokens per second, and this is a ceiling, not a duration. 9000 tokens permit about 360 seconds, but the model can and often does finish earlier. If a song twice the length of your last one came back short, raise this; if it came back the same length it always is, this field will not fix that.
ode_steps (default 32) is the acoustic midpoint solver's step count. It's the closest thing here to an image sampler's step count: fewer is faster and rougher, more is slower with diminishing returns. 32 is the official default and honestly where most people should stay.
decode_full (default false) switches the VAE between chunked and full decoding. Chunked is the memory-friendly path and its chunk size is set on the Model Loader (vae_core_frames, default 1024) - not here. Turn decode_full on when you have VRAM to spare and want to rule out chunk seams, not as a general quality button.
What you can't change here
ode_method is fixed at midpoint and the context window is fixed at 24576 - both are baked into the node's output rather than exposed. That's the pack being protective: those aren't tuning knobs, they're part of matching the official implementation. abc_penalty_window is capped at 100 and top_k at 184704, which is the vocabulary size and therefore not a limit you'll ever hit.
Wiring it up
One output, options (YUE2_OPTIONS). It fans out to Generate Music, Generate ABC, Semantic Tokens, Synthesize and Decode. One options node feeding the whole staged graph is the intended pattern; you get one consistent config across stages, which is what makes A/B comparisons mean anything.
Install
Nothing special - it's part of the pack, under audio/YuE2 Official. But it's inert on its own: without the isolated runtime and adapted models, connecting it just gets you a stage node that fails on launch.
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
Common problems
The classic is raising semantic_max_tokens to force a longer song and getting... a longer ceiling. The model still decides when to stop. Duration comes from the material: more lyric sections, a style line that implies a longer arrangement.
Second: dumping temperature when output sounds repetitive. Repetition in YuE2 usually comes from the semantic pass finding a comfortable loop, and the knob that exists for that is semantic_repetition_penalty - push it slightly, over a window you didn't shorten, rather than letting temperature scramble the whole thing.
And if you change a setting between two otherwise identical runs, resist the urge to also change the seed. You'll learn nothing.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| abc_temperature | FLOAT | 0.700–5 | — |
| abc_top_p | FLOAT | 0.900.01–1 | — |
| abc_top_k | INT | 301–184704 | — |
| abc_repetition_penalty | FLOAT | 1.0050.01–10 | — |
| abc_penalty_window | INT | 1001–100 | — |
| abc_min_tokens | INT | 320–24576 | — |
| abc_max_tokens | INT | 40961–24576 | — |
| semantic_temperature | FLOAT | 1.000–5 | — |
| semantic_top_p | FLOAT | 0.950.01–1 | — |
| semantic_top_k | INT | 1001–184704 | — |
| semantic_repetition_penalty | FLOAT | 1.2000.01–10 | — |
| semantic_penalty_window | INT | 501–100 | — |
| semantic_min_tokens | INT | 2000–24576 | — |
| semantic_max_tokens | INT | 90001–24576 | — |
| ode_steps | INT | 321–10000 | — |
| decode_full | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | YUE2_OPTIONS | — |