RVC-Boss / GPT-SoVITS

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

训练SoVITS时发生除零报错,4-cnhubert和5-wav32k无内容,6-name2semantic.tsv只有一行 #642

Closed ThreeManager785 closed 8 months ago

ThreeManager785 commented 8 months ago

不知道为什么4 5的文件夹都是空的,6的文件只有1行。 以下是SoVITS训练的报错

"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/s2_train.py --config "/Users/tom/Playgrounds/GPT-SoVITS-main/TEMP/tmp_s2.json"
INFO:Tartaglia:{'train': {'log_interval': 100, 'eval_interval': 500, 'seed': 1234, 'epochs': 8, 'learning_rate': 0.0001, 'betas': [0.8, 0.99], 'eps': 1e-09, 'batch_size': 4, 'fp16_run': False, 'lr_decay': 0.999875, 'segment_size': 20480, 'init_lr_ratio': 1, 'warmup_epochs': 0, 'c_mel': 45, 'c_kl': 1.0, 'text_low_lr_rate': 0.4, 'pretrained_s2G': 'GPT_SoVITS/pretrained_models/s2G488k.pth', 'pretrained_s2D': 'GPT_SoVITS/pretrained_models/s2D488k.pth', 'if_save_latest': True, 'if_save_every_weights': True, 'save_every_epoch': 4, 'gpu_numbers': '0'}, 'data': {'max_wav_value': 32768.0, 'sampling_rate': 32000, 'filter_length': 2048, 'hop_length': 640, 'win_length': 2048, 'n_mel_channels': 128, 'mel_fmin': 0.0, 'mel_fmax': None, 'add_blank': True, 'n_speakers': 300, 'cleaned_text': True, 'exp_dir': 'logs/Tartaglia'}, 'model': {'inter_channels': 192, 'hidden_channels': 192, 'filter_channels': 768, 'n_heads': 2, 'n_layers': 6, 'kernel_size': 3, 'p_dropout': 0.1, 'resblock': '1', 'resblock_kernel_sizes': [3, 7, 11], 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'upsample_rates': [10, 8, 2, 2, 2], 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16, 8, 2, 2], 'n_layers_q': 3, 'use_spectral_norm': False, 'gin_channels': 512, 'semantic_frame_rate': '25hz', 'freeze_quantizer': True}, 's2_ckpt_dir': 'logs/Tartaglia', 'content_module': 'cnhubert', 'save_weight_dir': 'SoVITS_weights', 'name': 'Tartaglia', 'pretrain': None, 'resume_step': None}
Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/s2_train.py", line 600, in <module>
    main()
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/s2_train.py", line 56, in main
    mp.spawn(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 241, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method="spawn")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 197, in start_processes
    while not context.join():
              ^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 158, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException: 

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 68, in _wrap
    fn(i, *args)
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/s2_train.py", line 85, in run
    train_dataset = TextAudioSpeakerLoader(hps.data)  ########
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/module/data_utils.py", line 55, in __init__
    for _ in range(max(2, int(min_num / leng))):
                              ~~~~~~~~^~~~~~
ZeroDivisionError: division by zero
ThreeManager785 commented 8 months ago
Screenshot 2024-03-01 at 11 24 57 PM Screenshot 2024-03-01 at 11 25 02 PM Screenshot 2024-03-01 at 11 25 07 PM
ThreeManager785 commented 8 months ago

1Aabc时的全输出

"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
[nltk_data]     failed: unable to get local issuer certificate
[nltk_data]     (_ssl.c:1006)>
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
[nltk_data]     failed: unable to get local issuer certificate
[nltk_data]     (_ssl.c:1006)>
Building prefix dict from the default dictionary ...
Loading model from cache /var/folders/6g/frh7hjdj34jf0wj_62js6pw40000gn/T/jieba.cache
Building prefix dict from the default dictionary ...
Loading model from cache /var/folders/6g/frh7hjdj34jf0wj_62js6pw40000gn/T/jieba.cache
Loading model cost 0.327 seconds.
Prefix dict has been built succesfully.
Loading model cost 0.326 seconds.
Prefix dict has been built succesfully.
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py
Some weights of the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base were not used when initializing HubertModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']
- This IS expected if you are initializing HubertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing HubertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of HubertModel were not initialized from the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Some weights of the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base were not used when initializing HubertModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']
- This IS expected if you are initializing HubertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing HubertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of HubertModel were not initialized from the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py", line 56, in <module>
    model = model.to(device)
            ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1152, in to
Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py", line 56, in <module>
    model = model.to(device)
            ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1152, in to
    return self._apply(convert)
    return self._apply(convert)
           ^^^^^^^^^^^^^^^^^^^^
           ^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 802, in _apply
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 802, in _apply
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 825, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 825, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1150, in convert
    param_applied = fn(param)
                    ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1150, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/cuda/__init__.py", line 293, in _lazy_init
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
    raise AssertionError("Torch not compiled with CUDA enabled")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/cuda/__init__.py", line 293, in _lazy_init
