Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 1.18 KB

CONVERT.md

File metadata and controls

42 lines (35 loc) · 1.18 KB

Model Conversion to GGUF

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.txt

Minimal usage:

python convert_model_to_gguf.py \
  --yaml_config /path/to/cosyvoice.yaml \
  --ftype f16 \
  --gguf_model /path/to/CosyVoice3-2512_F16.gguf

Full 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:

  1. Verify the generated .gguf file.
  2. (Optional) Quantize it with this repository's quantize tool — see TOOLS.md.