---
title: YuE2-3B
canonical_url: "https://www.modelscope.ai/studios/m-a-p/YuE2-3B"
md_url: "https://www.modelscope.ai/studios/m-a-p/YuE2-3B.md"
repository: m-a-p/YuE2-3B
chinese_name: YuE2-3B
last_updated: 2026-09-11
sdk_type: gradio
sdk_version: 6.17.3
downloads: 0
stars: 48
---

# YuE2-3B

> YuE2-3B - An interactive demo by m-a-p on ModelScope. Turn a style description and structured lyrics into a complete song (vocals + accompaniment + ABC score) at 48 kHz stereo, via the official yue2_infer package. Unofficial ModelScope demo of m-a-p/YuE2-3B.…

m-a-p/YuE2-3B is an interactive demo (Studio) on ModelScope. built with gradio 6.17.3.

- **Repository**: m-a-p/YuE2-3B
- **SDK**: gradio
- **SDK version**: 6.17.3
- **Downloads**: 0
- **Stars**: 48
- **Last updated**: 2026-09-11

Source: https://www.modelscope.ai/studios/m-a-p/YuE2-3B

---

# 🎵 YuE2-3B Music Generator — ModelScope Studio

Turn a **style description** and **structured lyrics** into a complete song —
vocals, accompaniment and an ABC score — rendered at 48 kHz stereo. This is an
**unofficial ModelScope migration** of the YuE2-3B demo, built for the ModelScope
创空间 (Studio) platform on the free **xGPU (48 GB)** resource with the **Gradio** SDK.

## Credits & license

- **Model & weights:** `m-a-p/YuE2-3B` and `m-a-p/YuE2-Vae`, published on
  ModelScope — <https://modelscope.cn/models/m-a-p/YuE2-3B>.
- **Inference engine:** the official `yue2_infer` package. It ships as a wheel
  inside the `m-a-p/YuE2-3B` model repo, so the app unpacks it from the downloaded
  ModelScope snapshot onto `sys.path` at startup — no separate install and no
  vendored source. A copy of the wheel is kept at the repo root purely as an
  offline fallback.
- **Upstream demo:** this studio re-implements the original Hugging Face demo
  `mrfakename/yue2-3b` for ModelScope. It is an independent migration and is not
  affiliated with, or endorsed by, the upstream authors.
- **Weights license:** **CC BY-NC 4.0 — non-commercial use only.** See [`LICENSE`](LICENSE).
- **Third-party code:** the Oobleck VAE / SnakeBeta modules derive from
  stable-audio-tools (Stability AI, MIT) and BigVGAN (NVIDIA, MIT). See
  [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) and [`licenses/`](licenses).

## Interface

A Suno-inspired **composer + player** layout, whose visual design language follows
the sister **MiniMax-Music3** ModelScope studio:

- **Theme:** Gradio `Soft` (default palette, no custom hues), centered 1300px container.
- **Design tokens:** every custom rule keys off Gradio theme CSS variables, so the
  UI tracks the theme and dark mode natively (cards, pill chips, segmented tabs,
  rounded primary buttons, pulsing status dot).
- **Left — composer:** two segmented tabs.
  - **🎶 Create** — style + quick-start style chips + lyrics + planning mode
    (`cot`) + advanced (seed, CFG scale).
  - **🎙️ Cover** — target style + lyrics + a melody **ABC score** (melody-only planning).
- **Right — player:** a shared "♪ Your song" output (waveform + download), run
  stats, and the generated ABC score.

## How it works

1. On startup the app fetches `m-a-p/YuE2-3B` and `m-a-p/YuE2-Vae` **from
   ModelScope** into the persistent studio directory `/mnt/workspace` using
   ModelScope's native model downloader (idempotent — cached across restarts). The
   `m-a-p/YuE2-3B` snapshot also contains the official `yue2_infer` wheel.
2. The app unpacks that wheel (a pure-Python zip) onto `sys.path`, so the exact
   inference code published with the model runs without a separate install.
3. `YuE2Pipeline` loads the weights and the model's own modeling code **entirely
   offline from that local snapshot** (`local_files_only=True`) — no external model
   hub is contacted at runtime.
4. Generation runs on GPU (BF16 for the AR/NAR transformers, FP32 for the VAE)
   using PyTorch's native fused attention; no extra third-party attention kernels
   are required.

## Deployment profile

| Item | Value |
|---|---|
| SDK | Gradio 6.x (studio `sdk_version`) |
| Base image | `ubuntu22.04-py312-torch2.10.0-modelscope1.37.0` |
| Hardware | ModelScope xGPU `xgpu/8v-cpu-64g-mem-48g` (48 GB) |
| Concurrency | 1 song at a time (queued) |
| Peak GPU memory | ~11–14 GiB (model + VAE + CUDA graphs) |
| Model cache | `/mnt/workspace/yue2-models` (persistent) |
| First startup | downloads ~7 GiB of weights, then loads |
| Output | 48 kHz stereo |

## Local development

Gradio is provided by the studio's `sdk_version`, so it is intentionally **not**
pinned in `requirements.txt`. For a local UI preview (Python 3.10+):

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt "gradio>=6,<7"
python app.py            # serves on 0.0.0.0:7860
```

Without `torch` installed, the background model warm-up fails gracefully and the
UI still renders, so you can iterate on the interface without downloading weights.

### Optional environment variables

| Variable | Purpose | Default |
|---|---|---|
| `YUE2_WORKSPACE` | Persistent cache root for weights | `/mnt/workspace` (falls back to `./_models` if unwritable) |
| `GRADIO_SERVER_NAME` | Bind address | `0.0.0.0` |
| `GRADIO_SERVER_PORT` / `PORT` | Listen port | `7860` |
| `GRADIO_ROOT_PATH` | Reverse-proxy root path | *(empty)* |

No secrets are required to run this studio.
