RVC-Boss / GPT-SoVITS

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

使用colab的T4GPU训练微调步骤时出现错误OSError: [Errno 38] Function not implemented #648

Open besenoma opened 7 months ago

besenoma commented 7 months ago

报错前控制台输出信息如下:

"/usr/local/bin/python" GPT_SoVITS/s2_train.py --config "/content/drive/MyDrive/Voice_VITS/GPT-SoVITS/TEMP/tmp_s2.json" INFO:SecondFuNingNa:{'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': 7, '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_fmin': 0.0, 'mel_fmax': None, 'add_blank': True, 'n_speakers': 300, 'cleaned_text': True, 'exp_dir': 'logs/SecondFuNingNa'}, '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/SecondFuNingNa', 'content_module': 'cnhubert', 'save_weight_dir': 'SoVITS_weights', 'name': 'SecondFuNingNa', 'pretrain': None, 'resume_step': None} phoneme_data_len: 506 wav_data_len: 506 100% 506/506 [00:00<00:00, 6448.38it/s] skipped_phone: 0 , skipped_dur: 0 total left: 506 /usr/local/lib/python3.9/site-packages/torch/utils/data/dataloader.py:558: UserWarning: This DataLoader will create 6 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary. warnings.warn(_create_warning_msg( /usr/local/lib/python3.9/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.") ssl_proj.weight not requires_grad ssl_proj.bias not requires_grad INFO:SecondFuNingNa:loaded pretrained GPT_SoVITS/pretrained_models/s2G488k.pth

INFO:SecondFuNingNa:loaded pretrained GPT_SoVITS/pretrained_models/s2D488k.pth /usr/local/lib/python3.9/site-packages/torch/optim/lr_scheduler.py:143: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate warnings.warn("Detected call of `lr_scheduler.step()` before `optimizer.step()`. " /usr/local/lib/python3.9/site-packages/torch/utils/data/dataloader.py:558: UserWarning: This DataLoader will create 6 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary. warnings.warn(_create_warning_msg( 0it [00:00, ?it/s]/usr/local/lib/python3.9/site-packages/torch/functional.py:660: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:874.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined] /usr/local/lib/python3.9/site-packages/torch/functional.py:660: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:874.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined] /usr/local/lib/python3.9/site-packages/torch/functional.py:660: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:874.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined] /usr/local/lib/python3.9/site-packages/torch/functional.py:660: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:874.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined] /usr/local/lib/python3.9/site-packages/torch/functional.py:660: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:874.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined] /usr/local/lib/python3.9/site-packages/torch/functional.py:660: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:874.) return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined]

随后的报错信息为:

Traceback (most recent call last): File "/usr/local/lib/python3.9/multiprocessing/queues.py", line 244, in _feed obj = _ForkingPickler.dumps(obj) File "/usr/local/lib/python3.9/multiprocessing/reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) File "/usr/local/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 569, in reduce_storage df = multiprocessing.reduction.DupFd(fd) File "/usr/local/lib/python3.9/multiprocessing/reduction.py", line 198, in DupFd return resource_sharer.DupFd(fd) File "/usr/local/lib/python3.9/multiprocessing/resource_sharer.py", line 53, in init self._id = _resource_sharer.register(send, close) File "/usr/local/lib/python3.9/multiprocessing/resource_sharer.py", line 76, in register self._start() File "/usr/local/lib/python3.9/multiprocessing/resource_sharer.py", line 126, in _start self._listener = Listener(authkey=process.current_process().authkey) File "/usr/local/lib/python3.9/multiprocessing/connection.py", line 448, in init self._listener = SocketListener(address, family, backlog) File "/usr/local/lib/python3.9/multiprocessing/connection.py", line 591, in init self._socket.bind(address) OSError: [Errno 38] Function not implemented

我在进行训练时使用的模型文件和音频文件是从Google硬盘上挂载到colab的,我这个错误是否与我的这个做法有关? 065ea34136e87408db5ef27d5c4df81d 7711ffe574792531089822d2a1812ab8

besenoma commented 7 months ago

我想知道如何解决这个问题,我需要将我的文件内容全部下载到colab上而不是使用Google云端硬盘挂载吗? 希望有人帮我解答一下我的问题,因为我的colab额度到了,所以我可以晚些时候再尝试一下。

besenoma commented 7 months ago

已解决,将挂载Google云盘的方式改为直接将文件下载到colab中后,模型即可运行训练,这是一个可行的方法,但是需要注意保存训练结果。