Downloads · 30 days
58
9% of all-time downloads
spensercai/CosyVoice3-0.5B-Candle
CosyVoice3-0.5B-Candle is a text-to-speech model from spensercai. Use it when you need text read aloud. It is set up for candle. The card lists the license as apache-2.0.
This is a Candle-compatible version of FunAudioLLM/CosyVoice3-0.5B, converted to safetensors format for use with the Candle framework in Rust.
Downloads · 30 days
58
9% of all-time downloads
All-time downloads
633
Public
Repo size
5 GB
Likes
1
Public
Click a slice to open those files.
.safetensors4 GB · 80%
From the Hugging Face model README
This is a Candle-compatible version of FunAudioLLM/CosyVoice3-0.5B, converted to safetensors format for use with the Candle framework in Rust.
CosyVoice3 is a state-of-the-art text-to-speech (TTS) model developed by FunAudioLLM. It features:
The model consists of three main components:
| Component | Description | Parameters |
|---|---|---|
| LLM | Qwen2-based language model (0.5B) | 642M |
| Flow Decoder | DiT + Conditional Flow Matching | 332M |
| HiFT Vocoder | Neural Source Filter + iSTFT | 21M |
CosyVoice3-0.5B-Candle/
├── llm.safetensors # LLM weights (2.4 GB)
├── flow.safetensors # Flow decoder weights (1.3 GB)
├── hift.safetensors # Vocoder weights (79 MB)
├── campplus.onnx # Speaker encoder (27 MB)
├── speech_tokenizer_v3.onnx # Speech tokenizer (925 MB)
├── config.json # Model configuration
└── tokenizer/ # Qwen2 tokenizer files
├── config.json
├── generation_config.json
├── tokenizer_config.json
├── vocab.json
└── merges.txt
use candle::{Device, DType};
use candle_nn::VarBuilder;
// Load model weights
let device = Device::cuda_if_available(0)?;
let dtype = DType::F32;
let llm_weights = unsafe {
VarBuilder::from_mmaped_safetensors(&["llm.safetensors"], dtype, &device)?
};
let flow_weights = unsafe {
VarBuilder::from_mmaped_safetensors(&["flow.safetensors"], dtype, &device)?
};
let hift_weights = unsafe {
VarBuilder::from_mmaped_safetensors(&["hift.safetensors"], dtype, &device)?
};
// Initialize model components
// (See candle-transformers/src/models/cosyvoice for full implementation)
This model was converted from the original PyTorch weights using the following process:
g * v / ||v||) + conversionThe conversion script is available at: candle-examples/examples/cosyvoice3/convert_weights.py
| Parameter | Value |
|---|---|
| Sample Rate | 24,000 Hz |
| Token Frame Rate | 25 fps |
| Mel Channels | 80 |
| DiT Depth | 22 layers |
| DiT Dimension | 1024 |
| DiT Heads | 16 |
| Upsample Rates | [8, 5, 3] (120x total) |
| iSTFT n_fft | 16 |
@article{cosyvoice,
title={CosyVoice: A Scalable Multilingual Zero-shot Text-to-speech Synthesizer},
author={FunAudioLLM Team},
year={2024}
}
This model is released under the Apache 2.0 License, following the original CosyVoice3 model.