Text to Music
Generate a complete song from a music style description and your own lyrics. With ABC planning enabled, YuE2 first creates an editable symbolic music plan (melody and optionally chords), then generates the final audio from that plan.
Download Workflow
Download JSON or search “YuE2: Text to Music” in Template Library
1. Steps to Run
- Write a description of the music you want in Style
- Enter your song lyrics in Lyrics using section tags such as
[Verse]and[Chorus] - Choose a planning Mode:
fullgenerates melody and chords,melodygenerates the melody only - Set the Max Duration of the song
- Queue the workflow to generate the song
2. Model Download
YuE2 checkpoint
yue2_3b_int8_convrot.safetensors
3. Writing the Style
Describe the main musical characteristics. Useful elements include:- Genre: pop, jazz, rock, electronic, folk
- Vocals: warm female vocal, expressive male vocal, soft vocals
- Language: English, Chinese, Japanese, and more
- Tempo: 90 BPM, slow, upbeat
- Instruments: piano, electric guitar, bass, drums, synths
English, warm female vocal, contemporary pop, 96 BPM, piano, rounded electric bass, restrained drums, clear dictionKeep musical instructions in Style rather than in the lyrics.
4. Writing the Lyrics
Use section tags to describe the song structure:[Verse], [Chorus], [Bridge], and [Outro]. Put only the words intended to be sung in the lyrics field.
5. ABC Planning
The Mode option controls the symbolic planning step:- full: creates a plan with melody and chords before generating the song. Recommended for general text-to-music generation.
- melody: creates a melody-only plan and lets the accompaniment be generated more freely.
6. Max Duration
Max Duration sets the maximum length of the generated song in seconds, up to 900. The generation budget is 25 semantic tokens per second of requested duration, and sampling stops as soon as the model writes the song’s end token, so a song whose structure finishes early can end well before the limit. The Text to Music template sets this to 120 seconds, and Music Cover keeps the node’s 360-second default. The requested duration is capped by the model’s context. When the style, lyrics, and ABC plan claim more of the context than the run can spare, ComfyUI lowers the budget to what is left and reports it in the console:YuE2 music budget reduced to ... tokens (... seconds) to fit the prompt. A long prompt therefore shortens the song instead of failing the run. When nothing is left at all, the run stops with YuE2 prompt leaves no room for music; shorten the style, lyrics, or ABC.
When the console reports a YuE2 semantic reached its token budget before the end token. warning, the model ran out of budget before it wrote the song’s end token, and the rendered audio can stop abruptly instead of finishing the song, because those semantic tokens are the song content the audio stage renders. Raise Max Duration to give the song more room. If the same run also logged a budget reduction, the prompt is already using the available context, so shorten the style, lyrics, or ABC plan instead. The notation phase reports the same warning as YuE2 abc reached its token budget before the end token., where the score itself is cut short and the YuE2 Generate ABC node’s max_abc_tokens is the budget to raise.
7. Guidance Scale
The YuE2 Generate Music node has an advancedcfg_scale option (0 to 100, default 1.0) that sets autoregressive guidance on style and lyrics:
1.0disables guidance, which matches the ABC workflow. The included templates keep this default1.01matches the guidance scale the model used before this option was added, for runs where planning is disabled (abcleft empty)
Music Cover
Create a new version of an existing song. This workflow uses SheetSage2 to transcribe the melody from a reference audio into an editable ABC score, then uses YuE2 to regenerate the song with a new style and lyrics.
Download Workflow
Download JSON or search “YuE2: Music Cover” in Template Library
LoadAudio node:
yue2_reference_song.flac
LoadAudio node · yue2_reference_song.flac1. Steps to Run
- Load a reference song in Audio
- Describe the new musical direction in Style
- Enter the lyrics you want to sing in Lyrics
- Queue the workflow to generate a new cover version
2. Model Downloads
YuE2 checkpoint
yue2_3b_int8_convrot.safetensors
SheetSage2 audio encoder
sheetsage2_bf16.safetensors
3. How the Cover Works
The workflow does not feed the reference audio to YuE2 directly. Instead:4. Writing the Style and Lyrics
Describe the target musical style clearly. Useful elements include genre, vocal type, language, tempo, instruments, and mood:English, soulful jazz-pop, expressive male vocal, relaxed 88 BPM, Rhodes piano, upright bass, brushed drums, warm saxophone, intimate late-night atmosphereUse the same
[Verse] / [Chorus] / [Bridge] / [Outro] section tags as the text-to-music workflow. For better melody matching, keep the new lyrics close in length to the original lines.