YuE2 Official Generate ABC
Freeze the Composition, Then Stop Re-Rolling It
- models
- text
- options
- plan
- abc
- report
Generate ABC is the node that justifies this entire pack. It runs only the planning stage of YuE2 and hands you a SymbolicPlan - a saved artifact with the exact ABC token IDs the model produced - plus the human-readable score and a report. Everything downstream can then reuse that plan exactly, rather than re-deriving it from the printed text.
That distinction is the whole point. If you take the ABC string, paste it into a text box, and send it back through Text Encode, you get a new request. Same notes, different tokens, different performance. The plan output is how you avoid that.
How it works
The node launches the isolated YuE2 worker, runs the ABC autoregressive pass with whatever sampling config you gave it (or the official defaults if you didn't), and writes an artifact folder under ComfyUI/temp/yue2/. The plan output isn't the score - it's a reference: {"artifact_id": "plan-xxxxxxxx"}. The stage nodes pass that ID around and resolve it server-side, which is why artifact IDs get regex-validated and why a stale one comes back as "Invalid YuE2 artifact ID; connect a freshly executed YuE2 stage".
Your sampler settings from Generation Options apply here: the abc_* family plus the token ceilings.
The outputs
plan (YUE2_PLAN) goes into Semantic Tokens. Only Semantic Tokens - nothing else accepts it.
abc is the readable notation. This is what you inspect, copy, and edit by hand when the plan is 80% right.
report is JSON with token IDs, counts and timings. When a plan gets cut off at the abc_max_tokens ceiling (4096 by default), the report is where that shows up.
The two workflows this unlocks
Iterate on performance, not composition. Plan once, wire the plan into Semantic Tokens, and re-queue from there. You keep the exact melody and chords while you change semantic sampling, ODE steps or the decoder. In a one-node Generate Music graph, every queue is a new song; here you're actually comparing performances of the same one.
Compose by hand. Take the abc output, edit pitches, durations, harmony or tempo, and feed the result back through YuE2 ABC Score Input into Text Encode with cot set to full or melody. The pack ships a short hand-written demonstration in example_workflows/03-edited-abc-score.json. This is the honest path to score-conditioned generation without a source recording - no SheetSage2 runtime needed.
The ABC dialect matters. YuE2 wants native two-voice notation with Vocal and Ins parts, as described in the upstream ABC editing guide. Invent your own field names and the parser will not be gentle.
Install
Part of the pack, under audio/YuE2 Official. Same prerequisites as everything else - the isolated runtime and the converted models:
cd ComfyUI/custom_nodes
git clone https://github.com/jeankassio/ComfyUI_YuE2
cd ComfyUI_YuE2 && sh setup-runtime.sh && sh scripts/download-models.sh && sh convert-models.sh
Restart ComfyUI, then load example_workflows/02-staged-generation.json - it's the full five-node chain with this node at the top.
Things that bite
Every stage node spawns its own worker process and reloads the weights. Staging does not share a loaded model between stages; it shares an artifact. So a staged graph is slower wall-clock than the one-node pipeline, and you pay that happily because it saves you re-planning.
After updating the pack, rerun earlier stages. Cached artifacts from a previous format will not resolve, and the error will look like a wiring problem when it's really a version problem.
And be deliberate about the "same song" claim: reusing a plan holds the composition fixed, but device, runtime version and even some option changes can still move the audio. It's a much tighter comparison than two unrelated seeds - it isn't bit-exact reproducibility.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| models | YUE2_MODELS | — | |
| text | YUE2_INPUT | — | |
| optionsopt | YUE2_OPTIONS | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| plan | YUE2_PLAN | — |
| abc | STRING | — |
| report | STRING | — |