Skip to content
GenLovers

How to Set Up YuE2: A Local, Open-Source AI Music Model

Last updated: 10 min readDifficulty: Intermediate

Written by Clement

YuE2 is a 3B open-source music model from M·A·P (Multimodal Art Projection), built around a two-stage idea most music generators skip: it first composes an editable musical score (melody, rhythm, chords, lyrics), then renders that score into a full song with vocals and accompaniment. Because the score is a real intermediate step you can see and edit, you can fix a bad chord progression or rewrite a verse without regenerating the whole track. This walks through running it on a rented cloud GPU via ComfyUI, the same RunPod path used for the local image-model setup.

What makes YuE2 different from a one-shot music generator

Most AI music tools go straight from a text prompt to finished audio: you get a song, and if a section is wrong, your only real fix is regenerating the whole thing with a different prompt and hoping. YuE2 splits the job in two. First it plans a score, an ABC-notation musical structure covering melody, rhythm, chords, and any lyrics, that you can view and hand-edit before anything is rendered to audio. Only then does it decode that score into 48kHz stereo audio with vocals and instrumentation.

That split is what the ComfyUI-FL-YuE2 node pack this setup installs exposes directly: a Piano Roll / Score Editor node you can open, read, and rewrite before the Render Music step ever runs. It's the closest thing to sheet-music-level control this category of model currently offers.

Create a RunPod account

  1. 1

    Sign up at RunPod

    Go to runpod.io and create an account (this is a referral link).

    Open runpod.io
RunPod homepage with the Sign Up button in the top navigation circled.
Click on the signup button on the top right to start Open runpod.io
  1. 2

    Add funds to your account

    $10 covers a solid testing session. YuE2's checkpoints total under 8GB, so most of your pod time goes to actual song generation, not downloading.

RunPod dashboard top-right corner with the add-funds plus button circled.
The + button next to your balance, top right of the dashboard.

Configure and deploy the pod

YuE2's upstream README states a 24GB VRAM minimum on a GPU with BF16 support; below that is untested. Pick a card that clears that bar rather than the cheapest one on offer.

  1. 3

    Pick a GPU with 24GB VRAM or more, with BF16 support

    From the dashboard, click Pods in the left nav, then Deploy Pod. Sort by VRAM and price, and pick a current-generation card at or above 24GB.

RunPod GPU instance list with a 24GB-class card's price and VRAM circled.
The GPU list, sorted by VRAM, RAM, vCPU, and hourly price.

Get new guides by email

One email when we publish new guides and model breakdowns. No spam, unsubscribe anytime.

  1. 4

    Set the pod template to a PyTorch build

    Runpod Pytorch 2.8.0 is the current default template; it ships CUDA and PyTorch pre-installed. If a different template is selected, hit Change template and pick it from the list.

  2. 5

    Expose the ports ComfyUI needs

    Under Expose HTTP ports, set 8888,4000,8188,8889. 8188 is ComfyUI's default port; the others cover Jupyter and any auxiliary service.

  3. 6

    Set container disk to at least 40GB

    YuE2's checkpoints plus ComfyUI and its Python environment fit comfortably in 40GB.

  4. 7

    Deploy On-Demand

    On-Demand bills per second of actual usage, no upfront commitment, right for testing before you know how much you'll use this.

Run the setup script in Jupyter

  1. 8

    Open Jupyter Lab

    On the pod's Connect tab, port 8888 shows "Jupyter Lab, Ready." Click it.

  2. 9

    Download the setup script

    Grab setup_yue2_comfyui.py below and save it locally.

    Download the setup script (.py)
  3. 10

    Upload the setup script

    In Jupyter, upload the file you just downloaded into /workspace.

  4. 11

    Open a terminal and run the script

    python setup_yue2_comfyui.py. It clones ComfyUI, installs the ComfyUI-FL-YuE2 custom node, and downloads the YuE2-3B generation model and YuE2-Vae decoder.

