FL YuE2 · Dataset Maker
Your songs aren't a dataset yet — FL YuE2's Dataset Maker is the bouncer
- captions
- YUE2_DATASET
What it is and why you'd reach for it
Training a music LoRA in ComfyUI is a strange idea if your background is images. There, you point a trainer at twenty PNGs and it just goes. Here every track needs two text files sitting next to it, the songs have to be cut into train/validation splits by group rather than by file, and the trainer will happily train on garbage captions and hand you back a LoRA that sounds like nothing.
Dataset Maker is the node that decides whether any of that is true. It scans a folder, pairs each recording with its sidecars, throws out anything it can't vouch for, splits what's left, and writes a manifest. It produces no audio and trains nothing - it is the bouncer at the door of the AR LoRA pipeline:
Training Models → (Gemini captioner) → Dataset Maker → Prepare Dataset → Train Config → LoRA Trainer → Load LoRA
Reach for it once you have recordings and reviewed captions. You don't need it for inference at all.
The inputs that matter
Three required fields do the real work.
audio_directory is the folder holding the recordings and their sidecars - relative to ComfyUI/input, or an absolute path if your music lives somewhere else. Only .wav, .flac and .mp3 are picked up, top level only.
trigger is the text prepended to every style caption. This is the rare-token idea from image LoRA work, ported to music: put something like fl_myband_style here and write the same string into style when you generate with the LoRA, or the adapter has no handle to grab. If you leave it blank, you're training on raw style prose and hoping.
default_style is the fallback description for recordings that have no .caption.txt of their own. Fine for a homogeneous set of your own songs; a trap if you feed it mixed material, because every uncaptioned track inherits the same description.
Then validation_fraction (default 0.1) and seed. The split is by song, not by file - sections of the same track stay on the same side - and the seed shuffles which groups land in validation, so keep it fixed when comparing two runs.
The single output is YUE2_DATASET, really a path to the yue2_dataset.json manifest the node writes next to your audio. Wire it into Prepare Dataset; nothing else consumes it. There's also an optional captions input of type YUE2_CAPTIONS, but don't build your mental model around it: in the shipped source the dataset builder reads the sidecars off disk itself, and the Gemini captioner's actual output is those sidecars. The audio folder is the real handshake between the two nodes.
What it checks, and why it says no
This is the part worth understanding, because the rejections are the feature. For each recording the node wants:
<name>.lyrics.txt- required, and empty is legal; empty means instrumental.<name>.caption.txt- or it falls back todefault_style.- Non-empty mono or stereo audio that
soundfilecan read. - A filename stem that isn't a duplicate of another track's (sidecars key off the stem).
- No byte-identical duplicate recording elsewhere in the folder - it hashes each file.
If a .caption.json marker is present (that's what the Gemini captioner leaves behind), the node also requires that the caption was reviewed and that the current text still matches the reviewed text. That's the "review generated caption/lyrics in the captioner" error people hit: the text is there, it's just not signed off yet.
Two behaviours that save you time once you know them. Every problem is collected and raised together, so you get the whole list of broken tracks in one error instead of fixing them one queue at a time. And the node re-runs on every queue - it declares itself always-changed - so editing a sidecar takes effect immediately without touching the graph.
Install
Install the pack through ComfyUI Manager (search ComfyUI-FL-YuE2) or clone it, then install the training requirements separately, in the Python environment that runs ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI-FL-YuE2.git
cd ComfyUI-FL-YuE2
python -m pip install -r requirements.txt # inference deps: tiktoken, safetensors, filelock
python -m pip install -r requirements-training.txt # needed for this node's pipeline
Unlike most audio packs, this one does not install the upstream YuE2 package or downgrade Torch - it borrows ComfyUI's. The training requirements are where the weight comes from: transformers, soundfile, scipy, demucs==4.0.1, google-genai. Workers do not install packages on their own, so a missing module is a failure, not an auto-repair.
Where people get burned
Instrumentals with no .lyrics.txt. The file must exist even if it's empty. Create it and the node is happy; skip it and you get one error line per track.
Editing a caption after building the dataset. Prepare Dataset checks the sidecar hashes recorded in the manifest and refuses to run if you changed your mind afterwards. Re-queue Dataset Maker after any edit - it's cheap.
Trigger mismatch. Nearly every "my LoRA does nothing" report is a trigger that never appears in the generation prompt, or a style caption so generic the adapter learned the genre instead of your sound.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_directory | STRING | Folder containing recordings and caption sidecars, relative to ComfyUI/input or an absolute folder. | |
| trigger | STRING | Text added to each training style caption. Include the same text when generating music with the LoRA. | |
| default_style | STRING | Fallback style description for recordings without their own style caption. | |
| validation_fraction | FLOAT | 0.100.01–0.5 | Fraction of recordings held out for validation instead of training. 0.15 reserves about 15%. |
| seed | INT | 420–2147483647 | Random seed for the train/validation split. Keep fixed to compare runs on the same split. |
| captionsopt | YUE2_CAPTIONS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| YUE2_DATASET | YUE2_DATASET | — |