Instructions to use grruwi/VoxCPM2-pytorch-prebuilt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use grruwi/VoxCPM2-pytorch-prebuilt with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("grruwi/VoxCPM2-pytorch-prebuilt") wav = model.generate( text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.", prompt_wav_path=None, # optional: path to a prompt speech for voice cloning prompt_text=None, # optional: reference text cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed normalize=True, # enable external TN tool denoise=True, # enable external Denoise tool retry_badcase=True, # enable retrying mode for some bad cases (unstoppable) retry_badcase_max_times=3, # maximum retrying times retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech ) sf.write("output.wav", wav, 16000) print("saved: output.wav") - Notebooks
- Google Colab
- Kaggle
VoxCPM2 — prebuilt weight sets for PyTorch
VoxCPM2 prebuilt for the PyTorch engine of Voicebox-on-Linux, cut exactly the way its panel splits the model: the language part (BaseLM) and the acoustic part (ResidualLM, LocEnc, DiT, projections) each in its own precision. AudioVAE (the head) is always F32.
| set | BaseLM | acoustic | size |
|---|---|---|---|
q8-f16/ |
int8 (Int8Linear) |
F16 | 3.7 GB |
q8-f32/ |
int8 | F32 | 5.4 GB |
f16-f16/ |
F16 | F16 | 5.0 GB |
f16-f32/ |
F16 | F32 | 6.7 GB |
Why prebuilt: the worker loads only these sets — converting the BF16 original on every load would be slow and spike RAM (both copies in memory). The quantized sets are also faster and lighter on VRAM (q8/f16: ~5.1 GB VRAM, ~3.3 GB RAM on an RX 9070 XT).
Each model.pt is a plain dict of tensors (stan = state dict, bufory = rope buffers,
dtype). The engine loads it with torch.load(..., weights_only=True) — no code runs from
the file. Made on the CPU with pytorch/workers/voxcpm2/make_weights.py from the repo above —
run it yourself if you prefer.
Use
Laid out as Voicebox-on-Linux expects: models/voxcpm-pt/prebuilt/<set>/model.pt
(./download-models.sh pytorch-all fetches all four). The config and tokenizer still come from the
original repo (models/voxcpm-pt/weights/).
License
Apache 2.0, as the original openbmb/VoxCPM2.
Model tree for grruwi/VoxCPM2-pytorch-prebuilt
Base model
openbmb/VoxCPM2