FunAudioLLM / CosyVoice

Multi-lingual large voice generation model, providing inference, training and deployment full-stack ability.
https://funaudiollm.github.io/
Apache License 2.0
4.78k stars 485 forks source link

onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /Users/jiangjinlong/Documents/Tools/CosyVoice/pretrained_models/CosyVoice-300M-SFT/speech_tokenizer_v1.onnx failed:Protobuf parsing failed. #225

Closed a386572631 closed 1 month ago

a386572631 commented 1 month ago

onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /Users/jiangjinlong/Documents/Tools/CosyVoice/pretrained_models/CosyVoice-300M-SFT/speech_tokenizer_v1.onnx failed:Protobuf parsing failed.

protobuf版本4.25与requirement一致 % pip show protobuf Name: protobuf Version: 4.25.0 Summary: Home-page: https://developers.google.com/protocol-buffers/ Author: protobuf@googlegroups.com Author-email: protobuf@googlegroups.com License: 3-Clause BSD License Location: /opt/homebrew/anaconda3/envs/cosyvoice/lib/python3.9/site-packages Requires: Required-by: grpcio-tools, onnxruntime, tensorboard

aluminumbox commented 1 month ago

check faq.md, install git-lfs

Lu7-H commented 1 month ago

check faq.md, install git-lfs

I meet this problem too.FAQ.md doesn't mentioned this problem,I don't know how to sovle it.And i have installed git-lfs.Can describe the method to solve this problem detailed?The Error information is 'onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from pretrained_models/CosyVoice-300M/campplus.onnx failed:Protobuf parsing failed.'

scalar27 commented 1 month ago

I get the same error.

Lu7-H commented 1 month ago

I get the same error.

check your model and make it in correct size xxxM not xxxkb.

wp558 commented 1 month ago

I also got the same error. Maybe it occurred when there was something wrong with the model file .onnx. So I re-downloaded the models and it worked.

wl33thompson commented 4 weeks ago

i fellow the exact instruction from the guideline in my MAC book and got the following same error. can you help?

Traceback (most recent call last): File "webui.py", line 190, in cosyvoice = CosyVoice(args.model_dir) File "/Users/weishuolin/Documents/CosyVoice/cosyvoice/cli/cosyvoice.py", line 30, in init self.frontend = CosyVoiceFrontEnd(configs['get_tokenizer'], File "/Users/weishuolin/Documents/CosyVoice/cosyvoice/cli/frontend.py", line 52, in init self.campplus_session = onnxruntime.InferenceSession(campplus_model, sess_options=option, providers=["CPUExecutionProvider"]) File "/opt/anaconda3/envs/cosyvoice2/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "/opt/anaconda3/envs/cosyvoice2/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 460, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from pretrained_models/CosyVoice-300M/campplus.onnx failed:Protobuf parsing failed.