YuE2 LoRA
YuE2 LoRA Doesn't Load a LoRA — It Writes a Guest List
- lora
- lora
The name oversells what happens when you press Run. This node loads no adapter, touches no weights, and doesn't even import torch. It collects rows - one file per row, with a strength for each half of YuE2 - and hands that list out through a single lora output. The folding happens later, on the card, inside the nodes that sing. Fill the rows in, save the workflow, nothing happens until a song node asks.
Adapters are how you push YuE2 off its house sound, the same way they're the interesting part of ACE-Step on the instrumental side. Download a YuE2 adapter and this is where it goes.
AR and NAR, or why one strength isn't enough
YuE2 is two halves doing two jobs:
- AR writes the score and sings the performance - melody, structure, arrangement.
- NAR turns that performance into sound - timbre, mix, production.
Most published adapters target only one half, hence two boxes per row and a dash where a file changes nothing. You know these numbers under other names: ComfyUI's LoraLoader calls them strength_clip (AR) and strength_model (NAR). Each runs from -10 to 10, stepping by 0.05 (0.01 with Shift). Untick a row and it stays in the workflow without singing.
Practical read: a NAR-only adapter is a production change - the pack measured a J-pop NAR adapter and every word stayed put. An AR adapter changes what is sung, so expect a different take of the melody.
The inputs and output
The only real input is loras: one STRING widget holding the rows as JSON, which is what the workflow saves and why the browser can draw them as rows over it. You never type in it - you use Add LoRA and pick from a list. The optional lora input chains another YuE2 LoRA node's rows in front of this node's own, which is how you keep a fixed set together and reuse it across graphs.
The lora output is a YUE2_LORA, and it wires into the lora input of the four nodes that sing: YuE2 Generate Song, YuE2 Plan, YuE2 Plan Batch and YuE2 Render Plan. Nothing else accepts it.
Each row also tells you what a model card would: which halves the file changes, its rank, how many matrices it touches, its trigger word, and the cot it was trained for. A trigger word is shown, never added for you - click to copy it, then put it in your style line where the author says. A run whose cot disagrees with the file gets a warning, not silence.
Where the files go, and how to install
Clone it like any pack:
cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/YuE2-ComfyUI
Restart ComfyUI, then install the one requirement the pack adds - tiktoken - into the Python environment ComfyUI actually runs on, which in a portable build is not the one a bare pip install reaches. Manager's search for YuE2-ComfyUI handles it. llama-cpp-python is optional and irrelevant to LoRAs.
The pack never downloads an adapter. It reads ComfyUI's own LoRA folders, extra_model_paths.yaml included, plus a models/loras beside the checkout - wherever ComfyUI's loader finds a file, this node finds it. Headers are read once and cached, so a folder of image LoRAs costs half a second the first time and anything that isn't for YuE2 is skipped.
Where people get burned
ComfyUI's own loader is lying to you. Of the eight YuE2 adapters the pack was measured against, ComfyUI's LoraLoader applied three. The rest use m-a-p's layout - separate projections, acoustic modules named nar_self_attn and nar_mlp - which ComfyUI loads, patches nothing into, and mentions in one console line you won't read. Your song comes out as if no adapter were connected. This pack reads both, and refuses loudly when a part lands nowhere.
A moved file stops the run. Rename an adapter after picking it and the row turns red and the run halts before anything loads, naming the file.
low_vram changes the deal. Normally adapters are folded into the weights once per stage - 0.12 to 0.47 seconds a half on a 5090 - and then the song runs at the speed of one without them. Under low_vram the layers are packed to INT8 and can't be folded into, so adapters ride alongside as factors and cost 6–11% of token speed.
It's reproducible, and it cleans up. Same seed, same adapters, same song in every offload mode, and removing the set puts the weights back to the checkpoint bit for bit. Rows fold in hash order, not the order you see, so reordering them doesn't change your song.
One last thing, not the node's fault: YuE2's weights are CC BY-NC 4.0, and an adapter trained on a non-commercial base inherits that. Image-side LoRA culture spent two years learning this the hard way.
Template 10, A song with LoRA, ships the node in place with an empty list.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| loras | STRING | [] | — |
| loraopt | YUE2_LORA | More adapters from another 'YuE2 LoRA' node, sung together with this node's own. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lora | YUE2_LORA | — |