XB-BOX - 🎵 YuE2 转谱导入
What Transcription Intake fixes, and what it refuses to
- abc
- 报告
Here's the workflow this node belongs to: you have a song, or a hummed idea, and you want YuE2 to re-sing it. YuE2's cover path takes a symbolic score - a melody line - not an audio file. So something has to turn audio into notation first, and that something is SheetSage2, an audio-to-ABC transcriber that the official docs treat as its own pipeline.
SheetSage2 needs a separate Python environment (Python 3.10/3.11 with torch 2.8/cu126) precisely because its dependencies fight YuE2's. So XB-BOX - 🎵 YuE2 转谱导入 (Transcription Intake) does not transcribe anything. It reads the transcriber's output, normalises it mechanically, validates it against YuE2's native ABC dialect, and emits a score you can actually use - plus a report.
Inputs and outputs
转谱路径 / Path is the one you set: a SheetSage2 output folder, or a direct path to score.abc or events.json. Point it at a folder and it looks for score.abc first (melody.abc / cover.abc are also recognised) and falls back to events.json. Relative paths resolve against ComfyUI's input directory, absolute paths are used as-is - that's the single most common confusion, because your shell's working directory is irrelevant.
规范化 / Normalize is on by default and applies only the mechanical entries of the official repair table: strip the BOM, Markdown code fences and curly quotes, trim trailing whitespace, and rewrite M:C → M:4/4, Q:81 → Q:1/4=81, K:B minor → K:Bm. Every change it makes is written into the report line by line.
The optional abc input takes an upstream score for comparison - handy when you're checking that a round trip through an editor didn't lose notes.
Outputs are abc, which feeds Cover Prep, the Score Workbench, or the official music node directly, and 报告 / Report.
The line it deliberately won't cross
Semantic repairs are left to you. Unrolling repeats, quantising tuplets, adding rests - the node doesn't guess any of it, because guessing at musical intent is how you get a plausible-looking score that sings the wrong thing. When validation fails on something semantic, you get the official validator's own error message verbatim. Read it; it's usually specific about which bar is malformed.
The report also carries a disclaimer every single time, and it's the most important sentence in the node: these are symbolic-layer conclusions, they don't predict audio results, and transcription error is an independent error source. The comparison mode proves the notes survived onto the score the transcriber produced. It does not prove that score is faithful to the recording - SheetSage2 has its own accuracy, and no amount of node checking changes that.
Practical notes
- A truncated or mangled
score.abcfails validation rather than silently compiling. Open it in a text editor, fix the obvious truncation, and re-run rather than assuming the node is broken. - Normalized does not mean correct. The repairs are typographic; they will not fix a missing repeat sign.
- The whole point of the pair is the loop: transcribe outside ComfyUI, import here, clean in the Score Workbench, condition in Cover Prep, sing in the official node. Each stage is inspectable, which is more than you get from a single black-box reroll.
Install
ComfyUI Manager, search XB_ToolBox, or:
cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/XB_ToolBox.git
Restart ComfyUI. This node needs the native YuE2GenerateABC / YuE2GenerateMusic nodes somewhere in your build for the rest of the chain to do anything, but the intake itself is plain file reading and standard-library ABC parsing - no pip install, no network. Drop your SheetSage2 output under ComfyUI/input/ and you're set.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| 转谱路径 | STRING | SheetSage2 的输出目录,或直接指向 score.abc / events.json。 目录时会自动找 score.abc,找不到再用 events.json; 相对路径按 ComfyUI 的 input 目录解析,绝对路径原样使用 | |
| 规范化 | BOOLEAN | true | 按官方 abc-repair.md 做机械规范化:去 BOM / Markdown 围栏 / 弯引号 / 行尾空白,M:C→M:4/4,Q:81→Q:1/4=81,K:B minor→K:Bm。 改动会逐条写进报告;语义性修复不会做 |
| abcopt | STRING | 可选:接入上游谱面做比对方(留空则只处理文件) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| abc | STRING | — |
| 报告 | STRING | — |