๐ฆ MOSS Dataset Prep
Encode your clips into features MOSS-TTS training can actually eat
- TTS_engine
- training_dataset
- dataset_info
This is the heavy-lifting step in the MOSS-TTS training chain. Staging put your clips on disk and Dataset Rows paired them with text; Dataset Prep turns that raw pairing into the encoded, model-ready TRAINING_DATASET the trainer consumes. It runs your audio through the MOSS codec/tokenizer, splits off a validation set, and caches the result so you don't re-encode every time you tweak a hyperparameter.
If you've trained image LoRAs, this is the equivalent of the caching/latents step - the slow, one-time preprocessing that makes the actual training loop fast. Get it right once and every subsequent training run reuses it.
How it works
You connect the MOSS engine (so it knows which tokenizer/codec to use) and point it at your dataset source. It encodes each clip into the token representation MOSS trains on, optionally encodes reference audio, carves out a validation split for measuring progress, and writes a reusable prep cache. Because it caches, flipping a training setting later doesn't force a full re-encode - a real time-saver on anything but a tiny dataset.
The inputs and outputs that matter
TTS_engine(TTS_ENGINE) - the MOSS engine node. This tells Prep which model family it's encoding for. Required.dataset_source(STRING) - where the dataset lives. In the standard flow this ties back to what Clip Staging / Dataset Rows produced.model_name(defaultMyMossLoRA) - the name your trained adapter will carry. Set it per project.validation_split(default 0.05) andsplit_seed(default 42) - hold out 5% of clips to validate against, with a fixed seed so the split is reproducible. 5% is a fine default for a small dataset.reuse_existing(default on) - reuse the prep cache if one already exists. Leave it on; that's the whole point of caching. Turn it off only when you've changed the source data and need a clean re-encode.encode_reference_audio(default on),prep_batch_size(default 8),n_vq(default 0) - encoding details. Lowerprep_batch_sizeif prep runs out of memory; otherwise the defaults are sensible.
Outputs: training_dataset (TRAINING_DATASET) - feed this to the Model Training node alongside a Training Config - and dataset_info (STRING), a report of clip counts and the train/validation split.
How to install it
Part of TTS Audio Suite. ComfyUI Manager: search TTS Audio Suite, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/diodiogod/TTS-Audio-Suite.git
cd TTS-Audio-Suite
python install.py
then restart. On Linux, install portaudio19-dev and libsamplerate0-dev first. Prep needs the MOSS tokenizer/codec loaded (via the engine), which auto-downloads into ComfyUI/models/TTS/moss_tts/ on first use - that's a multi-GB download, so the first prep is slow.
Common issues & troubleshooting
Prep runs out of VRAM/RAM. Encoding is the memory-hungry part. Drop prep_batch_size (8 โ 4 โ 2). MOSS training in general is not a light job - this pipeline targets the 8B model, so a small GPU will struggle even before the training loop starts.
It re-encodes everything every run. Check reuse_existing is on and that model_name / dataset_source haven't changed - the cache is keyed to those. Renaming the model invalidates the cache.
Validation loss looks weird / non-existent. With a tiny dataset a 5% split might be just one or two clips. Nudge validation_split up a little (or accept that validation is noisy on small sets) - it's a health signal, not gospel.
"Wrong engine" errors. The TTS_engine input must be a MOSS engine. Wiring in a different engine's config won't prep correctly - this pipeline is MOSS-specific.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| TTS_engine | TTS_ENGINE | Connect a MOSS engine using a Delay 8B v1.0 or v1.5 model. Dataset preparation follows that selected base model. | |
| model_name | STRING | MyMossLoRA | Base name for the trained MOSS LoRA adapter folder. |
| dataset_source | STRING | Path to the main MOSS manifest JSONL. This is your training set manifest: one JSON row per clip. In the normal workflow, connect the manifest path produced by MOSS Dataset Rows here. | |
| validation_sourceopt | STRING | Optional second manifest JSONL used only for validation. Use this if you already prepared a separate holdout set. Example: โข dataset_source = your main training manifest โข validation_source = a smaller separate manifest reserved for evaluation If you leave this blank, the node will automatically split dataset_source into train + validation for you. | |
| validation_splitopt | FLOAT | 0.050.01โ0.5 | Only used when validation_source is blank. Example: 0.05 means keep about 5% of dataset_source for validation and use the rest for training. |
| split_seedopt | INT | 420โ2147483647 | Seed for the automatic train/validation split, so the same manifest gets split the same way every time. |
| prep_batch_sizeopt | INT | 81โ64 | Batch size for audio-code extraction during dataset prep. |
| n_vqopt | INT | 00โ32 | Optional codec codebook count override. 0 uses the model default. |
| encode_reference_audioopt | BOOLEAN | true | Pre-encode reference audio fields during dataset prep. Leave this on if your manifest uses ref_audio/reference_audio. If you are doing normal audio+transcript training with no reference clips, this setting does not matter much. |
| reuse_existingopt | BOOLEAN | true | Reuse a matching prepared dataset cache instead of re-encoding audio codes every run. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| training_dataset | TRAINING_DATASET | โ |
| dataset_info | STRING | โ |