YUE_Stage_A_Loader
The 7B door you open first
- model
Every YuE workflow starts here, and it's where most people get stuck before a single note is generated. YUE_Stage_A_Loader is the first node in the ComfyUI_YuE graph: it loads the Stage A language model - by default m-a-p/YuE-s1-7B-anneal-en-cot, ~11.5G - plus the xcodec audio codec, and hands the whole bundle to YUE_Stage_A_Sampler as one model wire. Think of it as the "load checkpoint" step of a music pipeline.
What it actually loads
Stage A is a ~7B causal language model trained on interleaved music codec tokens - the thing that reads your lyrics and writes the song's scratch track. Alongside it the loader sets up the xcodec codec that turns reference audio into codec tokens, and the mm tokenizer that turns your lyrics into model input. All three get packed into a single MODEL_YUE_A output.
The quantization menu is where it gets real
quantization_model is the big decision: fp16, int8, int4, or exllamav2. Your GPU decides which is sane:
- ≥24G VRAM - keep
fp16, leaveuse_mmgpoff. Best quality, simplest. The README's recommended default. - ≤16G VRAM - two viable paths. Either keep fp16 with
use_mmgpon andmmgp_profileset to 2 (works, but slow and wants lots of system RAM), or pointstage_A_repoat an exllamav2 Q8 quantized repo and pickexllamav2mode, which the README calls very fast. The bitsandbytesint8path exists, but the README is blunt: very slow, "don't try it" - a 30-second clip measured in thousands of seconds.
If you go exllamav2, you also pick exllamav2_cache_mode (FP16/Q8/Q6/Q4). If you go bitsandbytes (int8/int4), the loader requests flash_attention_2 explicitly in code - so a "FlashAttention2 is not installed" error means that's your missing piece.
The rest of the inputs: xcodec_ckpt should resolve to ckpt_00360000.pth in ComfyUI/models/yue - the dropdown only lists files containing "36", so if it shows only "none", you haven't placed that file. stage1_cache_size (default 16384) is the KV cache size for exllamav2 mode. mmgp_profile (0–5) only matters with use_mmgp on: profiles 3–5 auto-quantize the model, and higher numbers trade RAM for VRAM at the cost of speed.
Install and models
Shared pack install - clone, install requirements, restart:
cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_YuE
cd ComfyUI_YuE
pip install -r requirements.txt
(Or ComfyUI Manager → "ComfyUI_YuE".) The Stage A repo auto-downloads from Hugging Face on first load. You must place ckpt_00360000.pth (xcodec) in ComfyUI/models/yue, and the semantic model's pytorch_model.bin in the pack's inference/xcodec_mini_infer/semantic_ckpts/hf_1_325000/ folder. bitsandbytes comes via requirements; mmgp and exllamav2 are optional and uninstalled by default - install only the one you actually select, or you're pulling big GPU libraries for nothing.
Gotchas
xcodec_ckptstuck on "none" - the file isn't where the dropdown looks. Dropckpt_00360000.pthinComfyUI/models/yueand refresh.- mmgp errors when you didn't install mmgp - expected; the pack ships it uninstalled on purpose. Either
pip install mmgpor turnuse_mmgpoff. - First load downloads 11.5G. The UI looks frozen; it isn't. Let it finish once and the repo stays local from then on.
- Don't rename the install folder. The semantic model is loaded from a hardcoded
custom_nodes/ComfyUI_YuE/...path, so the folder name matters.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| stage_A_repo | STRING | m-a-p/YuE-s1-7B-anneal-en-cot | — |
| xcodec_ckpt | COMBO | 1 options: none | |
| quantization_model | COMBO | 4 options: fp16, int8, int4, exllamav2 | |
| use_mmgp | BOOLEAN | true | — |
| stage1_cache_size | INT | 163848192–2147483647 | — |
| exllamav2_cache_mode | COMBO | 4 options: FP16, Q8, Q6, Q4 | |
| mmgp_profile | COMBO | 6 options: 0, 1, 2, 3, 4, 5 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL_YUE_A | — |