Nodes/ComfyUI-VoxCPM2/VoxCPM Voice Clone
ComfyUI Node

VoxCPM Voice Clone

Voice Cloning, Two Modes, One Node

By Saganaki22·Created 5 months ago·Updated 4 months ago· 195
VoxCPM Voice Clone
  • reference_audio
  • Cloned Audio
model_nameVoxCPM2
lora_nameNone
voice_description
textThis is a cloned voice generated by VoxCPM.
prompt_text
cfg_value2.0
inference_timesteps10
max_tokens4096
normalize_texttrue
enable_denoiserfalse
seed42
force_offloadfalse
dtypeauto
devicecpu
enable_asrfalse
retry_max_attempts3
retry_threshold6.0
torch_compilefalse

This is the node people come for. VoxCPM2 Voice Clone takes a short clip of someone speaking and lets you make them say anything - with two distinct quality tiers hiding behind one input, and a live knob for how the voice feels. It's the difference between "sounds like them" and "sounds like them, but annoyed," which is more than most open TTS will give you.

It runs VoxCPM2, OpenBMB's 2B tokenizer-free diffusion TTS. You feed it a reference_audio clip (16kHz is fine - the AudioVAE V2 codec upscales output to 48kHz), it learns the timbre from the clip, and generates through a diffusion decoder rather than discrete tokens, which is why clones land closer to the original than the old token-based models. On 8GB cards it runs fine; audio is the cheap part of any ComfyUI pipeline compared to the video it often feeds.

The one input that changes everything: prompt_text

The whole node hinges on whether you fill in prompt_text:

  • Leave it empty → Controllable Cloning. The model clones the voice from the audio alone. This is the quick mode, and where voice_description earns its keep - it's style guidance here ("slightly faster, cheerful tone"), prepended in parentheses to your text.
  • Provide the exact transcript → Ultimate Cloning. The model switches to audio-continuation cloning: reference audio + matching text, highest fidelity, every vocal nuance. It's the mode the README pushes for serious work. The style description is ignored in ultimate mode, so don't be confused when it stops having an effect.

If you don't have a transcript, flip enable_asr on. It runs SenseVoiceSmall locally (first run downloads ~400MB, needs funasr installed) to transcribe the clip and drops you into Ultimate mode automatically. Good setup - one caveat: ASR is ignored when prompt_text is already filled, and on a bad clip it can return empty text, in which case you're back to controllable.

The inputs that matter

  • reference_audio - required, and capped at 50 seconds. The author hard-rejects longer clips because they drag quality down. Sweet spot is 5–15 seconds of clean, continuous speech; a noisy clip will clone a noisy voice.
  • enable_denoiser - runs the reference through ZipEnhancer first (needs modelscope). Useful for phone recordings; when it's active, output is loudness-normalized to -20 LUFS automatically.
  • retry_max_attempts (default 3) - the pack's hidden gem. VoxCPM occasionally babbling or going silent on a run; this auto-regenerates and detects bad output via the retry_threshold audio/text-length ratio. Set to 0 to disable. Just leave it on.
  • cfg_value, inference_timesteps, max_tokens - same story as the TTS node: CFG around 2, 10 steps for drafts, 15–25 for the keeper.

One behavior worth knowing from the community: style guidance can push the clone off-character. As one user put it, a somber sample plus an angry style prompt will change the voice along with the emotion. If you want pure timbre, keep voice_description empty.

Output

Cloned Audio - a single AUDIO output at 48kHz. Wire it to a save/preview node or straight into a lip-sync or video pipeline. That's the whole interface.

Install

Same pack, same ritual. ComfyUI Manager (search "ComfyUI-VoxCPM2") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-VoxCPM2.git
cd ComfyUI-VoxCPM2
pip install -r requirements.txt

Restart, and the model auto-downloads to ComfyUI/models/tts/VoxCPM/ on first use. On Python 3.13+/Windows, pip install can trip on editdistance - install pdm-backend and set CL=/utf-8 first.

Gotchas

The 50-second reference limit is a hard error, not a warning - trim before you connect. And the old VoxCPM V1 models in the dropdown need a transcript; they have no controllable mode, so a V1 model + empty prompt_text will error. If you're on this pack you almost certainly want VoxCPM2 anyway. When the clone drifts, the fix list is short and predictable: cleaner reference, accurate transcript with punctuation (it helps intonation), and more timesteps.

Categoryaudio/tts

Inputs (19)

NameTypeDefaultDescription
model_nameCOMBOVoxCPM2Select the VoxCPM model to use.
lora_nameCOMBONoneLoRA checkpoint from models/loras. Set to None to disable.
voice_descriptionSTRINGStyle control description (optional). E.g. 'slightly faster, cheerful tone'. Wrapped in parentheses and prepended to text.
textSTRINGThis is a cloned voice generated by VoxCPM.Target text to synthesize into speech.
reference_audioAUDIOReference audio for voice cloning. Required.
prompt_textSTRINGTranscript of the reference audio. Provide for Ultimate Cloning (highest fidelity). Leave empty for Controllable Cloning (VoxCPM2 only).
cfg_valueFLOAT2.01–10Classifier-Free Guidance scale. Higher = more adherence to prompt, lower = more natural variation.
inference_timestepsINT101–100Number of diffusion steps. More steps = better quality but slower.
max_tokensINT409664–8192Maximum generation length in tokens. Controls max audio duration.
normalize_textBOOLEANtrueAuto-process numbers, abbreviations, and punctuation. Turn OFF for phoneme input.
enable_denoiserBOOLEANfalseDenoise reference audio before cloning. Requires modelscope package.
seedINT42-1–18446744073709550000Random seed for reproducibility. -1 = random each run.
force_offloadBOOLEANfalseFully unload model from VRAM and RAM after generation.
dtypeCOMBOautoModel dtype. Auto uses native bf16 (fp16 on older GPUs).
deviceCOMBOcpuInference device.
enable_asrBOOLEANfalseAuto-transcribe reference audio to text using SenseVoiceSmall ASR. Requires funasr package. Ignored when prompt_text is provided. First run downloads the model (~400MB).
retry_max_attemptsINT30–10Auto-retry on bad generation (babbling/silence). 0 = no retries.
retry_thresholdFLOAT6.02–20Threshold for detecting bad generations based on audio/text length ratio.
torch_compileBOOLEANfalseEnable torch.compile optimization (first run compiles kernels, subsequent runs are faster).

Outputs (1)

NameTypeDescription
Cloned AudioAUDIO