YuE
Dataset & Modelmultimodal-art-projection/YuE
Frontier open music generation model with symbolic planning and agentic editing.
Overview
YuE2 is an open foundation model for full-song music generation that turns lyrics and a style prompt into an editable melody-and-chord score, then renders it into 48 kHz stereo audio with vocals. It supports zero-shot song covers via transcription, white-box score editing, and conversational agent-driven music refinement, achieving quality competitive with leading commercial systems.
README Preview
> Looking for the original YuE? Its code, documentation, and license are preserved on the **[YuE-v1 branch](https://github.com/multimodal-art-projection/YuE/tree/YuE-v1)**.\n\n\n \n\n\n\n \n \n \n \n\n\nYuE2: Unifying Symbolic and Audio Music Generation at Frontier Quality\n\nCompose in symbols. Create in sound.\n\n\n 🎧 Demos ·\n 🤗 YuE2 ·\n 🚀 Quick start ·\n 🤖 Agent skill ·\n 📊 Benchmarks ·\n 🤗 MERT2 ·\n 🤗 SheetSage2 ·\n 🤗 WSB ·\n 📦 Release ·\n \n\n\n**YuE2 brings frontier song quality to music generation with an editable composition.** Give it lyrics and a style prompt: it writes a melody-and-chord plan, then realizes that plan as a complete song with vocals and accompaniment.\n\n- **Frontier quality.** YuE2 is competitive with Suno v5/v6 on WildSongBench. YuE2 (best-of-8) achieves **6.9632 SongBench Avg**, the highest observed mean among all evaluated settings.\n- **White-box music generation through symbolic planning.** Read, play, and change the composition before rendering it. Melody and chords become explicit controls that a person or an agent can inspect and edit.\n- **Zero-shot covers and agentic editing.** Reimagine a transcribed song in a new style, or refine a song through a conversation about its score, arrangement, and lyrics—all with the same generation checkpoint.\n\n[](https://map-yue2.github.io/#model-overview)\n\n*192 WildSongBench prompts. Both YuE2 settings use symbolic planning. Bo8 = best-of-8. The axes are normalized comparison indices; bubble area represents AudioBox production quality. [Scores and evaluation protocol](docs/benchmarks.md). [Vector PDF](assets/frontier-teaser.pdf) · [SVG](assets/frontier-teaser.svg).*\n\n## Hear what you can make\n\n| Create | Cover | Edit with an agent |\n|---|---|---|\n| Lyrics + style → score → full song | Source recording → melody score → a new interpretation | Musical feedback → score, style, or lyric revisions → a new recording |\n| [Listen and inspect the score](https://map-y
FAQ (1)
TroubleshootingHow to fix 'UnboundLocalError: cannot access local variable raw_output' in ComfyUI YuE (smthemex nodes)?
This is a logic bug in the ComfyUI_YuE pack: when Stage 1 generation produces zero segments (short lyrics, certain prompt combos, guidance disabled), the loop assigning raw_output never runs, so the variable is undefined at ids = raw_output[0].cpu().numpy() in yue_node.py.
Fix 1 — Patch custom_nodes/ComfyUI_YuE/yue_node.py: inside sampler_main, initialize the variable before the generation loop:
raw_output = Noneand before the
ids = raw_output[0]... line add:if raw_output is None:
raise RuntimeError("Stage1 produced no output tokens (raw_output is None)")Alternatively initialize
raw_output = torch.empty((1, 0), device=device, dtype=torch.long). Stage A then completes for valid generations.
Fix 2 — If you next hit ImportError: TorchCodec is required for load_with_torchcodec: torchaudio ≥ 2.9 defaults to TorchCodec for torchaudio.load(). Install it in the same venv as ComfyUI:
pip install torchcodecVerified working on Linux with ComfyUI 0.9.2, Python 3.12, torch 2.9.1+cu128, torchaudio 2.9.1+cu128, torchcodec 0.9.1. After both fixes the full YuE pipeline runs and audio generates correctly.