Upload VoxCPM2 ONNX models (4 models, ~17GB)
Browse files- .gitattributes +4 -0
- README.md +80 -0
- audio_vae_decoder.onnx +3 -0
- audio_vae_decoder.onnx.data +3 -0
- audio_vae_encoder.onnx +3 -0
- audio_vae_encoder.onnx.data +3 -0
- voxcpm2_decode_step.onnx +3 -0
- voxcpm2_decode_step.onnx.data +3 -0
- voxcpm2_prefill.onnx +3 -0
- voxcpm2_prefill.onnx.data +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
audio_vae_decoder.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
audio_vae_encoder.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
voxcpm2_decode_step.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
voxcpm2_prefill.onnx.data filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- tts
|
| 5 |
+
- voice-cloning
|
| 6 |
+
- onnx
|
| 7 |
+
- cpu-inference
|
| 8 |
+
- cantonese
|
| 9 |
+
- voxcpm2
|
| 10 |
+
language:
|
| 11 |
+
- zh
|
| 12 |
+
- en
|
| 13 |
+
- ja
|
| 14 |
+
library_name: onnxruntime
|
| 15 |
+
pipeline_tag: text-to-speech
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# VoxCPM2-ONNX
|
| 19 |
+
|
| 20 |
+
ONNX Runtime models for [VoxCPM2](https://github.com/OpenBMB/VoxCPM) — a 2B-parameter text-to-speech model by OpenBMB with voice cloning capability.
|
| 21 |
+
|
| 22 |
+
**Run VoxCPM2 voice cloning on any CPU — no GPU needed.**
|
| 23 |
+
|
| 24 |
+
## Models
|
| 25 |
+
|
| 26 |
+
| File | Size | Description |
|
| 27 |
+
|---|---|---|
|
| 28 |
+
| `audio_vae_encoder.onnx` + `.data` | ~185 MB | Audio waveform to latent features |
|
| 29 |
+
| `audio_vae_decoder.onnx` + `.data` | ~176 MB | Latent features to 48 kHz waveform |
|
| 30 |
+
| `voxcpm2_prefill.onnx` + `.data` | ~7.8 GB | Text + reference audio to KV cache + DiT hidden state |
|
| 31 |
+
| `voxcpm2_decode_step.onnx` + `.data` | ~8.1 GB | Single autoregressive decode step (10 CFM steps baked in) |
|
| 32 |
+
|
| 33 |
+
All models use `external_data=True` — keep `.onnx` and `.onnx.data` files together.
|
| 34 |
+
|
| 35 |
+
## Usage
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
# Install
|
| 39 |
+
pip install voxcpm>=2.0.2 torch>=2.4.0 onnxruntime>=1.18.0 soundfile numpy tqdm huggingface_hub
|
| 40 |
+
|
| 41 |
+
# Download models
|
| 42 |
+
python -c "
|
| 43 |
+
from huggingface_hub import snapshot_download
|
| 44 |
+
snapshot_download('ai4all8/VoxCPM2-ONNX', local_dir='./onnx_models', ignore_patterns=['*.md', '*.txt'])
|
| 45 |
+
"
|
| 46 |
+
|
| 47 |
+
# Download VoxCPM2 PyTorch weights (needed for preprocessing)
|
| 48 |
+
python -c "from voxcpm import VoxCPM; VoxCPM.from_pretrained('openbmb/VoxCPM2')"
|
| 49 |
+
|
| 50 |
+
# Run inference (see GitHub repo for full CLI)
|
| 51 |
+
git clone https://github.com/ai4all8/VoxCPM2-ONNX.git
|
| 52 |
+
cd VoxCPM2-ONNX
|
| 53 |
+
python infer.py --text "Hello!" --ref_wav speaker.wav --ref_text "Reference transcript."
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Full documentation and code: [github.com/ai4all8/VoxCPM2-ONNX](https://github.com/ai4all8/VoxCPM2-ONNX)
|
| 57 |
+
|
| 58 |
+
## Languages
|
| 59 |
+
|
| 60 |
+
- Cantonese (粵語)
|
| 61 |
+
- Mandarin (普通話)
|
| 62 |
+
- English
|
| 63 |
+
- Japanese (日本語)
|
| 64 |
+
|
| 65 |
+
## Performance
|
| 66 |
+
|
| 67 |
+
| Platform | RTF | Notes |
|
| 68 |
+
|---|---|---|
|
| 69 |
+
| AMD Ryzen 9 (Windows) | ~4.5x | 8 cores, ORT sequential |
|
| 70 |
+
| Intel Core (Linux) | ~9.5x | Single-threaded |
|
| 71 |
+
|
| 72 |
+
RTF = Real-Time Factor (lower is better; 1.0 = real-time).
|
| 73 |
+
|
| 74 |
+
## License
|
| 75 |
+
|
| 76 |
+
Apache License 2.0, same as the original VoxCPM2 model.
|
| 77 |
+
|
| 78 |
+
## Attribution
|
| 79 |
+
|
| 80 |
+
Original model: [VoxCPM2 by OpenBMB](https://github.com/OpenBMB/VoxCPM) (Apache 2.0, Copyright OpenBMB / Tsinghua University).
|
audio_vae_decoder.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdd20e200675ab9649bf33f16bc5974101ba5cf47ab89fbfe29f3d36ff6c3c84
|
| 3 |
+
size 1058148
|
audio_vae_decoder.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b76bd57356e96893655bd24a364989e016c5af2fc8c29195caaefb4eccf5143
|
| 3 |
+
size 183042048
|
audio_vae_encoder.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9de83b50a1f71e7bfa67f21071ffc74ae3363a7112b846040e3dfd3f2157de5b
|
| 3 |
+
size 728362
|
audio_vae_encoder.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5ccf55f431d96c34117954830ee6a783fb88f200afb03de480616172ad3a1ed
|
| 3 |
+
size 192217088
|
voxcpm2_decode_step.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:476e37924de98864c0f3afee66a9e9ffd70583805d830dc15701c56187101103
|
| 3 |
+
size 20549602
|
voxcpm2_decode_step.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45192a7bb5b8a8222663053e0ff30f2f50f4527714619cee70c9816ce05425f5
|
| 3 |
+
size 8659337216
|
voxcpm2_prefill.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb8c7b3e783cfe59db5e6caeeabcc58bb0b6d7e7d5228fde67a59cca5266d9da
|
| 3 |
+
size 6688961
|
voxcpm2_prefill.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6c0c580da4c6ee176b9455cee8670517581b59dc097d86e8153b614b3d5e671
|
| 3 |
+
size 8362196992
|