Text-to-Speech
Safetensors
F5-TTS
English
Chinese
tts
voice-cloning
zero-shot-tts
diffusion
flow-matching
dit
convnext
quantization
4-bit precision
2-bit
vault
primal
Instructions to use batteryphil/VAULT-PRIMAL-F5-TTS-337M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- F5-TTS
How to use batteryphil/VAULT-PRIMAL-F5-TTS-337M with F5-TTS:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- VAULT-PRIMAL-F5-TTS-337M (
192.0 MB4-Bit &138.9 MB2-Bit Zero-Shot Voice Cloning Diffusion TTS)
VAULT-PRIMAL-F5-TTS-337M (192.0 MB 4-Bit & 138.9 MB 2-Bit Zero-Shot Voice Cloning Diffusion TTS)
F5-TTS v1 Base (337.1M parameters β 4x ConvNeXt V2 CNN Text Encoder + 22-Layer DiT Conditional Flow-Matching Diffusion + Vocos, 24 kHz) compressed from 1.35 GB down to 192.0 MB (V3_P4_0 + PRIMAL) and 138.9 MB (V3_Q2_0 + PRIMAL)!
- Zero-Shot Voice Cloning in 1 Command: Clone any voice from a
5β10s.wav/.mp3clip β or run immediately with the bundled default voice (examples/ref_en.wav) and zero setup! - Never Downloads the
1.35 GBUpstreamFP32Checkpoint: InstantiatesCFM(transformer=DiT(...))directly and downloads ONLY the192.0 MB(4-bit) or138.9 MB(2-bit).safetensorsshard. - Shadowless Velocity-Field
PRIMALRescue: Raw 2-bitF5-TTScollapses into100.0%WER unintelligible static across16ODE steps; 4.2 minutes (120steps,164,654discrete integer flips) of Conditional Flow-Matching velocity distillation (0FP32shadow weights) brought it all the way back to6.78%WER /4.68%CER!
Listen First (Side-by-Side Audio Samples)
Prompt: "Hello! This is a full text to speech quantization benchmark running locally on consumer hardware." (24 kHz Zero-Shot Voice Cloning)
| Checkpoint | True File Size | Compression | Play Sample |
|---|---|---|---|
Upstream FP32 (SWivid/F5-TTS, 16 NFE) |
1,348.4 MB |
1.00x |
Download .wav |
Standard Uniform Q4_0 Baseline |
192.0 MB |
7.02x |
Download .wav |
f5_tts_v3_p4_0_primal.safetensors (Recommended) |
192.0 MB |
7.02x |
Download .wav |
f5_tts_v3_q2_0_primal.safetensors (Extreme 2-Bit DiT) |
138.9 MB |
9.71x |
Download .wav |
Which Checkpoint Should I Pick?
| Variant Flag | File in Repo | Size | Best For |
|---|---|---|---|
--variant p4_0 (Default) |
f5_tts_v3_p4_0_primal.safetensors |
192.0 MB |
Clean Zero-Shot Voice Cloning (7.02x smaller than 1.35 GB): Matches FP32's exact 3.69% Character Error Rate (0.00% CER degradation) after 93,733 discrete PRIMAL flips. |
--variant q2_0 |
f5_tts_v3_q2_0_primal.safetensors |
138.9 MB |
Extreme 9.71x Diffusion Compression (188.7M DiT + ConvNeXt V2 body @ 2.25 bpw + adaLN @ 4.50 bpw): Rescued from 100.0% WER static down to 6.78% WER / 4.68% CER via 164,654 velocity-field PRIMAL flips! |
60-Second Quickstart (Copy & Paste)
Option A β 1-Command CLI (Instant Speech + Zero-Shot Voice Cloning)
pip install torch torchaudio safetensors soundfile huggingface_hub numpy f5-tts
git clone https://huggingface.co/batteryphil/VAULT-PRIMAL-F5-TTS-337M
cd VAULT-PRIMAL-F5-TTS-337M
# 1. Speak immediately using the bundled voice (192.0 MB 4-bit Prime-Harmonic):
python infer.py "Hello! This 337 million parameter diffusion TTS model was compressed 7x down to 192 megabytes!" -o f5_p4.wav
# 2. Clone YOUR OWN voice from any 5-10s audio file (auto-transcribes if --ref-text is omitted!):
python infer.py "Now I am speaking in your cloned voice, locally and privately!" \
--ref-audio path/to/your_5sec_voice.wav \
--ref-text "Exact words spoken in your five second clip." \
-o my_cloned_voice.wav
# 3. Test the extreme 138.9 MB 2-bit DiT diffusion model:
python infer.py "Velocity-field discrete distillation rescued two-bit diffusion from dead static!" --variant q2_0 -o f5_q2.wav
Option B β 4-Line Python API (Auto-Downloads 192 MB or 139 MB Directly From Hugging Face)
import importlib.util
from huggingface_hub import hf_hub_download
spec = importlib.util.spec_from_file_location(
"vault_tts", hf_hub_download("batteryphil/VAULT-PRIMAL-F5-TTS-337M", "vault_tts.py")
)
vault_tts = importlib.util.module_from_spec(spec); spec.loader.exec_module(vault_tts)
tts = vault_tts.load_f5_tts(variant="p4_0") # 192.0 MB (or variant="q2_0" for 138.9 MB!)
tts.speak("Hello! Multi-paragraph zero-shot voice cloning in four lines of Python.", out_path="speech.wav")
Objective Benchmark Results (ConvNeXt V2 + 22-Layer DiT Flow-Matching Diffusion)
Evaluated across 12 held-out spoken prompts (177 words total, 0 overlap with the 18 calibration trajectories, 16-step Sway-Sampling Euler ODE) using openai/whisper-small.en round-trip ASR:
| Variant | Packed Size (vs FP32) |
Eff. bpw |
Whisper WER % $\downarrow$ |
Whisper CER % $\downarrow$ |
Log-Mel Dist (dB) $\downarrow$ |
Discrete PRIMAL Healing |
|---|---|---|---|---|---|---|
Upstream FP32 (F5TTS_v1_Base) |
1,348.39 MB (1.00x) |
32.00 |
3.95% |
3.69% |
0.000 |
Reference (16 NFE Sway-Sampling) |
Uniform Linear Q4_0 PTQ |
191.99 MB (7.02x) |
4.56 |
3.95% |
3.69% |
4.694 |
Uniform 4-bit baseline |
V3_P4_0 + Shadowless PRIMAL |
191.99 MB (7.02x) |
4.56 |
4.52% |
3.69% |
5.333 |
93,733 flips (205s) -> 0.00% CER loss vs 1.35 GB FP32! |
V3_Q2_0 2-Bit DiT Raw PTQ |
138.90 MB (9.71x) |
3.30 |
100.00% (Static) |
87.94% |
16.657 |
Complete ODE collapse before PRIMAL |
V3_Q2_0 + Velocity-Field PRIMAL |
138.90 MB (9.71x) |
3.30 |
6.78% (-93.2%!) |
4.68% |
8.497 |
164,654 flips (4.2 min CFM distill): 100% -> 6.78% WER! |
How WeSolved 2-Bit Diffusion (DiT) Quantization Collapse
- Protecting
adaLN-ZeroModulation Gates: EveryDiTblock uses anadaLN-Zerolinear projection to regress6per-channel shift, scale, and residual-gate vectors from the continuous ODE time embeddingt in [0, 1]. CrushingadaLNto 2 bits corrupts feature variance across all22blocks and16Euler ODE steps. KeepingadaLN+ I/O projections in 4-bitV3_P4_0(4.50 bpw) while compressing all188.7MDiTAttention (Q/K/V/O), Feed-Forward, andConvNeXt V2CNN weights to 2-bitV3_Q2_0(2.25 bpw) packs the1.35 GBmodel into138.90 MB(9.71xcompression). - Trajectory Velocity-Field Shadowless
PRIMAL: Instead of unrolling backpropagation through all16ODE steps (which explodes VRAM and vanishes gradients), we cache108exactFP32teacher(x_t, t, v_cond, v_uncond)snapshots across Sway-Sampled timestepst in [0, 1]and train both the 2-bitV3_Q2_0DiTbody and 4-bitV3_P4_0adaLNcodes/scales directly in integer space (0FP32shadow weights,0.95leakyint8vote decay, Adafactor Gauss-Newton preconditioning) to match the Classifier-Free Guided velocity vector field (ema_loss: 2.128 -> 0.456in251.8s).
Companion VAULT + PRIMAL Releases
batteryphil/VAULT-PRIMAL-Tiny-Voca-4.5Mβ2.64 MB(4-bit) &1.38 MB(2-bit) Micro-Transformer TTS (0.00%WER loss vsFP32!).batteryphil/VAULT-PRIMAL-VITS-29Mβ Pure 1D-CNN WaveNet Flow + HiFi-GAN TTS (16.52 MB4-bitbeatingQ4_0by-10.4%Mel error &8.75 MB2-bitPRIMAL).batteryphil/VAULT-v3-DeepSeek-R1-1.5B-PRIMAL-VLT3β Standalone C99.vlt3Reasoning LLM (680.9 MBV3_Q2_0&1.18 GiBV3_P4_0).- GitHub Source & Reproducible Pipeline:
https://github.com/batteryphil/VAULT-v3-PRIMAL
License
- Upstream Base Weights (
SWivid/F5-TTS):CC-BY-NC-4.0(Emilia dataset non-commercial terms;f5-ttslibrary code isMIT). VAULT + PRIMALCode, Loader & Codec: Free (0%) for individuals & non-commercial use;5%profit share for commercial entities when applied to commercially-licensed base checkpoints (seeLICENSEandNOTICE).
- Downloads last month
- -
Model tree for batteryphil/VAULT-PRIMAL-F5-TTS-337M
Base model
SWivid/F5-TTS