在读取模型的时候报错:
- ERROR:vits-simple-api:Uncaught exception
- Traceback (most recent call last):
- File "/Users/dyz/Developer/playground/vits-simple-api/app.py", line 28, in <module>
- tts = load_model(app.config["MODEL_LIST"])
- File "/Users/dyz/Developer/playground/vits-simple-api/utils/load_model.py", line 172, in load_model
- bert_vits2_objs, bert_vits2_speakers = merge_models(categorized_models["bert_vits2"], Bert_VITS2, "bert_vits2")
- File "/Users/dyz/Developer/playground/vits-simple-api/utils/load_model.py", line 119, in merge_models
- obj = model_cl***(**obj_args)
- File "/Users/dyz/Developer/playground/vits-simple-api/bert_vits2/bert_vits2.py", line 46, in __init__
- self.load_model(model)
- File "/Users/dyz/Developer/playground/vits-simple-api/bert_vits2/bert_vits2.py", line 49, in load_model
- bert_vits2_utils.load_checkpoint(model, self.net_g, None, skip_optimizer=True, legacy_version=self.version)
- File "/Users/dyz/Developer/playground/vits-simple-api/bert_vits2/utils.py", line 14, in load_checkpoint
- checkpoint_dict = torch.load(checkpoint_path, map_location='cpu')
- File "/opt/homebrew/Caskroom/miniconda/base/envs/vits/lib/python3.10/site-packages/torch/serialization.py", line 1028, in load
- return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
- File "/opt/homebrew/Caskroom/miniconda/base/envs/vits/lib/python3.10/site-packages/torch/serialization.py", line 1246, in _legacy_load
- magic_number = pickle_module.load(f, **pickle_load_args)
- _pickle.UnpicklingError: pickle data was truncated
复制代码 |