Nodes/ComfyUI-FL-VoxCPM/FL VoxCPM V2 Train Config
ComfyUI Node

FL VoxCPM V2 Train Config

The V2 training config that ships with sane OpenBMB defaults

By filliptm·Created 7 months ago·Updated 4 months ago· 32
FL VoxCPM V2 Train Config
    • V2 Train Config
    learning_rate0.0001
    lora_rank32
    lora_alpha32
    lora_dropout0.00
    warmup_steps100
    grad_accum_steps8
    max_batch_tokens8192
    sample_rate16000
    weight_decay0.01
    enable_lm_loratrue
    enable_dit_loratrue
    enable_proj_lorafalse
    lr_schedulercosine

    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_rank or max_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.
    CategoryFL/VoxCPM/Training

    Inputs (13)

    NameTypeDefaultDescription
    learning_rateFLOAT0.00010.000001–0.01Learning rate. Official default: 1e-4 for LoRA.
    lora_rankINT324–128LoRA rank. Official default: 32.
    lora_alphaINT321–128LoRA alpha. Official default: 32 (same as rank, scaling=1.0).
    lora_dropoutFLOAT0.000–0.5Dropout probability for LoRA layers.
    warmup_stepsINT1000–1000Number of warmup steps for learning rate scheduler.
    grad_accum_stepsINT81–64Gradient accumulation steps. Official default: 8 (effective batch=16 with batch_size=2).
    max_batch_tokensINT81921024–32768Maximum number of tokens per batch.
    sample_rateINT1600016000–48000Sample rate for audio encoding. V2 AudioVAE encodes at 16kHz (decodes to 48kHz via super-resolution).
    weight_decayFLOAT0.010–0.1Weight decay for regularization.
    enable_lm_loraBOOLEANtrueApply LoRA to the Language Model backbone (q/k/v/o projections).
    enable_dit_loraBOOLEANtrueApply LoRA to the Diffusion Transformer (q/k/v/o projections).
    enable_proj_loraBOOLEANfalseApply LoRA to projection layers. Official default: disabled.
    lr_schedulerCOMBOcosineLR schedule: 'cosine' decays to 0 over training, 'constant' keeps LR fixed after warmup.

    Outputs (1)

    NameTypeDescription
    V2 Train ConfigVOXCPM_V2_TRAIN_CONFIG