Nodes/XB_ToolBox/XB-BOX - 🎵 YuE2 风格提示
ComfyUI Node

XB-BOX - 🎵 YuE2 风格提示

The YuE2 style string, built for you — and the one thing it can't do

By wjluoxiao·Created 7 months ago·Updated a day ago· 406
XB-BOX - 🎵 YuE2 风格提示
    • style
    • max_duration
    • seed
    ◄配方自定义 / Custom►
    ◄演唱语言中文 / Chinese►
    ◄音乐风格华语流行 / Mandopop►
    ◄风格融合不指定 / Unspecified►
    ◄人声编制女声独唱 / Female Lead►
    ◄人声音色跟随风格 / Follow Style►
    ◄人声唱法跟随风格 / Follow Style►
    ◄人声效果跟随风格 / Follow Style►
    ◄速度不指定 / Unspecified►
    ◄BPM数值0►
    ◄情绪氛围不指定 / Unspecified►
    ◄主奏乐器跟随风格 / Follow Style►
    ◄辅助乐器跟随风格 / Follow Style►
    ◄编曲密度跟随风格 / Follow Style►
    ◄制作质感跟随风格 / Follow Style►
    ◄音乐特征►
    ◄自定义补充►
    ◄max_duration120►
    ◄seed0►

    YuE2's style input isn't a vibe you type. It's a structured description with six official parts - language, genre, vocal character, tempo, instruments, musical characteristics - flattened into a tag line plus one sentence. Get the shape wrong and the planner plans something adjacent to what you wanted, which is the usual reason a local song generator feels random.

    XB-BOX - 🎵 YuE2 风格提示 (Style Prompt) assembles that string from dropdowns. It has three outputs: style (STRING), which goes into the official YuE2GenerateABC / YuE2GenerateMusic node's style input; max_duration (FLOAT); and seed (INT).

    The knobs

    Start with 配方 / Recipe - 17 entries, one of which is Custom. Pick a named one and it backfills every dimension below: Mandopop Ballad, City Pop Night, English Pop, Chinese Folk New Age, Cinematic Ballad, Swing Big Band, Gospel Soul, Rock Power Ballad, Late-night Lo-fi, Healing Instrumental, Guofeng Trap and so on. Tweak anything you like; the recipe answers come back if you switch away and switch back.

    Then the six parts, split out:

    • 演唱语言 / Language - nine options, including Instrumental.
    • 音乐风格 / Genre - 32 genres. 风格融合 / Genre Fusion folds a second genre in as "with … influences", and also supplies the instrument and production defaults when those are left on Follow Style.
    • The vocal block: 人声编制 / Vocal Setup, 人声音色 / Vocal Timbre, 人声唱法 / Vocal Technique, 人声效果 / Vocal FX.
    • 速度 / Tempo Bucket (seven bands) or BPM数值 / Exact BPM, where 0 means "don't use it". If you fill the number in, it should agree with the score's Q:1/4 - a style that says 96 BPM over a score written at something else is a contradiction the model has to resolve on its own.
    • 主奏乐器 / Lead Instrument and 辅助乐器 / Supporting Instrument. These are the only place instruments get set - the ABC score has no instrument field, and the workbench's "Vocal to Ins" won't pick one for you. Set supporting to None with a lead selected and you get a solo arrangement.
    • 编曲密度 / Arrangement Density, 制作质感 / Production Texture, 情绪氛围 / Mood, then 音乐特征 / Musical Characteristics for the free-text second sentence, and 自定义补充 / Extra Notes, which is appended as a long tail.

    Two more that matter more than they look: max_duration (1–900s, default 120) is a ceiling, not a target - the model can finish early. And seed has to be identical on the planner and the renderer, or you can't reproduce a plan you liked. That's why the node outputs it: one seed, wired to both.

    What it deliberately leaves out

    No song structure, key or meter - those belong to the lyrics tags and the ABC score, so [Chorus] in a style string is just noise. No implementation instructions either; the official guide forbids things like "plan a melody with chords" in the style field outright. And no SATB-choir paradigms, because YuE2's native vocal is a single line: duet and choir settings are weak text control and won't reliably split into two voices.

    The one thing style can't do: remove singing

    Pick Instrumental as the language, or No Vocals as the vocal setup, and the node does what the official instrumental entry point does: it prefixes the tag line with Instrumental, and appends the four suppression conditions - no vocals, no singing, no choir, no spoken words - skipping any that are already present. It checks the whole style string, not just the tag line, same as the official code.

    That's necessary and nowhere near sufficient. Instrumental takes three things, and this node only does one of them:

    1. Style, as above.
    2. The score's Vocal voice must have no sounding notes - run the workbench's "Vocal to Ins", or the melody that's sitting in the score gets sung or hummed.
    3. Lyrics must be empty or section tags only - the Lyrics node's instrumental skeleton.

    The official docs are refreshingly honest that a file check can't prove the absence of vocal leakage, so the last step is your ears.

    Bonus behaviour worth knowing

    If you don't need an editable score at all, don't connect YuE2GenerateABC and leave its abc input empty. The official node drops into off mode automatically and goes straight from style + lyrics to audio.

    Install

    ComfyUI Manager, search XB_ToolBox, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wjluoxiao/XB_ToolBox.git
    

    Restart, and make sure your ComfyUI build ships the native YuE2GenerateABC / YuE2GenerateMusic nodes - this one only produces strings, a float and an int, so it loads fine anywhere but does nothing on its own.

    CategoryJZL/YuE2

    Inputs (19)

    NameTypeDefaultDescription
    配方COMBO自定义 / Custom一键配方:切换后自动回填下方全部维度(官方 Guide 的六段搭配),仍可手动微调;切走再切回即可恢复配方值
    演唱语言COMBO中文 / Chinese官方 Guide 的第一段(语言)。 选「纯音乐」会自动省略人声段,并按官方器乐入口补齐四个抑制条件:no vocals / no singing / no choir / no spoken words(哼唱与念白也排除)。 ⚠️ 光靠 style 不足以去掉人声:官方纯音乐链路必须同时做两件事 —— ① 谱面里 Vocal 不能有发声音符(用「🎵 YuE2 乐谱工作台」的「人声移到器乐轨」); ② 歌词为空或只有段落标签(用「🎵 YuE2 歌词」的「纯音乐骨架」)。 官方明确:文件检查不能证明没有人声泄漏,最终要听音确认
    音乐风格COMBO华语流行 / Mandopop官方 Genre 段。选「跟随风格」的乐器 / 制作质感 / 音乐特征都取自这里
    风格融合COMBO不指定 / Unspecified官方允许多曲风融合:副风格会以「with … influences」并入 Genre 段
    人声编制COMBO女声独唱 / Female Lead官方 Vocal Character 段。 选「无主唱」等价于纯音乐(人声段整段省略)。 ⚠️ YuE2 原生 Vocal 只有一条单声部旋律线:对唱 / 合唱属于文本弱控制,不保证真的分成两个声部。 ⚠️ 要做纯音乐必须把谱面的 Vocal 旋律移到 Ins 轨,否则谱面里本来就有唱旋律 → 会被人声唱/哼出来
    人声音色COMBO跟随风格 / Follow Style官方 Vocal Character 段里的音色描述(warm / breathy / clear bright…)
    人声唱法COMBO跟随风格 / Follow Style咬字/律动/技法。官方示例里的 clear diction 属于这一段
    人声效果COMBO跟随风格 / Follow Style人声后期。YuE2 没有官方人声效果范式,这里只写进 style 做弱控制
    速度COMBO不指定 / Unspecified档位措辞;想写官方式精确值请填下面的 BPM数值(填了以后档位不参与拼接)
    BPM数值INT00–3000 = 不使用。官方示例写法是「96 BPM」,填了就按精确值输出,并要求与谱面的 Q:1/4 一致
    情绪氛围COMBO不指定 / Unspecified音乐特征句开头的情绪定语(如「Melancholic and wistful.」)。留空则只输出曲风的特征句
    主奏乐器COMBO跟随风格 / Follow Style官方 Instruments 段的主奏乐器;「跟随风格」取所选曲风的默认编制
    辅助乐器COMBO跟随风格 / Follow Style官方 Instruments 段的辅助乐器。选「无」+主奏乐器=独奏编制(输出 solo <乐器>)。 ⚠️ 这是唯一能指定乐器的地方:ABC 谱面里没有乐器字段,「人声移到器乐轨」也不会替你选乐器
    编曲密度COMBO跟随风格 / Follow Style配器的疏密(极简留白 / 标准 / 饱满丰富 / 密集推进)。留空则交由模型按曲风处理
    制作质感COMBO跟随风格 / Follow Style官方 Musical Characteristics 里的制作质感描述
    音乐特征STRING官方示例的第二句(Catchy and energetic, with an uplifting summer atmosphere…);留空则用曲风的默认特征句
    自定义补充STRING长尾词,直接追加到音乐特征句后面(如「现场鼓组、观众和声」)
    max_durationFLOAT1201–900官方 YuE2GenerateMusic 的 max_duration(秒):上限而非目标,模型可能提前结束。 不需要可编辑谱面时:不接 YuE2GenerateABC、abc 留空,官方节点会自动进入 off 模式
    seedINT00–9223372036854776000官方节点的 seed。规划器与生成器必须喂同一个 seed,才能复现同一份谱面与音频

    Outputs (3)

    NameTypeDescription
    styleSTRING—
    max_durationFLOAT—
    seedINT—