Text-to-Speech
ONNX
Safetensors

CosyVoice2 local inference error: Repo id must use alphanumeric chars (Empty repo_id in yaml)

#6
by Asem75 - opened

Hello community,

I have downloaded the full weights of FunAudioLLM/CosyVoice2-0.5B locally using snapshot_download (around 4.86 GB).

When trying to initialize the model locally in my Python script using:
cosyvoice = CosyVoice('local_models/CosyVoice2-0.5B')

I encounter the following blocking validation error from the huggingface_hub backend:
"ValueError: Repo id must use alphanumeric chars, '-', '_' or '.'. The name cannot start or end with '-' or '.' and the maximum length is 96: ''."

It seems the internal code of CosyVoice is reading empty string fields (repo_id: "" or model_id: "") inside the downloaded cosyvoice2.yaml configuration file, causing the HF hub client to reject it as an invalid empty repo ID, even though I intend to run it 100% offline/locally.

How can I force CosyVoice to skip this remote repo validation and load the downloaded JIT/PT weights directly from the local directory without modifying the original YAML manually?

Thanks for your help!

Asem75 changed discussion status to closed
Asem75 changed discussion status to open

Sign up or log in to comment