[2noise/ChatTTS]ChatTTs 需要的环境我基本都弄好了,但是运行起来还是报错,有大神能帮我解惑吗?

2024-06-05 551 views
5

下面是一部分报错信息: INFO:ChatTTS.core:Download from HF: https://huggingface.co/2Noise/ChatTTS

LocalEntryNotFoundError Traceback (most recent call last) Cell In[8], line 2 1 chat = ChatTTS.Chat() ----> 2 chat.load_models()

File ~\PycharmProjects\ChatTTS\ChatTTS\core.py:52, in Chat.load_models(self, source, force_redownload, local_path) 50 if download_path is None or force_redownload: 51 self.logger.log(logging.INFO, f'Download from HF: https://huggingface.co/2Noise/ChatTTS') ---> 52 download_path = snapshot_download(repo_id="2Noise/ChatTTS", allow_patterns=[".pt", ".yaml"]) 53 else: 54 self.logger.log(logging.INFO, f'Load from cache: {download_path}')

https://huggingface.co/2Noise/ChatTTS (是不是这里的问题呀?)

回答

8

好像是连不上huggingface导致模型没有下载完成

试下国内的模型存储库,不过在此之前需要安装相应的库pip install modelscope

然后改为加载本地模型

#模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('mirror013/ChatTTS')

# 加载模型
chat = ChatTTS.Chat()
chat.load_models(
    source="local",
    local_path=model_dir,
)
7

好的,谢谢您

9

好像是连不上huggingface导致模型没有下载完成

试下国内的模型存储库,不过在此之前需要安装相应的库pip install modelscope

然后改为加载本地模型

#模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('mirror013/ChatTTS')

# 加载模型
chat = ChatTTS.Chat()
chat.load_models(
    source="local",
    local_path=model_dir,
)

造福人类啊,大佬~~