RVC-Boss / GPT-SoVITS

1 min voice data can also be used to train a good TTS model! (few shot voice cloning)
MIT License
32.79k stars 3.78k forks source link

一键三连中途报错 #333

Closed PangXitong closed 4 weeks ago

PangXitong commented 7 months ago

已经做好了切割、标注,点击一键三连时报错,显示没有'logs/xxx/2-name2text-0.txt',但是整个logs文件夹都是他自己生成的啊,我手动创建一个文件,在运行的时候就自己删除了,运行一键三连的终端输出如下:

"/Users/mac/anaconda3/envs/GPTSoVits/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py "/Users/mac/anaconda3/envs/GPTSoVits/bin/python" GPT_SoVITS/prepare_datasets/1-get-text.py Traceback (most recent call last): Traceback (most recent call last): File "/Users/mac/Desktop/GPT-SoVITS/GPT_SoVITS/prepare_datasets/1-get-text.py", line 56, in File "/Users/mac/Desktop/GPT-SoVITS/GPT_SoVITS/prepare_datasets/1-get-text.py", line 56, in tokenizer = AutoTokenizer.from_pretrained(bert_pretrained_dir) tokenizer = AutoTokenizer.from_pretrained(bert_pretrained_dir) File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 773, in from_pretrained File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 773, in from_pretrained config = AutoConfig.from_pretrained( File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/configuration_auto.py", line 1100, in from_pretrained config = AutoConfig.from_pretrained( File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/configuration_auto.py", line 1100, in from_pretrained config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, kwargs) File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/configuration_utils.py", line 634, in get_config_dict config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, kwargs) File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/configuration_utils.py", line 634, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, kwargs) File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/configuration_utils.py", line 689, in _get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, kwargs) File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/configuration_utils.py", line 689, in _get_config_dict resolved_config_file = cached_file( File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/hub.py", line 356, in cached_file resolved_config_file = cached_file( File "/Users/mac/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/hub.py", line 356, in cached_file raise EnvironmentError( raise EnvironmentError( OSError: GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large does not appear to have a file named config.json. Checkout 'https://huggingface.co/GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/None' for available files. OSError: GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large does not appear to have a file named config.json. Checkout 'https://huggingface.co/GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/None' for available files. Traceback (most recent call last): File "/Users/mac/Desktop/GPT-SoVITS/webui.py", line 548, in open1abc with open(txt_path, "r",encoding="utf8") as f: FileNotFoundError: [Errno 2] No such file or directory: 'logs/xxx/2-name2text-0.txt'

截屏2024-02-01 09 59 26

感谢教导

450586509 commented 7 months ago

"OSError: GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large does not appear to have a file named config.json."

检查一下为什么这个目录:GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large 没有config.json

Lion-Wu commented 7 months ago

模型下载的问题,检查一下下载的模型文件名称是否与huggingface上显示的是否相同

asdfghkl12345 commented 7 months ago

Traceback (most recent call last): File "D:\GPT-SoVITS-main\GPT-SoVITS-main\GPT_SoVITS\prepare_datasets\1-get-text.py", line 11, in Traceback (most recent call last): File "D:\GPT-SoVITS-main\GPT-SoVITS-main\GPT_SoVITS\prepare_datasets\1-get-text.py", line 11, in os.environ["CUDA_VISIBLE_DEVICES"] = os.environ.get("_CUDA_VISIBLE_DEVICES") //就是这儿 返回的是None,他就没法get File "C:\Users\wangsishun\AppData\Local\Programs\Python\Python310\lib\os.py", line 684, in setitem os.environ["CUDA_VISIBLE_DEVICES"] = os.environ.get("_CUDA_VISIBLE_DEVICES") File "C:\Users\wangsishun\AppData\Local\Programs\Python\Python310\lib\os.py", line 684, in setitem value = self.encodevalue(value) File "C:\Users\wangsishun\AppData\Local\Programs\Python\Python310\lib\os.py", line 742, in check_str value = self.encodevalue(value) File "C:\Users\wangsishun\AppData\Local\Programs\Python\Python310\lib\os.py", line 742, in check_str raise TypeError("str expected, not %s" % type(value).name) TypeError: str expected, not NoneType raise TypeError("str expected, not %s" % type(value).name) TypeError: str expected, not NoneType Traceback (most recent call last): File "D:\GPT-SoVITS-main\GPT-SoVITS-main\webui.py", line 539, in open1abc with open(txt_path, "r",encoding="utf8") as f: FileNotFoundError: [Errno 2] No such file or directory: 'logs/wangsishun/2-name2text-0.txt' 我没有GPU,他返回来的就是None,报错了。有大佬看看怎么解决

PangXitong commented 7 months ago

问题解决了,感谢各位

zjsxr1979 commented 7 months ago

问题解决了,感谢各位

大佬,怎么解决的?一样的问题

AoungY commented 7 months ago

将\GPT-SoVITS-beta\GPT_SoVITS\prepare_datasets目录下的三个.py文件的 os.environ["CUDA_VISIBLE_DEVICES"]= os.environ.get("_CUDA_VISIBLE_DEVICES") 全部换成: os.environ["CUDA_VISIBLE_DEVICES"] = "0" 出自yoko-penta的解决方案:https://github.com/RVC-Boss/GPT-SoVITS/issues/270

HyH-QAQ commented 7 months ago

改了之后一键三连还是报错啊

AoungY commented 7 months ago

用cpu训练:https://github.com/RVC-Boss/GPT-SoVITS/issues/290#issuecomment-1916306780

GitHubJiKe commented 6 months ago

问题解决了,感谢各位

怎么解决的?分享一下,感谢。

thwy1991 commented 6 months ago

下载的模型里边的配置文件的名称变动了

bigmarten commented 6 months ago

这个问题有人解决了吗,修改os.environ无效。

bigmarten commented 6 months ago

已解决。linux上出现此问题,找到windows懒人包,把里面的nltk_data拷贝到环境的搜索路径下,例如: cp /home/saizong/GPT_SoVITS/runtime/nltk_data/ /home/saizong/.conda/envs/GPT-SoVITS/nltk_data

tingfengaiai commented 6 months ago

一键三连报错,求大神指导。::

"D:\GPT-SoVITS-beta\GPT-SoVITS\runtime\python.exe" GPT_SoVITS/prepare_datasets/1-get-text.py "D:\GPT-SoVITS-beta\GPT-SoVITS\runtime\python.exe" GPT_SoVITS/prepare_datasets/1-get-text.py Traceback (most recent call last): File "D:\GPT-SoVITS-beta\GPT-SoVITS\GPT_SoVITS\prepare_datasets\1-get-text.py", line 96, in with open(inp_text, "r", encoding="utf8") as f: OSError: [Errno 22] Invalid argument: '"D:\GPT-SoVITS-beta\GPT-SoVITS\output\asr_opt\dong.list"' Traceback (most recent call last): File "D:\GPT-SoVITS-beta\GPT-SoVITS\GPT_SoVITS\prepare_datasets\1-get-text.py", line 96, in with open(inp_text, "r", encoding="utf8") as f: OSError: [Errno 22] Invalid argument: '"D:\GPT-SoVITS-beta\GPT-SoVITS\output\asr_opt\dong.list"' Traceback (most recent call last): File "D:\GPT-SoVITS-beta\GPT-SoVITS\webui.py", line 498, in open1abc with open(txt_path, "r",encoding="utf8") as f: FileNotFoundError: [Errno 2] No such file or directory: 'logs/me/2-name2text-0.txt' ERROR: The process "6772" not found. ERROR: The process "29992" not found.

hhh315xxx commented 5 months ago

我是重新下载了chinese-roberta-wwm-ext-large模型换上去得以解决,应该是之前模型安装有文件缺失。比如config,和pytorch_model这个文件不对,所以老是报错,可以在huggingface或者镜像[https://hf-mirror.com/hfl/chinese-roberta-wwm-ext-large/tree/main下载正解的模型。而且重试时候,要把对应logs文件夹里原来生成的删除掉,重新生成最好,不删除也会报错。]