GPT-SoVITS icon indicating copy to clipboard operation
GPT-SoVITS copied to clipboard

在运行一键三联后出错,mac m1

Open ZilongYang opened this issue 5 months ago • 10 comments

"/Users/zilong/anaconda3/envs/GPTSoVits/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py
Traceback (most recent call last):
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/hub.py", line 385, in cached_file
Traceback (most recent call last):
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/hub.py", line 385, in cached_file
    resolved_file = hf_hub_download(
    resolved_file = hf_hub_download(
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
    validate_repo_id(arg_value)
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
    validate_repo_id(arg_value)
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
    raise HFValidationError(
    raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large'. Use `repo_type` argument if needed.

The above exception was the direct cause of the following exception:

huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large'. Use `repo_type` argument if needed.
Traceback (most recent call last):

The above exception was the direct cause of the following exception:

  File "/Users/zilong/zWork/py/GPT-SoVITS/GPT_SoVITS/prepare_datasets/1-get-text.py", line 56, in <module>
Traceback (most recent call last):
  File "/Users/zilong/zWork/py/GPT-SoVITS/GPT_SoVITS/prepare_datasets/1-get-text.py", line 56, in <module>
    tokenizer = AutoTokenizer.from_pretrained(bert_pretrained_dir)
    tokenizer = AutoTokenizer.from_pretrained(bert_pretrained_dir)
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 758, in from_pretrained
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 758, in from_pretrained
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 590, in get_tokenizer_config
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 590, in get_tokenizer_config
    resolved_config_file = cached_file(
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/hub.py", line 450, in cached_file
    resolved_config_file = cached_file(
  File "/Users/zilong/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/hub.py", line 450, in cached_file
    raise EnvironmentError(
    raise EnvironmentError(
OSError: Incorrect path_or_model_id: 'GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large'. Please provide either the path to a local folder or the repo_id of a model on the Hub.
OSError: Incorrect path_or_model_id: 'GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large'. Please provide either the path to a local folder or the repo_id of a model on the Hub.
Traceback (most recent call last):
  File "/Users/zilong/zWork/py/GPT-SoVITS/webui.py", line 531, in open1abc
    with open(txt_path, "r",encoding="utf8") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'logs/zl/2-name2text-0.txt'

ZilongYang avatar Jan 29 '24 04:01 ZilongYang

我也是这个问题,请问找到解决方法了吗? CleanShot 2024-01-29 at 17 47 16@2x

Stanley-baby avatar Jan 29 '24 09:01 Stanley-baby

我也是这个问题,请问找到解决方法了吗? CleanShot 2024-01-29 at 17 47 16@2x

see #256

danielwii avatar Jan 29 '24 09:01 danielwii

@ZilongYang 应该是 pretrained_models 目录放错了,如果你 clone 到了 GPT-SoVITS,里面还有个 GPT-SoVITS 目录,pretrained_models 应该放在里面那个 GPT-SoVITS。

danielwii avatar Jan 29 '24 09:01 danielwii

意思就是在GPT-SoVITS文件夹中新建一个temp.py文件,temp.py文件里填入

import nltk
nltk.download('cmudict')

然后进入Python虚拟环境运行temp.py文件就可以了对吗?

Stanley-baby avatar Jan 29 '24 10:01 Stanley-baby

@ZilongYang 应该是 pretrained_models 目录放错了,如果你 clone 到了 GPT-SoVITS,里面还有个 GPT-SoVITS 目录,pretrained_models 应该放在里面那个 GPT-SoVITS。

模型放对了也是同样的报错: CleanShot 2024-01-29 at 19 40 26@2x

Stanley-baby avatar Jan 29 '24 11:01 Stanley-baby

搞了一下午 第一国内包有限制 需要自己下 需要的qq邮箱:[email protected] 解压完要放到用户目录下 第二 里面要放模型才能运行

xldbilibili avatar Jan 29 '24 12:01 xldbilibili

确保预训练模型全部正确下载并切放到对应的位置,类似这样: Screenshot 2024-01-29 at 21 37 31

还不行的话试试克隆最新代码,之前有一次代码是出问题的

Lion-Wu avatar Jan 29 '24 13:01 Lion-Wu

@Lion-Wu 我觉得模型好像很正确啊 而且代码是今天克隆的 CleanShot 2024-01-29 at 21 53 47@2x

Stanley-baby avatar Jan 29 '24 13:01 Stanley-baby

里面的文件不太一样吧,确保pretrained_models文件夹已经包含了这个链接中的所有模型文件,文件名也要一样。或者用我那个网盘的文件里面的模型文件拖进去。

Lion-Wu avatar Jan 29 '24 14:01 Lion-Wu

@ZilongYang 应该是 pretrained_models 目录放错了,如果你 clone 到了 GPT-SoVITS,里面还有个 GPT-SoVITS 目录,pretrained_models 应该放在里面那个 GPT-SoVITS。

确保预训练模型全部正确下载并切放到对应的位置,类似这样: Screenshot 2024-01-29 at 21 37 31

还不行的话试试克隆最新代码,之前有一次代码是出问题的

里面的文件不太一样吧,确保pretrained_models文件夹已经包含了这个链接中的所有模型文件,文件名也要一样。或者用我那个网盘的文件里面的模型文件拖进去。

clone 了链接里的仓库里的文件,并放到了对应的位置,一键三连成功!

ZilongYang avatar Jan 29 '24 15:01 ZilongYang

我clone了最新版,果然是模型放错位置了,感谢大佬 @ZilongYang

zhangxirui-1997 avatar Feb 01 '24 06:02 zhangxirui-1997