YuE2 Options
The four knobs worth touching, and the two to leave alone
- options
YuE2 Generate Song asks for three things - style, lyrics, seed - and hides everything else on purpose. YuE2 Options is where "everything else" lives, and the important thing about it is what happens when you don't use it: an unconnected options socket is not a special case. The node starts from the released defaults either way. So this isn't a config you have to get right before the first song; it's a panel you open once you have a reason.
Worth knowing where this sits first. The community's local music default is ACE-Step - fast, instrumental-leaning, weak exactly where YuE2 is aimed: vocals and lyrics. YuE2 is the other bet, a 3B model that writes a readable score and then sings it, and it's new enough that there's no accumulated folklore about which settings are good. The defaults are the model's own. Touch less than you think you need to.
The inputs that matter
Three are required, and they're the ones people actually change:
cot- how much is planned before anything is sung.fullwrites a melody-and-chords score first (the default, and where the benchmark numbers come from),melodyplans the tune and lets the accompaniment follow the style, andoffskips the score entirely and goes straight from lyrics to audio - faster, and no readable plan to edit. Stick withfullunless you're chasing speed.max_seconds- the length ceiling, 0 to 360 seconds,0meaning "work it out from the lyrics". Here's the part that bites: changing this changes the song, not just its length. The ceiling sizes the static KV cache and the captured CUDA graph, which reorders the attention reduction. Same seed, same lyrics, 40 and 90 second ceilings: identical for 79 tokens, divergent at the 80th. Settle this number before you go seed hunting, or you'll be chasing a moving target.keep_model_loaded- keeps the 6.8 GB on the card after the run. Saves around five seconds per run while you iterate, holds the VRAM until ComfyUI restarts. Leave it off when video or image nodes come next.
Then the optional fields you'll plausibly touch: attention_backend (sdpa by default and reproducible; cudnn is about 17% faster and produced four different songs from one seed over four runs - use it for exploring only), cfg_scale (0 means the released value, 1.0 normally; anything other than 1.0 runs a second unconditional branch, so roughly double the time and double the KV cache - raise it only when the result is ignoring your style), quantization (bf16 vs int8 - see below), download, vae (standard for listening, legacy to reproduce published numbers), device, ode_steps (32 is the released value; fewer is faster and thinner), and two banks of sampling numbers: abc_temperature / abc_top_p / abc_top_k for the score stage, and temperature / top_p / top_k / repetition_penalty for the song stage.
The output is one handle, options (YUE2_OPTIONS), and it plugs into the matching socket on YuE2 Generate Song, YuE2 Write Song, YuE2 Plan Batch, YuE2 Render Plan or YuE2 Decode Latents. One options node can feed all of them.
Two things people expect and don't get
INT8 does not save VRAM. quantization: int8 downloads Comfy-Org's 3.69 GB build instead of 7.26 GB - real on a slow connection, nothing on your card. This pack's layers are ordinary torch linears, so the weights are restored to BF16 as the file loads and the GPU holds the same 6.8 GB either way. It also isn't quite the same model: the round trip costs about a percent of each weight, so the same seed gives a different song. Download size only.
A second card is worth it, and a mixed one isn't. device is auto or cpu on a single-GPU install, with more entries when ComfyUI sees more cards; cpu works and takes about an hour a song. A second card stops YuE2 competing with ComfyUI's own VRAM, which is also when keep_model_loaded starts paying - but two YuE2 nodes pinned to different devices reload all 6.8 GB every run, because the loaded model is cached per device.
Install
Manager, search YuE2-ComfyUI (YuE2 Music), or:
cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/YuE2-ComfyUI
Restart after. tiktoken is the only new requirement; if it's missing the node prints the correct pip line for the interpreter ComfyUI runs on. Leave download on auto and the pack fetches the 7.26 GB Comfy-Org checkpoint into models/checkpoints/ on first run - the same file ComfyUI's own YuE2 nodes read, so one download serves both. off downloads nothing and tells you which files are missing, with a link and a folder for each.
One last gotcha: if you wire an options node into YuE2 Render Plan to change cot on a plan that already exists, it won't. cot is part of the prompt the score was written under, so it always comes from the plan, and the node warns you that it's ignoring your change.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| cot | COMBO | full | How much of the composition is planned before any audio is generated. 'full' writes a melody-and-chord score first and is the default for new songs. 'melody' plans the melody only and lets the accompaniment follow the style. 'off' goes straight from the lyrics to audio, which is faster and gives up the readable plan. |
| max_seconds | FLOAT | 00–360 | Ceiling on the length of the song. 0 works it out from the lyrics: about a minute for a verse and a chorus, longer as the words do. The model usually ends the song by itself, well short of the ceiling. The ceiling is for when it does not: on very few lines it can sing on long after the words have run out. Reaching it cuts the song off mid-phrase, and the node says so when that happens. Changing this number changes the song itself, not only its length -- it sizes the attention cache, and the same seed under a different ceiling is a different take. Leave it alone while you are hunting for a seed. |
| keep_model_loaded | BOOLEAN | false | Keep the 6.8 GB model on the card after the run. On saves about five seconds per run while you iterate on lyrics or seeds, and holds the VRAM until ComfyUI restarts or another YuE2 run needs a different model. Off frees it immediately, which is what you want when video or image nodes run next in the same graph. |
| cfg_scaleopt | FLOAT | 0.000–20 | Classifier-free guidance. 0 means 'use the value the model was released with' -- 1.0 normally, 1.01 when 'cot' is 'off'. Anything other than 1.0 runs a second, unconditional branch: the song takes about twice as long and needs about twice the KV cache. Raise it only when the result ignores the style. |
| vaeopt | COMBO | standard | Which audio decoder turns the latents into sound. 'standard' is the one released for listening. 'legacy' is the decoder the published benchmark numbers were measured with; use it only to reproduce those. They are different weights of the same size, and the same latents decoded by each will not sound identical. |
| deviceopt | COMBO | auto | Which device generates the song. 'auto' follows ComfyUI. Pick a second card and two things change: the model no longer competes with ComfyUI's own for VRAM, and 'keep_model_loaded' becomes worth turning on, because nothing has to be evicted to make room. Two YuE2 nodes with different devices in one graph will reload 6.8 GB on every run, because the loaded model is cached per device. 'cpu' works and takes roughly an hour per song. No CUDA device is visible to ComfyUI, so only 'cpu' will do anything. |
| attention_backendopt | COMBO | sdpa | Which attention kernel the decode loop uses. 'sdpa' is the default and is reproducible: the same seed gives the same song. 'cudnn' is about 17 percent faster and is NOT reproducible -- measured over four runs of one seed it produced four different songs. Use it only when you are exploring and do not need to come back to a result. |
| downloadopt | COMBO | auto | Where to get the weights when they are not on this machine yet. 'auto' fetches Comfy-Org's single checkpoint into ComfyUI/models/checkpoints. That is the same file ComfyUI's own YuE2 nodes read, so one download serves both, and the model manager may well have put it there already. 'original' fetches the three files m-a-p released, into ComfyUI/models/YuE2. It is the only source of the legacy decoder, and 'auto' switches to it by itself when 'vae' is 'legacy'. 'off' downloads nothing and says instead which files are missing, the direct link to each, and the exact folder to put it in. |
| quantizationopt | COMBO | bf16 | Which build of the checkpoint to download. 'bf16' is the model as released. 'int8' is Comfy-Org's quantized build: 3.69 GB to fetch instead of 7.26 GB. It saves the download and not the VRAM. This pack's layers are ordinary torch linears, so an INT8 file is restored to BF16 as it loads and the card holds the same 6.8 GB either way. It is also not quite the same model -- the round trip costs about a percent of each weight -- so the same seed gives a different song from the two files. Whatever is already on disk is used before anything is downloaded. |
| ode_stepsopt | INT | 328–64 | Solver steps for the acoustic stage. 32 is what the model was released with. Fewer is faster and thinner; more costs time and changes the result rather than clearly improving it. |
| abc_temperatureopt | FLOAT | 0.700–5 | Sampling for the score stage. The defaults are the released values. |
| abc_top_popt | FLOAT | 0.900.01–1 | Sampling for the score stage. The defaults are the released values. |
| abc_top_kopt | INT | 301–1000 | Sampling for the score stage. The defaults are the released values. |
| temperatureopt | FLOAT | 1.000–5 | Sampling for the song stage. The defaults are the released values. |
| top_popt | FLOAT | 0.950.01–1 | Sampling for the song stage. The defaults are the released values. |
| top_kopt | INT | 1001–1000 | Sampling for the song stage. The defaults are the released values. |
| repetition_penaltyopt | FLOAT | 1.2000.1–5 | Sampling for the song stage. The defaults are the released values. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | YUE2_OPTIONS | — |