FL AceStep Preprocess Dataset
The step that turns songs into tensors (and why training needs it)
- dataset
- model
- vae
- clip
- output_path
- sample_count
- status
Here's a fact that surprises people: LoRA training on ACE-Step doesn't read your MP3s. It reads cached tensors - audio already VAE-encoded into latents, text already CLIP-encoded into embeddings, all saved as .pt files. FL AceStep Preprocess Dataset is the conversion step that makes that happen, and doing it once up front is why the actual training loop can stay lean. You are not re-encoding audio every epoch.
It's the same architectural shift the image world went through: precompute the embeddings once, cache them, and let the trainer chew on cached files. This node is that cache builder for the ACE-Step training pipeline.
How it works
For each labeled sample it:
- Loads the audio, resampled to 48kHz stereo and truncated to
max_duration. - VAE-encodes it into latents.
- Builds the training prompt from the caption (plus your custom tag, positioned per the scan node's setting) and the metadata line -
bpm,timesignature,keyscale,duration. - CLIP-encodes the text and lyrics through ACE-Step's Qwen3 text encoder.
- Runs the condition encoder to fuse text + lyrics, builds the "context latents," and saves everything as one
.ptfile plus amanifest.jsonthe Train node reads.
The whole loop runs under torch.inference_mode() with models kept on GPU and the cache cleared every 8 samples - the pack's answer to "preprocessing 14 songs shouldn't take an hour." For audio longer than ~30 seconds the VAE path switches to tiled encoding (30-second chunks with 2 seconds of overlap) to avoid OOM and boundary artifacts.
The inputs that matter
Required: dataset (from Scan or Label), model, vae, clip (all from the ACE-Step checkpoint loader), output_dir (default ./output/acestep/datasets - write this down; the Train node's tensor_dir has to point at the same folder).
Optional:
- max_duration (default 240s, range 10–600) - songs longer than this get truncated. If you're short on VRAM, this is the first dial you pull.
- genre_ratio (default 0, range 0–100) - percentage chance a sample's text uses its genre tag instead of its caption. It's a per-sample random roll, so it doubles as data augmentation for genre-focused training. Set it to 0 (default) if you're training a style, not a genre.
Outputs
- output_path (STRING) - where the tensors landed.
- sample_count (INT) - how many samples encoded successfully.
- status (STRING) - summary, with an error count.
It's an output node, so results also show on the graph.
Installing it
Same pack-level install:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI-FL-AceStep-Training.git
cd ComfyUI-FL-AceStep-Training
pip install -r requirements.txt
Restart ComfyUI (or install via ComfyUI Manager, search "FL AceStep"). This is also the node that needs ACE-Step's CLIP - again, from ComfyUI's native checkpoint loader, not from this pack.
Where people get burned
- Every sample needs a caption. Samples that are neither
labelednor carrying a caption get skipped, and if none are labeled you get "No labeled samples to preprocess." Run Auto-Label first, or supply captions viametadata.csv. - VRAM spikes here, not during training. The node holds model, VAE, CLIP and condition encoder on GPU at once. On a modest card, lower
max_durationbefore you touch anything else. - The
output_dirmismatch is the classic silent failure. Preprocess to one folder, point Train at another, and you get "No samples in dataset" at the start of training. Make them match and this whole class of bug disappears. genre_ratiomeans non-deterministic text. Two runs over the same dataset can produce different text encodings. That's the augmentation working, not a bug - but it does mean "same dataset, same seed" doesn't give you bit-identical tensors.
Preprocessing is the least glamorous step in the pack and the one where a wrong path costs you the most debugging time. Get the folder right, watch the first couple of files land, and you're set for the fun part - actually training.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| dataset | ACESTEP_DATASET | — | |
| model | MODEL | — | |
| vae | VAE | — | |
| clip | CLIP | — | |
| output_dir | STRING | ./output/acestep/datasets | — |
| max_durationopt | FLOAT | 24010–600 | — |
| genre_ratioopt | INT | 00–100 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |
| sample_count | INT | — |
| status | STRING | — |