VoxCPM Train Config
The hyperparameters behind VoxCPM's LoRA trainer
- Train Config
This is the settings panel for VoxCPM's LoRA training pipeline - a pure config node with no audio in or out, whose whole job is to bundle every training hyperparameter into one place and hand it to VoxCPM LoRA Trainer through its train_config input. You build this once per training run, plug it in, and everything it holds shapes how that run behaves.
If you've trained a LoRA for an image model before, most of these names will look familiar - rank, alpha, dropout, warmup, gradient accumulation are the same concepts everywhere LoRA shows up. What's specific to VoxCPM is which parts of the model actually get adapted, and that's the more interesting section here.
The parameters that matter
learning_rate(default 1e-4) andweight_decay(default 0.01) - standard optimizer settings.lora_rank(default 32, range 4–128) andlora_alpha(default 16, range 1–128) - rank sets how much capacity the LoRA adapter has; alpha scales how strongly it applies. Higher rank means a more expressive adapter at the cost of a larger file and more compute.lora_dropout(default 0) - regularization for the LoRA layers specifically, separate from the base model's own dropout.warmup_steps(default 100) andgrad_accum_steps(default 1) - standard training-loop knobs; gradient accumulation lets you simulate a larger effective batch size without more VRAM.max_batch_tokens(default 8192) - the direct VRAM-management lever. If training runs out of memory, this is the first thing to bring down.sample_rate(default 48000) - and this one is worth reading the tooltip on literally, because it's a real trap: use 48000 for VoxCPM2 and 44100 for VoxCPM1.5. Training against the wrong sample rate for your chosen base model is an easy, invisible-until-it-bites mismatch.enable_lm_lora/enable_dit_lora(both default on) /enable_proj_lora(default off) - these three toggles are the interesting part. VoxCPM's architecture, per the pack's own framing, is an end-to-end diffusion-autoregressive system built on a MiniCPM-4 language-model backbone: there's a language-model component (lm) handling the text/semantic side, a diffusion transformer (dit) handling the continuous-space acoustic generation, and separate projection layers connecting the two. These flags let you choose which of those get LoRA-adapted. LM and DiT are on by default because that's where most of a voice's character lives; projection layers are off by default as the lighter-touch option.
The output is Train Config (type *, a generic passthrough) - it only matters wired into LoRA Trainer's train_config input.
Installing it
Same pack, no separate install. ComfyUI Manager: search ComfyUI-VoxCPM. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/wildminder/ComfyUI-VoxCPM.git
cd ComfyUI-VoxCPM
pip install -r requirements.txt
Restart, and it's under audio/tts/training alongside Dataset Maker and LoRA Trainer.
Common issues & troubleshooting
Out of VRAM during training. Drop max_batch_tokens first - it's the parameter explicitly meant to manage memory usage. If that's not enough, grad_accum_steps lets you claw back effective batch size without raising memory pressure the same way a literal larger batch would.
Trained LoRA sounds subtly wrong, or training behaves unpredictably. Double-check sample_rate against base_model_name on the LoRA Trainer node - 48000 for VoxCPM2, 44100 for VoxCPM1.5. A mismatch here is invisible in the config itself; it only shows up as bad results downstream.
LoRA doesn't seem to be affecting the character of the voice much. Check enable_lm_lora and enable_dit_lora are actually on - if both got flipped off and only enable_proj_lora is active, you're adapting the smallest, least voice-defining part of the model.
No TTS-specific rank/alpha guidance to lean on. Unlike image-model LoRA training, where the community has settled on well-tested rank/alpha/learning-rate conventions, there isn't an equivalent, widely-agreed playbook for VoxCPM specifically yet - the defaults here are a reasonable starting point, but treat any specific number as a starting point to experiment from rather than a proven recipe.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| learning_rate | FLOAT | 0.00010.000001–0.01 | Learning rate for the optimizer. |
| lora_rank | INT | 324–128 | Rank (dimension) of the LoRA adapter. |
| lora_alpha | INT | 161–128 | Alpha scaling factor for LoRA. |
| lora_dropout | FLOAT | 0.000–0.5 | Dropout probability for LoRA layers. |
| warmup_steps | INT | 1000–1000 | Number of warmup steps for learning rate scheduler. |
| grad_accum_steps | INT | 11–64 | Number of steps to accumulate gradients before updating weights. |
| max_batch_tokens | INT | 81921024–32768 | Maximum number of tokens per batch to manage VRAM usage. |
| sample_rate | INT | 4800016000–48000 | Sample rate of the training audio. Use 48000 for VoxCPM2, 44100 for VoxCPM1.5. |
| weight_decay | FLOAT | 0.010–0.1 | Weight decay for regularization. |
| enable_lm_lora | BOOLEAN | true | Apply LoRA to the Language Model backbone. |
| enable_dit_lora | BOOLEAN | true | Apply LoRA to the Diffusion Transformer. |
| enable_proj_lora | BOOLEAN | false | Apply LoRA to projection layers. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Train Config | * | — |