Nodes/ComfyUI_YuE/YUE_SM_Sampler
ComfyUI Node

YUE_SM_Sampler

Lyrics in, whole song out — and the four knobs that matter

By smthemex·Created 2 years ago·Updated about 14 hours ago· 190
YUE_SM_Sampler
  • model
  • vae
  • audio
styleEnglish, warm piano pop, expressive female voice, acoustic piano, rounded bass and light drums, lyrical memorable melody, unhurried phrasing, 88 BPM
lyrics[Verse] Neon fades along the lane Footsteps keep the time of rain Fold the night and leave it here Morning has a sky to clear [Chorus] Let the day come into view Every road begins with you Hold a little room for light We will sing beyond the night
cotfull
seed0
only_planfalse
abc_fileE:\ComfyUI313\ComfyUI\custom_nodes\ComfyUI_YuE\examples\melody.abc

What this actually does

This is the node you came for. Wire a model, a VAE, a style line and a lyric sheet into it and it produces a finished, sung, arranged song - up to a few minutes - as a 48 kHz stereo AUDIO socket. No schedule, no steps, no CFG slider, no negative prompt. It doesn't look like a ComfyUI sampler at all, and that's the point: the "sampling" here is a music language model writing codec tokens, not a diffusion loop over latents.

Set expectations against the field: the local music model most people know is ACE-Step, genuinely good at instrumentals and rough on vocals. YuE went the other way - an LLM that plans the song first, so choruses land where you asked and the lyrics are actually sung. When it appeared in January 2025 the headline was "Suno AI at home"; the honest reply in that thread was "YuE is the best of them all while DiffRhythm is way faster." That's still the trade: better songs, slower, hungrier.

The mechanism, in one paragraph

You write two text blocks. style and lyrics get assembled into a versioned instruction prompt - [Tags] then [Lyrics] - and the model has three ways of answering, chosen by cot. In off it goes straight from the instruction to codec tokens. In melody it first plans a chord-free melody in ABC notation, then realises it. In full it plans a chord-annotated ABC score and realises that. The plan is the interesting part: plain text, inspectable, editable - which is what makes this pack's third workflow (hand-edit a score, regenerate) possible at all. The AUDIO that comes out is then decoded by the YuE2 VAE.

The inputs you'll actually touch

model and vae come from YUE_SM_Model and YUE_SM_Vae. Then:

  • style - a comma-separated tag line: language, genre, vocal type, instruments, mood, and BPM. The default is a complete worked example ("English, warm piano pop, expressive female voice, acoustic piano, rounded bass and light drums… 88 BPM"). Copy its shape. Upstream is explicit that this is also the instruction field - don't paste your own instruction sentence into it, and keep tempo consistent with any score you supply.
  • lyrics - the full lyric sheet with [Verse] / [Chorus] / [Bridge] section tags, exactly like the default. The structure tags aren't decoration; they're how the song gets its shape. Line lengths matter more than you'd think - long, ragged lines come back with mushier phrasing.
  • cot - off / melody / full. full (the default) is the best-quality path. off is the fastest and the plainest. Use melody or full whenever an ABC score is involved. A tip that costs nothing: run the same lyrics and seed in off and in full once. Hearing what the symbolic plan buys you is the fastest way to understand this pack.
  • seed - for comparing edits, not for archiving. Same seed does not guarantee identical output across devices or software versions.
  • only_plan - the author's tooltip says it: "If True, just return the plan abc files, not the audio." This is the score-editor's mode: it writes the plan (a score.abc plus the token arrays) and skips synthesis, so you can iterate on notation without paying for audio. In this mode the AUDIO output is a one-sample dummy - read the folder, don't wire it to SaveAudio and wonder.
  • abc_file - an absolute path to an .abc score. Leave it empty for normal generation. The node also grows a "Select abc file upload" button (that's the pack's JS), which pushes a chosen .abc through the server and fills the path for you.

Output is a single audio (AUDIO) for SaveAudio / PreviewAudio, and the run additionally dumps artifacts - audio plus score and token files - into output/audio/destination_<timestamp>/.

Install and a minimal graph

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_YuE
pip install -r requirements.txt

Weights: yue2_model.safetensors in models/diffusion_models, yue2_vae.safetensors in models/vae. Then: YUE_SM_Model → model, YUE_SM_Vae → vae, SaveAudio off the output. That's a complete lyric-to-song graph. The pack ships a fuller demo in example_workflows/yue2.json - open it, because its note nodes double as the author's documentation.

Where people get burned

  • The default abc_file is the author's own Windows path (E:\ComfyUI313\...\melody.abc). The code reads that string whenever the box is non-empty, so a freshly added node will throw a file-not-found the instant you hit Run. Clear the field. This is easily the most common first-run failure.
  • cot = off plus a score is a hard error, by design. If you're covering something, use melody or full.
  • A "successful" run can be truncated. The planner is capped (roughly 4k tokens of ABC), so long, chord-dense songs can come back cut short without the node complaining. Check the duration and the ending, not just the green border.
  • Budget for the model, not the picture. YuE2's official card targets a 24GB NVIDIA card with bf16, and every node in this pack clears ComfyUI's model cache before it runs - so YuE won't sit quietly alongside a resident image model. Run songs in their own session.
CategoryYUE_SM

Inputs (8)

NameTypeDefaultDescription
modelMODEL
vaeVAE
styleSTRINGEnglish, warm piano pop, expressive female voice, acoustic piano, rounded bass and light drums, lyrical memorable melody, unhurried phrasing, 88 BPM
lyricsSTRING[Verse] Neon fades along the lane Footsteps keep the time of rain Fold the night and leave it here Morning has a sky to clear [Chorus] Let the day come into view Every road begins with you Hold a little room for light We will sing beyond the night
cotCOMBOfull3 options: full, melody, off
seedINT00–2147483647
only_planBOOLEANfalseIf True, just return the plan abc files, not the audio.
abc_fileSTRINGE:\ComfyUI313\ComfyUI\custom_nodes\ComfyUI_YuE\examples\melody.abc

Outputs (1)

NameTypeDescription
audioAUDIO