Use this repository's conversion script (convert_model_to_gguf.py) to convert upstream CosyVoice model weights to GGUF for cosyvoice.cpp.
Install Python dependencies first:
pip install -r requirements.txtMinimal usage:
python convert_model_to_gguf.py \
--yaml_config /path/to/cosyvoice.yaml \
--ftype f16 \
--gguf_model /path/to/CosyVoice3-2512_F16.ggufFull example:
python convert_model_to_gguf.py \
--yaml_config /path/to/cosyvoice.yaml \
--llm_model /path/to/llm.pt \
--blank_llm /path/to/CosyVoice-BlankEN \
--flow_model /path/to/flow.pt \
--hift_model /path/to/hift.pt \
--gguf_model /path/to/CosyVoice3-2512_Q8_0.gguf \
--ftype q8_0 \
--tag 2512--ftype options:
default,f32,f16,q8_0,q5_0,q5_1,q4_0,q4_1
Default path behavior (when not explicitly provided):
--llm_model-><yaml_dir>/llm.pt--blank_llm-><yaml_dir>/CosyVoice-BlankEN--flow_model-><yaml_dir>/flow.pt--hift_model-><yaml_dir>/hift.pt
After conversion:
- Verify the generated
.gguffile. - (Optional) Quantize it with this repository's
quantizetool — see TOOLS.md.