已解决,部署GPTSoVITS报错‘AsyncRequest‘ object has no attribute ‘_json_response_data‘

部署GPTSoVITS过程中,开启一键三连进程发生,报错'AsyncRequest' object has no attribute '_json_response_data'

具体报错内容为

(GPTSoVITS) PS D:\Code\GPT-SoVITS-beta0706> python webui.py
Running on local URL:  http://0.0.0.0:9874
IMPORTANT: You are using gradio version 3.38.0, however version 4.44.1 is available, please upgrade.
--------
"D:\ProgramData\anaconda3\envs\GPTSoVITS\python.exe" GPT_SoVITS/prepare_datasets/1-get-text.py
"D:\ProgramData\anaconda3\envs\GPTSoVITS\python.exe" GPT_SoVITS/prepare_datasets/1-get-text.py
'AsyncRequest' object has no attribute '_json_response_data'
D:\ProgramData\anaconda3\envs\GPTSoVITS\lib\site-packages\torch\_utils.py:831: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
D:\ProgramData\anaconda3\envs\GPTSoVITS\lib\site-packages\torch\_utils.py:831: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
BertForMaskedLM has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
  - If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  - If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
  - If you are not the owner of the model architecture class, please contact the model code owner to update it.
BertForMaskedLM has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
  - If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  - If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
  - If you are not the owner of the model architecture class, please contact the model code owner to update it.
Building prefix dict from the default dictionary ...
Loading model from cache D:\Code\GPT-SoVITS-beta0706\TEMP\jieba.cache
Building prefix dict from the default dictionary ...
Loading model from cache D:\Code\GPT-SoVITS-beta0706\TEMP\jieba.cache
Loading model cost 0.521 seconds.
Prefix dict has been built succesfully.
Loading model cost 0.512 seconds.
Prefix dict has been built succesfully.
"D:\ProgramData\anaconda3\envs\GPTSoVITS\python.exe" GPT_SoVITS/s2_train.py --config "D:\Code\GPT-SoVITS-beta0706\TEMP/tmp_s2.json"
'AsyncRequest' object has no attribute '_json_response_data'
INFO:test:{'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': 3, 'fp16_run': True, '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_f
min': 0.0, 'mel_fmax': None, 'add_blank': True, 'n_speakers': 300, 'cleaned_text': True, 'exp_dir': 'logs/test'}, '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_si
zes': [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/test', 'content_module': 'cnhubert', 'save_weight_dir': 'SoVITS_weights', 'name': 'test', 'pretrain': None, 'resume_step': None}
Traceback (most recent call last):
  File "D:\Code\GPT-SoVITS-beta0706\GPT_SoVITS\s2_train.py", line 600, in <module>
    main()
    mp.spawn(
  File "D:\ProgramData\anaconda3\envs\GPTSoVITS\lib\site-packages\torch\multiprocessing\spawn.py", line 246, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method="spawn")
  File "D:\ProgramData\anaconda3\envs\GPTSoVITS\lib\site-packages\torch\multiprocessing\spawn.py", line 202, in start_processes
    while not context.join():
  File "D:\ProgramData\anaconda3\envs\GPTSoVITS\lib\site-packages\torch\multiprocessing\spawn.py", line 163, 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 "D:\ProgramData\anaconda3\envs\GPTSoVITS\lib\site-packages\torch\multiprocessing\spawn.py", line 74, in _wrap
    fn(i, *args)
  File "D:\Code\GPT-SoVITS-beta0706\GPT_SoVITS\s2_train.py", line 85, in run
    train_dataset = TextAudioSpeakerLoader(hps.data)  ########
  File "D:\Code\GPT-SoVITS-beta0706\GPT_SoVITS\module\data_utils.py", line 36, in __init__
    assert os.path.exists(self.path4)
AssertionError

 报错的地方出现的py包为gradio,因此第一debug思路为换个gradio版本,优先考虑最新版本

首先

pip list

看到当前的gradio版本为3.38.0

(GPTSoVITS) PS D:\Code\GPT-SoVITS-beta0706> pip list
Package                   Version
------------------------- ------------
absl-py                   2.1.0
addict                    2.4.0
aiofiles                  23.2.1
aiohappyeyeballs          2.4.3
aiohttp                   3.10.10
aiosignal                 1.3.1
aliyun-python-sdk-core    2.16.0
aliyun-python-sdk-kms     2.16.5
altair                    5.4.1
annotated-types           0.7.0
antlr4-python3-runtime    4.9.3
anyio                     4.6.2.post1
async-timeout             4.0.3
attrs                     24.2.0
audioread                 3.0.1
av                        12.3.0
certifi                   2022.12.7
cffi                      1.17.1
chardet                   5.2.0
charset-normalizer        2.1.1
click                     8.1.7
cn2an                     0.5.22
colorama                  0.4.6
coloredlogs               15.0.1
contourpy                 1.3.0
crcmod                    1.7
cryptography              43.0.3
ctranslate2               4.5.0
cycler                    0.12.1
datasets                  3.0.2
decorator                 5.1.1
dill                      0.3.8
Distance                  0.1.3
editdistance              0.8.1
einops                    0.8.0
exceptiongroup            1.2.2
fastapi                   0.115.4
faster-whisper            1.0.3
ffmpeg-python             0.2.0
ffmpy                     0.4.0
filelock                  3.13.1
flatbuffers               24.3.25
fonttools                 4.54.1
frozenlist                1.5.0
fsspec                    2024.2.0
funasr                    1.0.0
future                    1.0.0
g2p-en                    2.1.0
gast                      0.6.0
gradio                    3
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

光芒再现dev

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值