Instructions to use vftfnn/voxcpm2-t4-inductor-cache with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use vftfnn/voxcpm2-t4-inductor-cache with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("vftfnn/voxcpm2-t4-inductor-cache") 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 inductor compile cache for Kaggle T4
torch.compiler.save_cache_artifacts() output for openbmb/VoxCPM2 with
torch.compile(mode="reduce-overhead", fullgraph=True) applied to the fixed-shape feat_encoder (LocEnc) and
feat_decoder.estimator (LocDiT) in float16, as done by the wfly-spring Kaggle VoxCPM2 service.
Loading it with torch.compiler.load_cache_artifacts() before compiling cuts warm-up compilation from ~31s to ~7s.
| Directory | torch | triton | GPU | voxcpm |
|---|---|---|---|---|
torch-2.11.0-cu128_triton-3.6.0_sm75/ |
2.11.0+cu128 | 3.6.0 | NVIDIA Tesla T4 (sm_75) | 2.0.3 |
One file per GPU index (compile_cache_cuda0.bin, compile_cache_cuda1.bin): inductor cache keys include the
device index, so a cache produced on cuda:0 misses on cuda:1.
The cache is only valid for the exact torch / triton / GPU architecture above. A mismatched environment should fall back
to compiling from scratch (the service looks up torch-{torch.__version__}_triton-{triton.__version__}_sm{major}{minor}
with + replaced by -, file compile_cache_cuda{index}.bin, and compiles normally when it is missing).
Generated 2026-10-23 on Kaggle (Python 3.13). Contains only compiled Triton kernels / FX graphs, no weights.