FL VoxCPM LoRA Trainer
Train a voice LoRA inside ComfyUI, with a live loss chart and audio samples
- train_config
- dataset_path
- LoRA Output Path
This is the payoff node of the whole filliptm/ComfyUI-FL-VoxCPM pack: a real LoRA trainer for a TTS model, running inside ComfyUI, with a live dashboard that shows the loss curve, training progress, and - the genuinely nice touch - audio samples of what the model sounds like at each checkpoint. The author's pitch on launch day was "I can 100% faithfully recreate voices with this model and a custom trained LoRA," and this node is how. It trains a voice LoRA for VoxCPM V1 or V2 from the same graph, auto-detecting which trainer to route to.
How it works
The plumbing: Dataset Maker produces a train.jsonl, a Train Config node (V1 or V2) supplies hyperparameters, and this node runs the actual gradient loop. base_model_name decides the routing - VoxCPM2 goes to the V2 trainer, VoxCPM1.5/0.5B to the V1 trainer - and the config's version marker is checked against it, so mismatched setups fail loudly instead of silently.
The dashboard is the part people don't expect from ComfyUI. The node streams voxcpm.training.progress messages over the websocket (status updates, loss values, progress) into an embedded widget - a real-time loss chart, not a frozen node. Set validation_text to a sentence you care about and it synthesizes audio at each checkpoint, so you hear the voice sharpen while you watch. Same seed per checkpoint means A/B-ing across runs is fair.
Inputs that matter
- dataset_path - the
VOXCPM_DATASETfrom Dataset Maker. - train_config - the config dict from either Train Config node.
- output_name - creates a subfolder in
ComfyUI/models/loras/VoxCPM/. Keep it memorable; you'll pick it from a TTS node'slora_namedropdown afterward. - max_steps (1000) / save_every_steps (200) - run length and checkpoint cadence. Save frequently; the best checkpoint is rarely the last one.
- validation_text + validation_steps - the audio-sample feature. Empty validation text skips it.
- num_workers (0) - dataloader workers; 0 keeps it on the main thread (safest for Windows).
Output is a STRING - the folder where your LoRA landed - and the node is an output node, so it runs to completion as a terminal step.
Installation and hardware
Same pack, same install - Manager search "FL VoxCPM", or clone + pip install -r requirements.txt. But this node is where the requirements get real: the trainer needs argbind and datasets (the requirements file includes them), and the model downloads on demand. Budget 16GB+ RAM for V1 training, ~32GB and ~20GB VRAM for V2. This is a heavyweight node; don't run it on a laptop.
Common issues
- "Training functionality unavailable… pip install argbind datasets" - the trainer's optional deps didn't install. Run the pip command it prints. The inference nodes work without them; only training needs them.
- Dataset rejected - the JSONL is malformed, or your folder had samples without transcripts. Fix at the Dataset Maker, not here.
- Training "works" but the voice is off - the classic: tiny, one-utterance datasets, or transcripts that don't match the audio. Cleaner data beats every knob, and the community reports big gains from higher rank (128) on voice work.
- New LoRA not in the TTS dropdown - it's saved under
loras/VoxCPM/<name>/; refresh the node or restart ComfyUI so the schema re-scans the folder.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| base_model_name | COMBO | VoxCPM1.5 | Base VoxCPM model to fine-tune (V1 or V2). |
| train_config | * | Configuration from VoxCPM Train Config (V1) or V2 Train Config node. | |
| dataset_path | VOXCPM_DATASET | Path to the train.jsonl file from VoxCPM Dataset Maker. | |
| output_name | STRING | my_lora_v1 | Name of the subfolder in 'models/loras/VoxCPM/' to save results. |
| max_steps | INT | 1000100–100000 | Total number of training steps. |
| save_every_steps | INT | 20050–5000 | Save checkpoint every N steps. |
| num_workers | INT | 00–8 | Number of dataloader workers (0 for main thread). |
| validation_textopt | STRING | Text to synthesize at each checkpoint for audio validation. Leave empty to skip. | |
| validation_stepsopt | INT | 101–100 | Inference timesteps for validation audio generation. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LoRA Output Path | STRING | — |