FL YuE2 · Paired Audio Dataset
Matching filename stems is the entire trick
- YUE2_AUDIO_PAIRS
Before you can teach a model "turn this into that", something has to prove you actually have matched pairs. That's all FL YuE2 · Paired Audio Dataset does - and it's the node that fails fastest when your data is sloppy, which is a feature. You point two folders at it, it validates them, splits them, and returns a manifest the rest of the path consumes.
Here's the thing to internalize about this whole workflow: the adapter does not align unrelated songs, isolate stems, or build pairs for you. It learns from aligned recordings that you prepared. Low-pass filtering the same recording into a second folder is a legitimate training pair. So is a dry take and a wet take, or a stem and its full mix. Two different songs are not a pair, and no amount of training steps will rescue that.
How the pairing works
source_directory and target_directory are scanned for audio files (WAV, FLAC, MP3), and files are matched on the casefolded filename stem. intro.wav and intro.flac pair up; Intro.wav also pairs with intro.wav. Anything unmatched on either side is an error, not a warning - the check is a set comparison, so a stray file in either folder stops the run with "Source and target folders must contain matching, unique filename stems."
Each pair is then checked: mono or stereo, at least one second long, and the two durations must agree to within a single sample. That last one is stricter than people expect coming from image datasets. If your target was re-exported by a different tool and picks up a leading silence, you're told to go align it - and the node won't guess.
Both folders resolve relative to ComfyUI's input directory unless you give an absolute path, so the shipped defaults live at ComfyUI/input/yue2_pairs/source and .../target.
Sidecars and the split
Optional text sidecars are read off the target file's name: song.caption.txt sets the target style (otherwise default_style is used), song.lyrics.txt sets target lyrics, and song.song.txt sets a group identifier.
That group identifier is the one you'll regret skipping. validation_fraction (0.2 by default) holds out whole groups, and the split is computed by sorting groups through a seeded fingerprint - deterministic, so seed reproduces it exactly and you get the same train/validation split every time you resume. Without .song.txt, each pair is its own group, which means eight excerpts of the same song can land on both sides of the split and your held-out numbers become a lie. Give every excerpt of a song the same identifier.
You also need at least two groups, or the node refuses to build a dataset at all.
What you get, and wiring it up
The output is YUE2_AUDIO_PAIRS, which is a path string pointing at a JSON manifest under output/yue2_training/paired_datasets/<fingerprint>.json. It carries the pairs, their durations, the split, and a content hash for every source and target file. Wire it into Prepare Audio Pairs dataset, which turns the manifest into cached features.
That hashing is the mechanism you'll meet twice more: because the manifest fingerprints the audio, and preparation verifies those hashes, editing or replacing a file after the fact produces a loud "audio changed; prepare the pairs again" instead of silent garbage training.
Install
Manager → search ComfyUI-FL-YuE2, or:
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
python -m pip install -r requirements-training.txt
The dataset node itself is cheap - it reads audio headers, hashes files and writes JSON - but it lives in the training category, and the nodes downstream of it need soundfile, scipy, transformers, demucs==4.0.1 and CUDA. Install the training requirements once and stop thinking about it.
Where people get burned
Mismatched stems. Every conversion tool renames things. Normalize names in a shell before you queue, don't rename inside ComfyUI.
Duration drift between source and target. One sample is the tolerance. Export both sides the same way.
A tiny first dataset. The old image-side finding still holds here: a handful of really well-aligned pairs teaches more than fifty sloppy ones. Start with six to eight short excerpts, hold one or two out, and confirm the transformation is learning at all before you go collect an album. And keep seed fixed when you resume - it controls the split, so changing it moves your validation recordings out from under the comparison.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| source_directory | STRING | yue2_pairs/source | Aligned input audio. Relative to ComfyUI input, or an explicit folder. |
| target_directory | STRING | yue2_pairs/target | Desired output audio with matching filename stems and durations. Target .caption.txt, .lyrics.txt and .song.txt sidecars are optional. |
| default_style | STRING | instrumental electronic music | Target style when a pair has no caption sidecar. |
| validation_fraction | FLOAT | 0.200.01–0.5 | Song groups reserved for held-out validation. |
| seed | INT | 420–4294967295 | Stable song-group split seed. Keep it unchanged when resuming. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| YUE2_AUDIO_PAIRS | YUE2_AUDIO_PAIRS | — |