Open ComfyUI and load the workflow

  1. 12

    Go back to the pod's Connect tab in RunPod

    Same screen you used to open Jupyter.

  2. 13

    Open port 8188

    That's ComfyUI's default port, already exposed from the pod-template step above. Click it once the setup script finishes.

  3. 14

    Close the pop-ups

    ComfyUI opens with a couple of dialogs on top. Close them to get to the empty canvas.

  4. 15

    Download the workflow file

    Grab the .json workflow below. It's ComfyUI-FL-YuE2's own official score-editor example: a pre-filled ABC score and style/lyrics prompt feeding Compose, then Render Music, then Decode Audio.

    Download the workflow file (.json)
  5. 16

    Drag and drop the file onto the canvas

    The full node graph appears: Load Models feeding a Piano Roll / Score Editor and Compose node, into Render Music, then Decode Audio, then Preview and Save Audio.

Install missing nodes and generate your first track

  1. 17

    Click the Manager button, then Install Missing Custom Nodes

    The workflow references the ComfyUI-FL-YuE2 node pack your fresh install doesn't have registered in Manager yet; this lists it.

  2. 18

    Select all, install, then restart ComfyUI

    Click the install button, wait for it to finish, then click the red Restart button and confirm. Reload the browser when prompted.

  3. 19

    Set download_missing to true on the Load Models node

    This lets the node pack fetch any remaining model file it needs directly into ComfyUI/models/yue2/ the first time you queue.

  4. 20

    Edit the style prompt and lyrics, then Execute

    In the Compose node, replace the sample style description and lyrics with your own. Leave the Score Editor's ABC field as-is for an instrumental first test, or write your own melody/chords in ABC notation. Click Execute, top right.

Hardware and software checklist

This mirrors YuE2's own upstream requirements; the ComfyUI node pack adds no further hardware constraint of its own.

GPU24GB VRAM minimum, with BF16 support, per the upstream README (below that is untested)
Container disk40GB or more
LicenseSource/nodes: Apache 2.0. Model weights (YuE2-3B, YuE2-Vae): CC BY-NC 4.0, non-commercial only

Troubleshooting

Out-of-memory errorLower max_score_tokens or max_duration on the Compose/Render nodes, or move to a GPU above the 24GB minimum
Generated song ignores the lyricsCheck the lyrics field is wired into Compose, and that the style prompt doesn't contradict having vocals (e.g. "no singing" phrasing left over from an instrumental test)
Score Editor shows an empty or malformed ABC blockRe-run Compose; a from-scratch composition occasionally needs a reroll, same as any generative step
Missing custom node after loading the workflowRun Manager's Install Missing Custom Nodes again and confirm ComfyUI-FL-YuE2 finished cloning before retrying

Frequently asked questions

What is YuE2, and who made it?
YuE2 is a 3B open-source music model from M·A·P (Multimodal Art Projection), with academic and industry collaborators including HKUST, NYU, Stanford, and MBZUAI. It composes an editable musical score before rendering a full song with vocals and accompaniment from it.
Do I need a GPU to run YuE2 locally?
Yes. YuE2's own README states a 24GB VRAM minimum on a GPU with BF16 support; running through ComfyUI on RunPod doesn't lower that requirement.
Can I use YuE2's output commercially?
No, not under the setup in this guide. YuE2's source and ComfyUI nodes are Apache 2.0, but the model weights (YuE2-3B, YuE2-Vae) are CC BY-NC 4.0, non-commercial use only. Check the license yourself before using generated output commercially.
What does "editable score" actually mean in practice?
Before YuE2 renders any audio, it produces a musical score in ABC notation, melody, rhythm, chords, and lyrics, that the ComfyUI-FL-YuE2 node pack lets you open, read, and hand-edit. You can fix a chord or rewrite a lyric line before the audio render step, instead of only being able to reroll the whole generation.
Is running YuE2 on RunPod free?
No, RunPod bills per second for GPU time, and YuE2's 24GB VRAM requirement means a somewhat higher hourly rate than a smaller model. YuE2's checkpoints are small (under 8GB total), so download time isn't the cost driver, the GPU rental during generation is.
How is this different from using Suno?
Suno is a hosted service with its own pricing and content policy; see the Suno cost guide for what that runs. YuE2 runs entirely on hardware you control, with an editable score you can hand-tune before rendering, at the cost of the RunPod setup here, the GPU rental while it runs, and a non-commercial license on the weights.

Keep reading

Get new guides by email

One email when we publish new guides and model breakdowns. No spam, unsubscribe anytime.

Add GenLovers as a preferred source in Google