AssertionError: Torch not compiled with CUDA enabled
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/3-get-semantic.py
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/3-get-semantic.py
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
<All keys matched successfully>
<All keys matched successfully>
XXXXRT666 commented 8 months ago

是否安装pytorch nightly preview? pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

ThreeManager785 commented 8 months ago

是否安装pytorch nightly preview? pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

将torch torchvision torchaudio都卸载后重新安装了也不行

ThreeManager785 commented 8 months ago
Running on local URL:  http://0.0.0.0:9874
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
[nltk_data]     failed: unable to get local issuer certificate
[nltk_data]     (_ssl.c:1006)>
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
[nltk_data]     failed: unable to get local issuer certificate
[nltk_data]     (_ssl.c:1006)>
Building prefix dict from the default dictionary ...
Building prefix dict from the default dictionary ...
Loading model from cache /var/folders/6g/frh7hjdj34jf0wj_62js6pw40000gn/T/jieba.cache
Loading model from cache /var/folders/6g/frh7hjdj34jf0wj_62js6pw40000gn/T/jieba.cache
Loading model cost 0.336 seconds.
Prefix dict has been built succesfully.
Loading model cost 0.337 seconds.
Prefix dict has been built succesfully.
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py
Some weights of the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base were not used when initializing HubertModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']
- This IS expected if you are initializing HubertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing HubertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base were not used when initializing HubertModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']
- This IS expected if you are initializing HubertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing HubertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of HubertModel were not initialized from the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Some weights of HubertModel were not initialized from the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Traceback (most recent call last):
Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py", line 56, in <module>
  File "/Users/tom/Playgrounds/GPT-SoVITS-main/GPT_SoVITS/prepare_datasets/2-get-hubert-wav32k.py", line 56, in <module>
    model = model.to(device)
    model = model.to(device)
            ^^^^^^^^^^^^^^^^
            ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1168, in to
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1168, in to
    return self._apply(convert)
    return self._apply(convert)
           ^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 778, in _apply
           ^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 778, in _apply
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 778, in _apply
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 778, in _apply
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 778, in _apply
    module._apply(fn)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 778, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 803, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 803, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
    param_applied = fn(param)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1154, in convert
                    ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1154, in convert
    return t.to(
           ^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/cuda/__init__.py", line 284, in _lazy_init
    return t.to(
           ^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/cuda/__init__.py", line 284, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
AssertionError: Torch not compiled with CUDA enabled
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/3-get-semantic.py
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" GPT_SoVITS/prepare_datasets/3-get-semantic.py
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
<All keys matched successfully>
<All keys matched successfull
ThreeManager785 commented 8 months ago

M1 16GB

Lion-Wu commented 8 months ago

你把环境全部删除,重新按照readme中Mac的部分安装一下试试

XXXXRT666 commented 8 months ago

运行这个看下结果 import torch torch.backends.mps.is_available()

ThreeManager785 commented 8 months ago

运行这个看下结果 import torch torch.backends.mps.is_available()

tom@785s-iMac gpt-sovits-main % python3 
Python 3.11.8 (v3.11.8:db85d51d3e, Feb  6 2024, 18:02:37) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1138, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1078, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1504, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1473, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1431, in _path_importer_cache
PermissionError: [Errno 1] Operation not permitted
>>> torch.backends.mps.is_available()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'torch' is not defined
Lion-Wu commented 8 months ago

你pytorch没有正确安装啊,建议你先去安装annaconda,然后按照README中有关Mac的教程安装。 安装好之后以后要运行记得输入conda activate GPTSoVits就行了 另外看到你的ntlk似乎没有正确下载,检查网络是否顺畅,一般会下载到你的主目录中有一个叫做nltk_data的文件夹

ThreeManager785 commented 8 months ago

在进行1A时出现Errno 2,pretrained_models里面也有东西

(GPTSoVits) tom@785s-iMac gpt-sovits-main-2 % python3 webui.py
Running on local URL:  http://0.0.0.0:9874
"/opt/anaconda3/envs/GPTSoVits/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
"/opt/anaconda3/envs/GPTSoVits/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [Errno 61] Connection refused>[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [Errno 61] Connection refused>

Traceback (most recent call last):
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1390, in _get_module
Traceback (most recent call last):
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1390, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 26, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 26, in <module>
    import torch.utils.checkpoint
    import torch.utils.checkpoint
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/utils/checkpoint.py", line 23, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/utils/checkpoint.py", line 23, in <module>
    from torch._functorch._aot_autograd.functional_utils import is_fun
    from torch._functorch._aot_autograd.functional_utils import is_fun
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/_functorch/_aot_autograd/functional_utils.py", line 13, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/_functorch/_aot_autograd/functional_utils.py", line 13, in <module>
    from torch.fx.experimental.symbolic_shapes import definitely_true, sym_eq
    from torch.fx.experimental.symbolic_shapes import definitely_true, sym_eq
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/fx/experimental/symbolic_shapes.py", line 63, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/fx/experimental/symbolic_shapes.py", line 63, in <module>
    from torch.utils._sympy.functions import FloorDiv, Mod, IsNonOverlappingAndDenseIndicator
    from torch.utils._sympy.functions import FloorDiv, Mod, IsNonOverlappingAndDenseIndicator
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/utils/_sympy/functions.py", line 1, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/utils/_sympy/functions.py", line 1, in <module>
    import sympy
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/__init__.py", line 30, in <module>
    import sympy
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/__init__.py", line 30, in <module>
    from sympy.core.cache import lazy_function
    from sympy.core.cache import lazy_function
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/__init__.py", line 9, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/__init__.py", line 9, in <module>
    from .expr import Expr, AtomicExpr, UnevaluatedExpr
    from .expr import Expr, AtomicExpr, UnevaluatedExpr
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/expr.py", line 4159, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/expr.py", line 4159, in <module>
    from .mul import Mul
    from .mul import Mul
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/mul.py", line 2193, in <module>
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/mul.py", line 2193, in <module>
    from .numbers import Rational
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/numbers.py", line 4567, in <module>
    from .numbers import Rational
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/numbers.py", line 4567, in <module>
    _sympy_converter[type(mpmath.rational.mpq(1, 2))] = sympify_mpmath_mpq
    _sympy_converter[type(mpmath.rational.mpq(1, 2))] = sympify_mpmath_mpq
AttributeError: module 'mpmath' has no attribute 'rational'
AttributeError: module 'mpmath' has no attribute 'rational'

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

Traceback (most recent call last):

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

  File "/Users/tom/Playgrounds/GPT-SoVITS-main-2/GPT_SoVITS/prepare_datasets/1-get-text.py", line 57, in <module>
Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main-2/GPT_SoVITS/prepare_datasets/1-get-text.py", line 57, in <module>
    bert_model = AutoModelForMaskedLM.from_pretrained(bert_pretrained_dir)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 560, in from_pretrained
    bert_model = AutoModelForMaskedLM.from_pretrained(bert_pretrained_dir)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 560, in from_pretrained
    model_class = _get_model_class(config, cls._model_mapping)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 381, in _get_model_class
    model_class = _get_model_class(config, cls._model_mapping)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 381, in _get_model_class
    supported_models = model_mapping[type(config)]
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 732, in __getitem__
    supported_models = model_mapping[type(config)]
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 732, in __getitem__
    return self._load_attr_from_module(model_type, model_name)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 746, in _load_attr_from_module
    return self._load_attr_from_module(model_type, model_name)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 746, in _load_attr_from_module
    return getattribute_from_module(self._modules[module_name], attr)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 690, in getattribute_from_module
    return getattribute_from_module(self._modules[module_name], attr)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 690, in getattribute_from_module
    if hasattr(module, attr):
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1380, in __getattr__
    if hasattr(module, attr):
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1380, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1392, in _get_module
    module = self._get_module(self._class_to_module[name])
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1392, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.bert.modeling_bert because of the following error (look up to see its traceback):
module 'mpmath' has no attribute 'rational'
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.bert.modeling_bert because of the following error (look up to see its traceback):
module 'mpmath' has no attribute 'rational'
Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main-2/webui.py", line 580, in open1abc
    with open(txt_path, "r",encoding="utf8") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'logs/Tartaglia/2-name2text-0.txt'
ThreeManager785 commented 8 months ago

nltk_data不知道为什么一直不行

[nltk_data] Error loading cmudict: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data]     unable to get local issuer certificate (_ssl.c:1006)>
ThreeManager785 commented 8 months ago

把Clash关了是这样

[nltk_data] Error loading cmudict: <urlopen error [Errno 61]
[nltk_data]     Connection refused>
Lion-Wu commented 8 months ago

把Clash关了是这样

[nltk_data] Error loading cmudict: <urlopen error [Errno 61]
[nltk_data]     Connection refused>

关了更不行,你开着然后复制终端命令粘贴到终端里回车之后再运行一下webUI试试看

Lion-Wu commented 8 months ago

另外确保你所有依赖都正确安装了,不会因为连接失败而安装不上

ThreeManager785 commented 8 months ago

现在可以下载了,但是又有新问题

(GPTSoVits) tom@785s-iMac gpt-sovits-main-2 % python3 webui.py
Running on local URL:  http://0.0.0.0:9874
"/opt/anaconda3/envs/GPTSoVits/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
"/opt/anaconda3/envs/GPTSoVits/bin/python3" GPT_SoVITS/prepare_datasets/1-get-text.py
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /Users/tom/nltk_data...
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /Users/tom/nltk_data...
[nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.
Traceback (most recent call last):
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1390, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 26, in <module>
    import torch.utils.checkpoint
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/utils/checkpoint.py", line 23, in <module>
    from torch._functorch._aot_autograd.functional_utils import is_fun
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/_functorch/_aot_autograd/functional_utils.py", line 13, in <module>
    from torch.fx.experimental.symbolic_shapes import definitely_true, sym_eq
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/fx/experimental/symbolic_shapes.py", line 63, in <module>
    from torch.utils._sympy.functions import FloorDiv, Mod, IsNonOverlappingAndDenseIndicator
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/torch/utils/_sympy/functions.py", line 1, in <module>
    import sympy
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/__init__.py", line 30, in <module>
    from sympy.core.cache import lazy_function
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/__init__.py", line 9, in <module>
    from .expr import Expr, AtomicExpr, UnevaluatedExpr
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/expr.py", line 4159, in <module>
    from .mul import Mul
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/mul.py", line 2193, in <module>
    from .numbers import Rational
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/sympy/core/numbers.py", line 4567, in <module>
    _sympy_converter[type(mpmath.rational.mpq(1, 2))] = sympify_mpmath_mpq
AttributeError: module 'mpmath' has no attribute 'rational'

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

Traceback (most recent call last):
  File "/Users/tom/Playgrounds/GPT-SoVITS-main-2/GPT_SoVITS/prepare_datasets/1-get-text.py", line 57, in <module>
    bert_model = AutoModelForMaskedLM.from_pretrained(bert_pretrained_dir)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 560, in from_pretrained
    model_class = _get_model_class(config, cls._model_mapping)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 381, in _get_model_class
    supported_models = model_mapping[type(config)]
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 732, in __getitem__
    return self._load_attr_from_module(model_type, model_name)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 746, in _load_attr_from_module
    return getattribute_from_module(self._modules[module_name], attr)
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 690, in getattribute_from_module
    if hasattr(module, attr):
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1380, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/opt/anaconda3/envs/GPTSoVits/lib/python3.9/site-packages/transformers/utils/import_utils.py", line 1392, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.bert.modeling_bert because of the following error (look up to see its traceback):
module 'mpmath' has no attribute 'rational'
Lion-Wu commented 8 months ago

重新安装一下依赖试试,感觉你依赖没装好:

pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
pip install -r requirements.txt
ThreeManager785 commented 8 months ago

Terminal Saved Output.txt

ThreeManager785 commented 8 months ago

好像该安装的都安装了

ThreeManager785 commented 8 months ago

安装ffmpeg的话

(GPTSoVits) tom@785s-iMac gpt-sovits-main-2 % brew install ffmpeg
Running `brew update --auto-update`...

就没下文了,也没结束

Lion-Wu commented 8 months ago

pip install mpmath==1.3.0试试

ThreeManager785 commented 8 months ago
Screenshot 2024-03-02 at 10 21 14 PM

谢谢大佬!现在好了,456都有东西了

Lion-Wu commented 8 months ago

👌