CosyVoice3 SFT fine-tune for a Mandarin-speaking talking flower character. Outputs 24 kHz mono WAV. Single speaker (TalkingFlower), Mandarin only.
This bundle is self-contained — no separate CosyVoice repository clone required.
To easily launch the interactive web interface, use the included shell script:
./launch-web-app.sh
The launcher serves the memory-optimized fp16 path by default and uses the bundled *.fp16.pt checkpoints when available.
uv (Recommended)This is the fastest and most reliable way to run the model, leveraging a fully locked and isolated environment.
# `uv run` automatically sets up the environment and installs dependencies from pyproject.toml
uv run inference.py "会讲话的花很奇怪吗?" output.wav
pippip install -r requirements.txt
python inference.py "会讲话的花很奇怪吗?" output.wav
ras_sampling(top_p=0.8, top_k=25), text_frontend=False. Serving entrypoints use fp16 checkpoints, disable unused text-normalization startup, drop the unused Qwen2 CausalLM head, and store Qwen2 text embeddings as per-row int8 with fp16 scales to reduce Jetson peak memory. RTF ≈ 0.5–0.7 on A5000.inference.py includes a remove_tail_click post-processing fade that suppresses this without affecting speech content.spk2info.pt); zero-shot voice cloning is not supported in this slim bundle.SFT-only slim bundle. Three large redundant files are omitted to save ~1.9 GB:
campplus.onnx (27 MB) — speaker encoder, only used for zero-shot prompts.speech_tokenizer_v3.onnx (925 MB) — audio→token, only used for prompt audio / training.CosyVoice-BlankEN/model.safetensors (988 MB) — base Qwen2 weights, overwritten by llm.pt immediately on load.inference.py monkey-patches the load paths so these absences are silently handled. To restore zero-shot / cross-lingual / training capability, see the two comment blocks in inference.py.
No internet access needed at inference (text_frontend=False).
The memory-optimized serving path can be adjusted with environment variables:
COSYVOICE_DISABLE_TEXT_FRONTEND=0 restores text-normalization frontend initialization.COSYVOICE_LLM_EMBED_INT8=0 disables Qwen2 text-embedding int8 storage.COSYVOICE_SHOW_INVALID_HTTP_WARNINGS=1 shows Uvicorn warnings from invalid/non-HTTP probes on the Gradio port.Built on CosyVoice by FunAudioLLM (Apache 2.0) and Matcha-TTS by Mehta et al. (MIT). The cosyvoice/ package and third_party/Matcha-TTS/ library are bundled from their respective repositories; cosyvoice/ includes serving-memory optimizations for this Hugging Face bundle.
The Web UI visual treatment, including the talking flower character art, background image, speech-bubble character area, and playful outlined card/button styling, is adapted from the original AI_TalkingFlower Hugging Face Space.
llm.pt 2.0 GBflow.pt 1.3 GBllm.fp16.pt 1.3 GBflow.fp16.pt 665 MBhift.pt 83 MBhift.fp16.pt 42 MBspk2info.pt 2 kB有文件?提交种子。
提交种子