SC YuE2 ABC Fix Meter
That One Bar of 7/8 Is Why Your YuE2 Song Stumbles
- abc
- report
YuE2 songs mostly sit in one tidy meter with one tempo, and then every so often the model writes a single bar in 7/8 in the middle of a 4/4 song. You don't see it in the waveform, you hear it: one bar lands a beat early, the groove limps, and then it's fine again. It's not a prompting problem and it's not your seed being cursed. The score just has a bad bar in it.
SC YuE2 ABC Fix Meter is the node that patches those bars. It's a text surgeon, not a regenerator - which matters, because on a YuE2 workflow the expensive, seed-dependent half is generating the score in the first place. Re-rolling a whole song to fix eight beats is a waste of a good take.
Where this sits in a YuE2 workflow
YuE2 runs as two stages in ComfyUI: YuE2 Generate ABC writes a text score in ABC notation - meter, tempo, sections, chord symbols, lyrics aligned to bars - and YuE2 Generate Music renders audio from that score. Because the score is plain text, everything you'd normally fix by hand in a DAW is a string edit here. This pack is four nodes pointed at that seam, and Fix Meter is the one you reach for when the score is good except for one bad bar.
The bundled example workflow wires them in a straight line: Length Search → Fix Meter → Speed Change → YuE2 Generate Music. That order is deliberate. Fix the meter while the score is still unmodified, then adjust tempo.
How it actually works
The node reads your score's header to learn the real meter and the note unit (M: and L: lines). Then it walks the body voice by voice. When it finds an M: line inside the Vocal voice that disagrees with the header meter, it computes the difference in note units and handles it one of two ways:
- A short bar (7/8 in 4/4) gets a rest inserted at its start. The pickup notes at the end of the bar stay exactly where they are, which is the right call - you'd hear the opposite fix immediately.
- A long bar (9/8 in 4/4) gets the extra time trimmed out of its rests, earliest rests first, so no notes are lost. If there isn't enough rest to trim, it refuses to touch it rather than eating a note.
One detail worth noticing: a glitch is only repaired if every voice's bar in that section can be fixed. If one voice can't be cleaned up, the whole glitch is left alone and reported as a warning. That keeps your voices lined up instead of fixing the vocal and breaking the accompaniment. The now-pointless M: lines around a repaired bar get removed, so the score reads as if the glitch never happened.
Inputs and outputs
There's exactly one input worth talking about, and it's abc - the score text, wired in from the score-producing node. Note that it's input-only, so you can't paste a score into the box; it has to come from a connection. Two outputs: abc, the repaired score, which you feed into Speed Change or straight into YuE2 Generate Music, and report, a plain-language list of what got fixed.
This node has no run button of its own, so nothing happens unless something downstream actually consumes it. Wire it into the chain or hang a preview off it.
Install
You need a fairly recent ComfyUI - this pack uses the V3 node API and calls into the built-in YuE2 nodes, so an older install won't load it at all. No Python packages are involved (the pack declares zero dependencies), so it's a clean install.
In ComfyUI Manager, search for SC YuE2 ABC Helpers and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ShantyCircuit/ComfyUI-SC-YuE2-ABC-Helpers
Then restart ComfyUI and hard-refresh the browser (Ctrl+Shift+R). All four nodes show up under ShantyCircuit/YuE2 in the node menu. The model itself (yue2_3b_bf16.safetensors in the example workflow) loads through a normal CheckpointLoaderSimple; this pack ships no weights.
When it doesn't do what you wanted
- The text box is missing. The node's summary panel comes from a frontend script in the pack's
jsfolder. If you copied__init__.pysomewhere by hand, you left it behind. Refresh hard, browsers cache ComfyUI's scripts hard. - It says "No meter glitches found; the score is unchanged." That's the pass-through case, not an error. It only reacts to mid-score meter changes inside the Vocal voice.
- You get a "left as is" warning. The long bar didn't have enough rest to trim without deleting notes. Shorten the bar yourself, or re-roll the score and accept a different take.
- Your intentional 7/8 section was ignored. Only one-bar glitches are candidates. A real metre change that spans a section is left alone on purpose.
If you're going to keep regenerating songs until one is clean, don't - repair the score you have. That's the whole argument for this node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| abcopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| abc | STRING | — |
| report | STRING | — |