Loading CNHuBERT weights from GPT_SoVITS/pretrained_models/chinese-hubert-base
Traceback (most recent call last):
File "/voiceClone/GPT-SoVITS-v2-240821/api_v2.py", line 144, in <module>
tts_pipeline = TTS(tts_config)
File "/voiceClone/GPT-SoVITS-v2-240821/GPT_SoVITS/TTS_infer_pack/TTS.py", line 243, in __init__
self._init_models()
File "/voiceClone/GPT-SoVITS-v2-240821/GPT_SoVITS/TTS_infer_pack/TTS.py", line 271, in _init_models
self.init_cnhuhbert_weights(self.configs.cnhuhbert_base_path)
File "/voiceClone/GPT-SoVITS-v2-240821/GPT_SoVITS/TTS_infer_pack/TTS.py", line 278, in init_cnhuhbert_weights
self.cnhuhbert_model = CNHubert(base_path)
TypeError: CNHubert.__init__() takes 1 positional argument but 2 were given
我在尝试运行GPT-SoVITS-v2-240821版本整合包中的api_v2.py,然而出现了下面的错误:
错误信息:
以下是我的系统信息:
CentOS Linux release 7.9.2009 (Core)
在报错之前我做的操作:
1.解压完整合包之后把8月07旧版本整合包训练的GPT_weights_v2与SoVITS_weights_v2权重复制了过来 2.修改了./config.py中的前两个权重路径: sovits_path = "/voiceClone/GPT-SoVITS-v2-240821/SoVITS_weights_v2/test1_e8_s104.pth" gpt_path = "/voiceClone/GPT-SoVITS-v2-240821/GPT_weights_v2/test1-e15.ckpt"
运行python api_v2.py,并在加载过程中报错
我去检查了./GPT_SoVITS/feature_extractor/cnhubert.py中的CNHubert类定义,但没有看出来什么问题。我不确定这个是不是因为整合包与系统的兼容性问题,但我能确定的是旧版本的GPT-SoVITS-v2-240807整合包的api与webui都能正常运行。