FL VoxCPM V2 Train Config
The V2 training config that ships with sane OpenBMB defaults
- V2 Train Config
This is the V2 sibling of the Train Config node - the settings sheet for training a voice LoRA on VoxCPM2, the 2B model that outputs 48kHz audio across 30 languages. Where the V1 config makes you guess, this one ships with the official OpenBMB training defaults baked in, so a first-time trainer can connect it, leave almost everything alone, and get a sensible run. It exists to make the 2B model trainable without reading the paper.
It's part of filliptm/ComfyUI-FL-VoxCPM, and it slots into the same chain as V1: Dataset Maker → V2 Train Config → LoRA Trainer.
How it works
Same shape as the V1 node - every input is a hyperparameter, bundled into a VOXCPM_V2_TRAIN_CONFIG object for the trainer. The difference is the defaults and one internal trick: this node stamps its output with a v2 version marker, and the LoRA Trainer checks it. Connect a V2 config to a V1 model (or a V1 config to VoxCPM2) and you get a clear error instead of a silently wasted training run.
Inputs that matter
The defaults are the story here:
- lora_alpha (32) = lora_rank (32) - the official V2 setup uses alpha equal to rank, i.e. scaling of 1.0. Note the V1 config defaults to alpha 16 at rank 32; don't carry V1 habits over.
- grad_accum_steps (8) - the official default, which with the trainer's batch size 2 gives an effective batch of 16. This is why V2 training feels "chunkier" per update than V1.
- sample_rate (16000) - the counterintuitive one. V2's AudioVAE encodes at 16kHz and super-resolves to 48kHz on decode. That's why the default is 16k even though output is 48k - your training audio should match the 16k encode rate, not the final output.
- learning_rate (1e-4) and lora_rank (32) - same story as V1; the community pushes rank to 128 for strong voice likeness, and VRAM is the only real ceiling.
Everything else - lora_dropout, warmup_steps, max_batch_tokens, weight_decay, lr_scheduler, and the enable_lm_lora/enable_dit_lora (both on) / enable_proj_lora (off) toggles - can stay at defaults for a first run.
Installation
Same pack as the rest - Manager search "FL VoxCPM", or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI-FL-VoxCPM.git
cd ComfyUI-FL-VoxCPM
pip install -r requirements.txt
The config node itself is dependency-free; the V2 trainer is what demands the heavy lifting (argbind, datasets, and roughly 20GB of VRAM for a 2B LoRA run).
Common issues
- "V2 model requires a V2 Train Config" - you connected a V1 config to a V2 model. Swap in this node.
- "V1 model requires a V1 Train Config" - the reverse guard firing.
- OOM on the 2B model - drop
lora_rankormax_batch_tokens. V2 training is genuinely memory-hungry; the README calls 20GB VRAM, and 32GB+ system RAM is the realistic floor. If your card can't take it, the V1 path exists for a reason.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| learning_rate | FLOAT | 0.00010.000001–0.01 | Learning rate. Official default: 1e-4 for LoRA. |
| lora_rank | INT | 324–128 | LoRA rank. Official default: 32. |
| lora_alpha | INT | 321–128 | LoRA alpha. Official default: 32 (same as rank, scaling=1.0). |
| 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 | 81–64 | Gradient accumulation steps. Official default: 8 (effective batch=16 with batch_size=2). |
| max_batch_tokens | INT | 81921024–32768 | Maximum number of tokens per batch. |
| sample_rate | INT | 1600016000–48000 | Sample rate for audio encoding. V2 AudioVAE encodes at 16kHz (decodes to 48kHz via super-resolution). |
| weight_decay | FLOAT | 0.010–0.1 | Weight decay for regularization. |
| enable_lm_lora | BOOLEAN | true | Apply LoRA to the Language Model backbone (q/k/v/o projections). |
| enable_dit_lora | BOOLEAN | true | Apply LoRA to the Diffusion Transformer (q/k/v/o projections). |
| enable_proj_lora | BOOLEAN | false | Apply LoRA to projection layers. Official default: disabled. |
| lr_scheduler | COMBO | cosine | LR schedule: 'cosine' decays to 0 over training, 'constant' keeps LR fixed after warmup. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| V2 Train Config | VOXCPM_V2_TRAIN_CONFIG | — |