[2noise/ChatTTS]Load model error加载模型未初始化问题

2024-06-05 720 views
0

An error about loading model. When I run chat.load_models(), return the info as:

INFO:ChatTTS.core:use cuda:0
WARNING:ChatTTS.core:vocos not initialized.
WARNING:ChatTTS.core:gpt not initialized.
WARNING:ChatTTS.core:tokenizer not initialized.
WARNING:ChatTTS.core:dvae not initialized.

回答

9

问题已解决,引起不能初始化各模型的原因是,用pip install ChatTTS的版本和这里的版本不同,不需要pip install,直接在本工程文件文件夹中运行infer.ipynb

另外可以从huggingface的镜像网站下载模型文件,从本机加载模型文件要修改一点代码:

chat = ChatTTS.Chat()
chat.load_models(source = 'local', local_path='/The Path of Model')
0

load models doesn't even accept source and local path as parameter

1

This is not working for me

4

已解决。不要pip install,直接从GitHub clone即可。 Do not use pip install, use clone instead.

4

Traceback (most recent call last): File "/Users/a0000/mywork/commonLLM/opensource/nnnew/chatTTSbbb/ChatTTS/xchatx.py", line 16, in chat.load_models(model_dir) File "/Users/a0000/mywork/commonLLM/opensource/nnnew/chatTTSbbb/ChatTTS/ChatTTS/core.py", line 61, in load_models self._load({k: os.path.join(download_path, v) for k, v in OmegaConf.load(os.path.join(download_path, 'config', 'path.yaml')).items()}, kwargs) ^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'download_path' where it is not associated with a value

4

Traceback (most recent call last): File "/Users/a0000/mywork/commonLLM/opensource/nnnew/chatTTSbbb/ChatTTS/xchatx.py", line 16, in chat.load_models(model_dir) File "/Users/a0000/mywork/commonLLM/opensource/nnnew/chatTTSbbb/ChatTTS/ChatTTS/core.py", line 61, in load_models self._load({k: os.path.join(download_path, v) for k, v in OmegaConf.load(os.path.join(download_path, 'config', 'path.yaml')).items()}, kwargs) ^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'download_path' where it is not associated with a value

试试看把这句话: chat.load_models(source='locals', local_path='YOUR LOCAL PATH') 中的locals改成local

作者快改改这个大坑......

2

Not working for me. load_models does not accept parameter 'source' and 'local_path'

6

问题已解决,引起不能初始化各模型的原因是,用pip install ChatTTS的版本和这里的版本不同,不需要pip install,直接在本工程文件文件夹中运行infer.ipynb

另外可以从huggingface的镜像网站下载模型文件,从本机加载模型文件要修改一点代码:

chat = ChatTTS.Chat()
chat.load_models(source = 'local', local_path='/The Path of Model')

这个问题解决了,其他问题还是一大堆