YuE2 音乐提示词与歌词创作(T8)
The YuE2 Node That Writes the Lyrics and Never Touches the Music Model
- provider_config
- style
- lyrics
- abc
- yue2_request_json
- creation_report_json
The name says "prompt enhancer," and the first thing to know is what it does not do: it never generates audio. No YuE2 weights, no music-model download, no GPU time for the song itself. It hands you three text artifacts - a style string, lyrics, and optionally a cleaned-up ABC score - plus a request JSON in the official YuE2 contract.
Where this sits in a music workflow
Local music generation is a thin corner of the ComfyUI world. ACE-Step owns the open-slot mindshare there, and its weak suit is the lyrics. The other local lineage, YuE, sits further out still - 16GB+ VRAM, a ~15GB download, and almost nobody in this community ever ran it. YuE2 is that lineage's next step, and its official skill wants a compact musical description, the sung lyrics, and optionally a symbolic score. Writing those well is the tedious part, and that's the job here: describe the song in plain language and yue2_request_json hands you the official contract for the YuE2 CLI. Rendering with ACE-Step instead? Use the sibling Music 3 node from the same pack - same install, different caption protocol.
How it works
It's a two-stage LLM pipeline, and the cost is visible: a new song is usually two requests (lyrics, then style), preserve/instrumental is one, and 创作审校 / Reviewed adds a scoring pass plus at most one repair. creativity is just temperature (0.3 / 0.7 / 1.0).
The mode handling is where the author earned their keep. 严格保留歌词 / Preserve never sends your lyrics to the model at all - they pass through byte-for-byte, including line endings - and the LLM only writes the style. 定向改词 / Edit section finds the Nth standalone [Chorus]-style tag, sends only that section's body to be rewritten, and splices everything else back untouched; if the model sneaks section tags into the replacement, the node errors rather than corrupt the range you protected. AUTO preserves when lyrics is filled, and writes new ones when it isn't.
Score planning (cot) is full, melody, or off. Paste an ABC score and it's validated against YuE2's narrow two-voice dialect before any paid call; abc_action can strip chord symbols after comparing sounding notes and the bar grid in both the Vocal and Ins voices. Ask for melody with chords still in and it refuses. The abc output is your processed score, empty if you gave none - it never invents one.
Inputs and outputs that matter
You'll realistically set seven: music_idea (required - empty is a hard error), lyrics_mode, lyrics_language, lyrics (preserve/edit only), api_mode, quality_mode, and seed. Everything else - genre, instruments, vocal, structure, bpm, constraints, style_language and friends - hides in the collapsed advanced panel, worth opening once you care about arrangement. Two traps live in there. seed is the writing seed; yue2_seed is the audio-generation seed that goes into the exported JSON. And cfg_scale is not a creativity dial - -1 means "official default," which is what you want.
style and lyrics go to your music model's corresponding inputs, abc to a score input if you use one. yue2_request_json carries only style, lyrics, cot, seed, id and optionally abc/cfg_scale - no invented duration or phoneme fields. creation_report_json logs stages, the real request count, the preservation checks and warnings, without your lyrics or key. Caveat: the score out of 100 that 创作审校 produces comes from an LLM reading text, not a listening test - the report itself says audio_generated: false.
Install
Cloud mode needs no new Python packages - it reuses ComfyUI's requests. The real install:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-prompt-enhancer-T8.git
Then restart ComfyUI fully and hit Ctrl+F5 in the browser. Manager equivalent: search MiniMax H3 / Seedance 2.0 / Music 3 Prompt Enhancer (T8), or comfy node install minimax-h3-seedance-music3-prompt-enhancer-t8.
For the free local path you need a GGUF chat model in ComfyUI/models/LLM plus a runtime - llama-cpp-python, or the pack's own install_local_qwen.py --runtime. Nothing downloads silently, the 27B Q4_K_M is ~15.9GiB, and 24GB of VRAM keeps it pleasant. This node is text-only, so it never loads a vision projector.
Where people get burned
The install that succeeds and adds nothing. The README is blunt that Manager can roll you back to an older Active release while a newer one sits in review - "install/reinstall successful," new nodes missing. YuE2 arrived in 1.15.0, so on an older release the node simply doesn't exist. Update from GitHub, and never keep two copies of this pack in custom_nodes.
Truncated JSON. Small local models have returned unclosed JSON even with finish_reason=stop, so the node now demands explicit JSON schemas. If it still fails, raise llm_max_tokens - thinking shares that budget.
Default provider is a reseller. api_mode defaults to the author's own paid endpoint, and the README doubles as a shopfront. That's fine, not mandatory: any OpenAI-compatible endpoint works, and local mode needs no key.
The official snapshot is hash-checked. Edit official_skills/ by hand or land a partial ZIP and the node refuses to run - which is also why it can't silently drift from the contract it claims to follow.
Inputs (43)
| Name | Type | Default | Description |
|---|---|---|---|
| music_idea | STRING | — | |
| lyrics_mode | COMBO | AUTO(有词保留,无词创作) | 5 options: AUTO(有词保留,无词创作), 生成新歌词 / New lyrics, 严格保留歌词 / Preserve, 定向改词 / Edit section, 纯器乐 / Instrumental |
| lyrics_language | COMBO | 中文 | 4 options: 中文, English, 日本語, 한국어 |
| lyrics | STRING | — | |
| cot | COMBO | full(完整谱面,默认) | 3 options: full(完整谱面,默认), melody(旋律谱面), off(不使用谱面) |
| api_mode | COMBO | 贞贞平价小屋(推荐) | 4 options: 贞贞平价小屋(推荐), 贞贞的AI工坊(图片/视频), OpenAI兼容接口(备用), 本地 GGUF(llama.cpp / Qwen,离线) |
| quality_mode | COMBO | 标准 / Standard | 2 options: 标准 / Standard, 创作审校 / Reviewed |
| seed | INT | 00–9007199254740991 | — |
| style_language | COMBO | English | 2 options: English, 中文 |
| structure | STRING | — | |
| genre | STRING | — | |
| vocal | STRING | — | |
| instruments | STRING | — | |
| bpm | INT | 00–9007199254740991 | — |
| meter | COMBO | AUTO | 5 options: AUTO, 4/4, 3/4, 6/8, 7/8 |
| key_scale | STRING | — | |
| constraints | STRING | — | |
| target_duration_seconds | INT | 00–9007199254740991 | — |
| creativity | COMBO | balanced | 3 options: strict, balanced, creative |
| edit_section | STRING | Chorus | — |
| edit_occurrence | INT | 11–9007199254740991 | — |
| edit_request | STRING | — | |
| abc | STRING | — | |
| abc_action | COMBO | 保留 / Preserve | 2 options: 保留 / Preserve, 去和弦,保留双声部旋律 / Strip chords |
| yue2_seed | INT | 8310010–9007199254740991 | — |
| song_id | STRING | song | — |
| cfg_scale | FLOAT | -1.00-1–20 | — |
| ai_workshop_model | COMBO | gemini-3.5-flash | 2 options: gemini-3.5-flash, Custom(自定义) |
| custom_model | STRING | — | |
| openai_base_url | STRING | — | |
| llm_max_tokens | INT | 16384256–61440 | — |
| local_model | COMBO | Qwen3.8-27B-Q4_K_M.gguf | 1 options: Qwen3.8-27B-Q4_K_M.gguf |
| local_context_size | INT | 327688192–65536 | — |
| local_max_tokens | INT | 16384256–61440 | — |
| local_think_mode | COMBO | 关闭(推荐,速度优先) | 2 options: 关闭(推荐,速度优先), 开启(质量优先) |
| local_reasoning_effort | COMBO | medium | 3 options: low, medium, xhigh |
| local_unload_policy | COMBO | 执行后卸载(推荐) | 3 options: 执行后卸载(推荐), 保持驻留, 空闲10分钟后卸载 |
| local_comfy_memory_policy | COMBO | AUTO(显存不足时释放) | 2 options: AUTO(显存不足时释放), 不主动释放 ComfyUI 模型 |
| recovery_slot | STRING | — | |
| recovery_action | STRING | normal | — |
| abc_source | COMBO | 自动创作 ABC(T8 LLM)/ Compose | 2 options: 自动创作 ABC(T8 LLM)/ Compose, 交给下游 YuE2 规划(ABC 留空)/ Downstream |
| api_keyopt | STRING | — | |
| provider_configopt | T8_LLM_PROVIDER_CONFIG | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| style | STRING | — |
| lyrics | STRING | — |
| abc | STRING | — |
| yue2_request_json | STRING | — |
| creation_report_json | STRING | — |