YuE2 Instrumental Prep
Keep the score, fire the singer
- abc
- lyrics
- max_duration
- score_seconds
- bars
- bpm
- info
YuE2 doesn't one-shot audio from a prompt - it composes first, writing a symbolic ABC score, and then performs that score into sound. Which means the useful place to intervene is the score, not the audio. SBL_YuE2Instrumental makes one surgical change to it: every note in the Vocal line becomes a rest of the same length. Re-render, and the band shows up while nobody sings.
Why you'd want that: vocals are the weak seam of local music generation. Instrumentals closed the gap with the paid tools; clean sung vocals didn't. YuE2 is the lyric-first alternative and it does sing, but it swallows syllables - so the instrumental pass is often the best thing to do with a plan you like. Karaoke version of a take you already have, or a backing bed for a video with no lyrics to fight.
The other route is stemming after the fact, which costs you a render and never separates AI vocals cleanly. This does it upstream: the vocals are never generated at all.
What it actually does to the score
Three jobs, all text arithmetic.
1. It mutes the Vocal voice. It walks the ABC body - everything after the header's K: line - and wherever a V: selector names Vocal, it rewrites the lines that follow. Pitched notes become z with the same written duration, note-chords [CEG]2 become z2, grace notes are dropped, dead ties cleaned. Barlines, durations and tuplets are untouched, so the timing survives; chord symbols stay, because the harmony is the point:
"Dm"A8z16A2G2F2G2- -> "Dm"z8z16z2z2z2z2
Quoted chords, inline fields like [K:Dm] and decorations like !f! are masked first, so Dm never gets mistaken for a note.
2. It writes section-only lyrics. It scans the score's % verse / % chorus comments, normalises a spelling or two (prechorus → pre-chorus), keeps recognised section names, and emits bracket tags - one per line, no words. That's deliberate: real lyrics on a score with nothing to sing is a contradiction YuE2 handles badly, and a score with no section comments gets [intro]/[outro] instead of your old lyric sheet.
3. It does the duration math. M: meter and Q: tempo (including the Q:1/2=96 form), bars counted in the Ins voice with a fallback to Vocal, multi-measure rests like Z3 counted as three bars. Then max_duration is the score's theoretical length plus padding, rounded up to a whole second.
The inputs and outputs that matter
abc- the score. The author setforceInputon it, so there is no text box on this node: it renders as a socket and you wire the score in. No pasting.padding_seconds- 0 to 30, default 0, 0.1 steps. Headroom.max_durationis a ceiling in YuE2, not a request, so this is insurance for a plan that runs slightly long.
Outputs: abc (the muted score), lyrics (the section tags), max_duration, plus score_seconds, bars, bpm and info. The author's own docstring maps the first three straight onto YuE2 Generate Music - abc → abc, lyrics → lyrics, max_duration → max_duration - the handshake that keeps the plan and the rest of the graph agreeing on song length.
Read info every time: meter, BPM, bar count, theoretical seconds, the final clamped max_duration, the section chain, and how many Vocal lines were rewritten. vocal lines muted: 0 is the number you're looking for.
Install
It ships in the SBL utility pack and needs nothing but ComfyUI itself - no pip dependencies (requirements.txt is a comment saying so), no model files, no downloads.
ComfyUI Manager → search SBL, or:
cd ComfyUI/custom_nodes
git clone https://github.com/SoftByteLabs/SBL
Restart ComfyUI; the node shows up as YuE2 Instrumental Prep in the SBL category. Small wrinkle: it's newer than the README, which documents the other seven nodes and never mentions this one, so don't hunt for it in the pack's node list.
Where people get burned
- Nothing gets muted. The rewrite only fires on body lines after a selector matching
Vocal, followingK:. A score that names its voice something else, or never emits the selector, passes through with the vocal intact. Wireabcinto a text preview and look at the Vocal voice - you wantzeverywhere. could not determine the ABC bar count. NoV: Insand noV: Vocalbody voice, or no bar separators. An unparseableM:orQ:raises earlier instead -invalid M: meter,invalid Q: tempo.- The error prefix says
H3 Instrumental. Leftover internal name, not a different node. Grepping your console forSBL_YuE2Instrumentalwill come up empty; search the message text. - It parses, it doesn't validate. Feed it your lyric sheet instead of a score and you get silence rather than a complaint. And a score with no
%section comments gives you[intro]and[outro]only - legal, but thin conditioning.
One honest limit: the output is a muted score, not a finished instrumental, and there's no un-mute. Decide later that you wanted the singing and you re-render the original plan - so keep the untouched abc. It's a few kilobytes of text, and the only copy of that melody.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| abc | STRING | Connect a native YuE2 two-voice ABC score. Transfers the Vocal melody to Ins, keeping pitches, note timing and chord symbols. Empty or whitespace-only input returns zero numbers and empty strings. | |
| padding_seconds | FLOAT | 0.00–30 | Add 0–30 seconds to the calculated score length before rounding up the recommended maximum duration. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| abc | STRING | ABC with the Vocal melody transferred to Ins and the Vocal part replaced by rests; chord symbols are preserved. |
| lyrics | STRING | Section tags read from ABC comments, without sung words. |
| max_duration | FLOAT | Suggested maximum duration (seconds), including optional padding; not an exact generation length. |
| score_seconds | FLOAT | Theoretical duration of the ABC score in seconds. |
| bars | INT | Number of measures in the two-voice score. |
| bpm | FLOAT | Tempo from the Q: field (beats per minute). |
| info | STRING | Transfer summary, including the number of Vocal notes and overlapping Ins events. |