Nodes/ComfyUI-FL-YuE2/FL YuE2 · Render Music
ComfyUI Node

FL YuE2 · Render Music

Max_duration is a ceiling, and your seed isn't on this node

By filliptm·Created 3 days ago·Updated 3 days ago· 9
FL YuE2 · Render Music
  • music_model
  • composition
  • music_latents
max_duration360
acoustic_steps32
temperature1.00
top_p0.95
top_k100
repetition_penalty1.20
guidance1.00

Render Music is the expensive one. Everything before it is cheap - Compose writes a score in seconds, the Piano Roll is a text editor with piano keys - and everything after it is a decoder. This is where your GPU spins for a minute or three producing an actual song.

Two stages happen in here, and knowing that explains nearly every widget.

First, autoregressive music-token generation: the model reads your composition and emits codec tokens, one at a time, at a fixed 25 tokens per second of audio. Second, an acoustic synthesis pass turns those tokens into 64-channel latents using a flow-matching model solved with the released midpoint solver. The README's framing is the honest one: acoustic_steps=32 is the midpoint solver the upstream release shipped, and fewer steps are for quick tests, not for a better song. This second stage is where most of the polish comes from and most of the minutes go.

The two required settings

max_duration - maximum seconds of music, 8 to 360, default 360. It's an upper bound, not a request. The model can and will finish early: a natural ending at 2:14 is a success, not a bug. What you get if you set it too low is a cut-off ending, and the node tells you so in its status text. That's the difference between "the model wrote a short song" and "I capped it at 45 seconds", and it's worth watching the node's message after each queue.

acoustic_steps - a quality knob for stage two, not length. 32 is the default and the reference point; drop it for exploratory passes where you only care whether the arrangement works.

The optional ones, and which you should touch

temperature (1.0; 0 gives greedy sampling), top_p (0.95), top_k (100) and repetition_penalty (1.2) are standard token-sampling knobs. The defaults match the release. Leave them alone until you have a specific complaint - if a generation loops or breaks down, repetition_penalty is the first one I'd nudge.

Then guidance, and this one has a sting in it. 1.0 is the default for score-conditioned music; direct generation's upstream default is 1.01. Any value other than 1.0 makes the node run two generation branches - that's classifier-free guidance done by batching a negative branch alongside the positive one, and it costs you roughly double the time and memory. For a 0.01 difference over off mode... you can decide whether the upstream author's 1.01 is worth it. For a normal score-conditioned run, keep 1.0.

And note what isn't here: there's no seed widget. The seed lives on Compose, travels inside the composition payload, and Render reuses it - including for the noise draw in the acoustic stage. Rerolling a render means rerolling Compose.

Output and wiring

One output, music_latents, type YUE2_LATENTS, shaped [batch, 64, frames]. It goes to exactly one place: the Decode Audio node, which owns the stereo VAE. Don't try to feed these latents to anything else in ComfyUI - there's no core node that knows what they are.

Load Models ─┬─> Compose ──> Render Music ──> Decode Audio ──> Preview Audio
             │                                    (audio_decoder)
             └──────────────────────────────> Decode Audio

Speed reference, so you know whether your machine is behaving: on the author's validated rig (RTX PRO 6000 Blackwell), the shipped example workflow produced a 66.7-second vocal song in about 57 seconds end to end. The example workflow's 45-second cap is what keeps casual runs short. On a 24 GB consumer card you're in unvalidated territory - the author says so explicitly - so keep max_duration short and decode tiles modest.

When it breaks

The song ends abruptly. Raise max_duration. The node logs when the token limit was reached, so trust that message rather than the vibe of the last chord.

"YuE2 produced no music tokens." Rare, but it happens with a bad seed or lyrics that fight the style. Change one of them.

"YuE2 plan changed. Submit edited ABC through the Plan node." You edited the Compose widget after the plan was built. Re-queue Compose, then Render. This guard exists so you never render a song whose score doesn't match what's on screen.

Out of memory. Reduce max_duration first - it's the token budget - then reduce decode tile size, close other GPU workloads, and retry. The pack uses ComfyUI's model management and deliberately doesn't move global CUDA memory limits, so tune at the node, not in an env var.

CategoryFL YuE2

Inputs (9)

NameTypeDefaultDescription
music_modelYUE2_MODEL
compositionYUE2_PLAN
max_durationINT3608–360Maximum seconds of generated music. Increase this if the ending is cut off.
acoustic_stepsINT321–6432 matches the released midpoint solver. Fewer steps are useful for quick tests.
temperatureoptFLOAT1.000–5Music-token sampling randomness. 0 uses greedy sampling.
top_poptFLOAT0.950.01–1
top_koptINT1001–1000
repetition_penaltyoptFLOAT1.200.1–3
guidanceoptFLOAT1.000–201.0 is the default for score-conditioned music. Direct mode's upstream default is 1.01. Values other than 1 use two generation branches.

Outputs (1)

NameTypeDescription
music_latentsYUE2_LATENTS