YuE2 Generation Info
How to Get the Seed and Settings Back Out of a Song
- lyrics
- seed
- style
- model_name
- steps
- text
A picture carries its own receipt. Drop a ComfyUI PNG into the window and the whole graph is in there - seed, prompt, sampler, checkpoint - because image files were built to smuggle metadata around. A WAV carries none of it. So the moment you generate a song you like with YuE2 and hit Save Audio, you have a track and no idea how you made it.
YuE2 Generation Info is the pack's answer: a small node under YuE2/Advanced that takes the generation_info JSON the singing nodes emit and breaks it into fields you can actually use.
What it is, and who it's for
YuE2 is the local, from-scratch song generator: style line plus tagged lyrics in, 48 kHz stereo out. It's the vocal-capable sibling of the ground ACE-Step covers, and the difference matters - ACE-Step's local reputation is "instrumentals compelling, lyrics garbage," while YuE2's whole pitch is singing words you wrote. Which makes a finished song far more expensive to reproduce than a picture: the thing you care about is a 75-second performance you can't eyeball.
Found a take you like and want to keep the recipe? That's this node.
How it works
It's a string parser, nothing more. The singing nodes - YuE2 Generate Song, YuE2 Render Plan, YuE2 Decode Latents - each carry an extra generation_info output alongside audio, and it's a JSON string. This node unpacks it into six sockets.
Know what's in that JSON, because the six outputs are just the headlines. It also carries format_version, the fully resolved settings, the score_abc the song was sung from, and a loras array with each adapter's name, sha256, ar and nar strength. The LoRA list is quietly the best part - adapters have no self-describing metadata, so a hash is the only honest way to know which file made which song. Absolute model paths are stripped first, so the JSON is safe to paste into a forum.
The inputs and outputs that matter
One input, generation_info, and its tooltip says it plainly: "The JSON output of YuE2 Generate Song, Render Plan or Decode Latents."
It's a forced input. There's no text box to type or paste into - you have to wire it, which is the single most common "is this node broken?" moment. Save the JSON separately if you want to keep a copy for later.
The six outputs:
lyricsandstyle- the actual strings the model read. Feed them back into another generation, or into a text saver.seed(INT) - the one that produced this take. This is the field you're here for. Feed it back into a generation node'sseedwith the same style and lyrics and you get the same song byte for byte.model_name- the basename of the checkpoint that loaded, e.g.yue2_3b_bf16.safetensors. Not a friendly label, and deliberately not a path.steps(INT) - the acousticode_stepsused, which is how you tell a fast pass from the release default of 32.text- all of the above as a readable block, ready for whatever text saver or display node you have. Wire this one if you just want a sidecar next to the audio.
Nothing here touches VRAM, so the node costs nothing to leave in the graph.
Install
No separate install - it ships with the pack. ComfyUI Manager, search YuE2 Music, or:
cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/YuE2-ComfyUI
Restart ComfyUI after; Python caches imports and the node list won't refresh without it. The pack's only hard dependency is tiktoken, and if it's missing the singing node hands you the pip line for the interpreter ComfyUI is actually running on - not the one a bare pip install reaches in a portable build.
You need no weights to run this node, but you need the pack's weights to ever produce the JSON it eats: 7.26 GB on first use, or 3.69 GB for the INT8 repack.
Where people get tripped up
You can't type into it. It's the one that generates confused posts: it takes a wire, not a paste.
Old latents throw an error. JSON from before seeds were recorded exports seed: null, and the parser requires a known seed - so it stops with "generation_info has no valid 'seed'" rather than inventing a number. Decoding again keeps the original singing parameters, so re-run the decode rather than the whole song.
It rejects anything that isn't this JSON. Hand it a string from another pack, or a JSON you edited and broke, and you get "generation_info must be the JSON from a YuE2 generation output." It checks format_version is 1 and that the types are right - strict about the frame, relaxed about extra keys, so later versions can add fields without breaking your workflow.
Nothing appears to happen. It's not an output node, so ComfyUI runs the graph and shows you nothing. Wire text to a save or display node - that block is what you'll actually read in six months, wondering what seed that chorus came from.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| generation_info | STRING | The JSON output of YuE2 Generate Song, Render Plan or Decode Latents. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| lyrics | STRING | — |
| seed | INT | — |
| style | STRING | — |
| model_name | STRING | — |
| steps | INT | — |
| text | STRING | — |