Nodes/ComfyUI-VoxCPM2/VoxCPM2 Train Config
ComfyUI Node

VoxCPM2 Train Config

All Your LoRA Hyperparameters, In One Dictionary

By Saganaki22·Created 5 months ago·Updated 4 months ago· 195
VoxCPM2 Train Config
    • Train Config
    learning_rate0.0001
    lora_rank32
    lora_alpha16
    lora_dropout0.00
    warmup_steps100
    grad_accum_steps1
    max_batch_tokens8192
    sample_rate16000
    weight_decay0.01
    enable_lm_loratrue
    enable_dit_loratrue
    enable_proj_lorafalse

    VoxCPM2 Train Config is not a glamorous node. It takes eleven hyperparameters, bundles them into a dictionary, and hands that dictionary to the LoRA Trainer. It does exactly one thing and does it transparently. But since the whole training run lives or dies on what you set here, it's worth five minutes of your attention before you hit queue.

    How it works

    It's a pure config aggregator - every input is collected and passed through as a Train Config (*) output, which you wire into the matching train_config input on VoxCPM2 LoRA Trainer. No model loading, no downloads, instant. Think of it as a settings panel that happens to be a node.

    The knobs that decide your run

    • lora_rank (default 32) - the dimension of the low-rank matrices. Higher captures more voice detail at the cost of VRAM and data. 32 is the sensible start; people chasing faithful clones report rank 64–128 gets genuinely impressive results, if you have the card for it.
    • lora_alpha (default 16) - scaling factor. The old rule of thumb here is alpha = rank / 2, and it still holds for this pack.
    • learning_rate (default 1e-4) - if loss explodes to NaN, halve it to 5e-5 and retry.
    • grad_accum_steps (default 1) - this one's a trap. The physical batch size is locked to 1 for stability, so gradient accumulation is how you fake a bigger batch. Raising this to 4–8 stabilizes gradients a lot more than it slows training.
    • max_batch_tokens (default 8192) - the VRAM governor. OOM during training? Lower this before you touch anything else.
    • warmup_steps (default 100) - the README suggests roughly 5–10% of your total steps.
    • sample_rate (default 16000) - must match the AudioVAE encoder. The trainer auto-detects the right value and will warn-plus-override if you disagree with it, so leave this alone unless you know better.
    • weight_decay (default 0.01), lora_dropout (default 0) - regularization; defaults are fine to start.
    • enable_lm_lora / enable_dit_lora (both on) - apply LoRA to the language-model backbone and the diffusion transformer. enable_proj_lora (off) covers projection layers; only flip it on if you have a specific reason.

    What to actually run

    For a ~5-minute dataset, the guide's recipe is rank 32–64, LR 1e-4, grad_accum_steps 4–8, max_steps 1000–2000, save_every_steps 200. That's a solid first run - you want checkpoints to compare, not one final file. You'll almost always pick an intermediate checkpoint over the last one, because the last step is usually where overfitting creeps in.

    Install and gotchas

    Same pack as the rest: install ComfyUI-VoxCPM2 via Manager or clone into custom_nodes. This node itself is dependency-free, but the training chain needs argbind and datasets, which are not in the base requirements.txt - expect the Trainer node to nag you until you run pip install argbind datasets. And remember: configs are cheap. Tweak, rerun, compare. The expensive thing is the training that follows, not this node.

    Categoryaudio/tts/training

    Inputs (12)

    NameTypeDefaultDescription
    learning_rateFLOAT0.00010.000001–0.01Learning rate for the optimizer.
    lora_rankINT324–128Rank (dimension) of the LoRA adapter.
    lora_alphaINT161–128Alpha scaling factor for LoRA.
    lora_dropoutFLOAT0.000–0.5Dropout probability for LoRA layers.
    warmup_stepsINT1000–1000Number of warmup steps for learning rate scheduler.
    grad_accum_stepsINT11–64Number of steps to accumulate gradients before updating weights.
    max_batch_tokensINT81921024–32768Maximum number of tokens per batch to manage VRAM usage.
    sample_rateINT1600016000–48000Sample rate must match AudioVAE encoder (16000 for VoxCPM2).
    weight_decayFLOAT0.010–0.1Weight decay for regularization.
    enable_lm_loraBOOLEANtrueApply LoRA to the Language Model backbone.
    enable_dit_loraBOOLEANtrueApply LoRA to the Diffusion Transformer.
    enable_proj_loraBOOLEANfalseApply LoRA to projection layers.

    Outputs (1)

    NameTypeDescription
    Train Config*