Nodes/ComfyUI-VoxCPM/VoxCPM Advanced Parameters
ComfyUI Node

VoxCPM Advanced Parameters

The retry-on-babble safety net for VoxCPM TTS

By wildminder·Created 11 months ago·Updated 4 months ago· 496
VoxCPM Advanced Parameters
    • ADVANCED_PARAMS
    min_tokens2
    max_tokens2048
    temperature1.0
    sway1.0
    use_cfg_zero_startrue
    retry_max_attempts3
    retry_threshold6.0

    This is a pure config node - no audio in, no audio out, just a bundle of generation knobs that plugs into the advanced_params input on the main VoxCPM TTS node. It exists so the sampling-level parameters don't have to live directly on the TTS node itself: build one Advanced Params node with a profile you like, and reuse it across as many TTS nodes as you want instead of re-tuning each one by hand.

    Most of what's here is standard diffusion-sampling territory - temperature, sway coefficient, a CFG-Zero* toggle - but the one genuinely distinctive feature is the retry mechanism, and it's worth understanding because it's solving a real problem specific to this kind of TTS model: occasional "babbling," where the model loops or drifts into garbage instead of stopping cleanly.

    The inputs that matter

    • temperature (default 1.0, range 0.1–2.0) - sampling temperature. Lower gives you more stable, consistent delivery; higher gives more varied, expressive output at the cost of predictability.
    • min_tokens / max_tokens (defaults 2 / 2048) - hard bounds on how long the generated audio can be, in the model's own token units rather than seconds. If longer scripts are getting cut off, max_tokens is the ceiling to raise.
    • sway (default 1.0, range 0–2) - the sway sampling coefficient, which shapes the trajectory the diffusion process takes. It's a fine-tuning knob; there's no strong community consensus pushing away from the default, so leave it unless you're deliberately experimenting.
    • use_cfg_zero_star (default on) - an optimization for guidance quality. Leave it on unless you have a specific reason not to.
    • retry_max_attempts (default 3, 0–10) and retry_threshold (default 6, range 2–20) - the babble guard. VoxCPM measures the ratio of generated audio length to input text length; if a generation comes back way longer than it should for the amount of text you gave it, that's the signature of the model looping or babbling, and it automatically retries up to retry_max_attempts times. Set retry_max_attempts to 0 and you disable this safety net entirely - worth knowing before you do it, since it means a bad generation just ships as-is instead of getting silently redone.

    The single output is ADVANCED_PARAMS, a bundle type that only means anything wired into the TTS node's advanced_params slot.

    Installing it

    Same pack as VoxCPM TTS - there's nothing separate to install. Via 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 ComfyUI and it shows up under audio/tts/config, right next to VoxCPM Voice Cloning.

    Common issues & troubleshooting

    Generation is getting cut off mid-sentence. That's max_tokens hitting its ceiling on a longer script - raise it rather than fighting the text.

    Output occasionally comes back as garbled babbling and you're not sure why. Check that retry_max_attempts isn't set to 0. This node's whole reason for existing is largely to catch exactly that failure mode automatically - if you've turned the retry off to save generation time, you've also turned off the thing that was quietly fixing your bad takes.

    Cranking temperature up for more "expressive" delivery makes things worse, not better. High temperature and instability go hand in hand with this kind of autoregressive-diffusion model - if you're pushing temperature past 1.5 and generations start sounding less coherent, that's expected, not a bug. Pull it back down and lean on sway or a longer steps count on the TTS node itself for expressiveness instead.

    Nothing changes when you tweak this node. Make sure the output is actually wired into the TTS node's advanced_params input - it's an optional slot, easy to forget to connect after you build the node, and unwired it's silently ignored in favor of the TTS node's own defaults.

    Categoryaudio/tts/config

    Inputs (7)

    NameTypeDefaultDescription
    min_tokensINT21–100Minimum length of generated audio tokens.
    max_tokensINT204864–8192Maximum length of generated audio tokens.
    temperatureFLOAT1.00.1–2Sampling temperature. Lower = more stable/consistent, Higher = more varied/expressive.
    swayFLOAT1.00–2Sway sampling coefficient. Affects sampling trajectory in diffusion.
    use_cfg_zero_starBOOLEANtrueUse CFG-Zero* optimization for better quality.
    retry_max_attemptsINT30–10Max retry attempts for bad cases (e.g., babbling). Set to 0 to disable.
    retry_thresholdFLOAT6.02–20Audio/text length ratio to trigger a retry.

    Outputs (1)

    NameTypeDescription
    ADVANCED_PARAMSADVANCED_PARAMS