RVC-Project / Retrieval-based-Voice-Conversion-WebUI

Easily train a good VC model with voice data <= 10 mins!
MIT License
23.12k stars 3.46k forks source link

3070也不能用来训练吗? #18

Closed NaughtDZ closed 1 year ago

NaughtDZ commented 1 year ago

就一张3070的显卡,运行后控制台依旧输出:没有发现支持的N卡, 使用CPU进行推理 image image

NaughtDZ commented 1 year ago

训练也跑不起来: start preprocess ['trainset_preprocess_pipeline_print.py', 'I:\VoiceConversionWebUI\traning\input', '40000', '16', 'I:\VoiceConversionWebUI/logs/gemikovoice', 'False'] Fail. Traceback (most recent call last): File "I:\VoiceConversionWebUI\trainset_preprocess_pipeline_print.py", line 90, in pipeline_mp_inp_dir p.start() File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\context.py", line 336, in _Popen return Popen(process_obj) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle '_io.TextIOWrapper' object

end preprocess Traceback (most recent call last): File "", line 1, in File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\spawn.py", line 107, in spawn_main new_handle = reduction.duplicate(pipe_handle, File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\reduction.py", line 79, in duplicate return _winapi.DuplicateHandle( OSError: [WinError 6] 句柄无效。 start preprocess ['trainset_preprocess_pipeline_print.py', 'I:\VoiceConversionWebUI\traning\input', '40000', '16', 'I:\VoiceConversionWebUI/logs/gemikovoice', 'False'] Fail. Traceback (most recent call last): File "I:\VoiceConversionWebUI\trainset_preprocess_pipeline_print.py", line 90, in pipeline_mp_inp_dir p.start() File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\context.py", line 336, in _Popen return Popen(process_obj) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "C:\Users\Naught\AppData\Local\Programs\Python\Python310\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle '_io.TextIOWrapper' object

end preprocess

['extract_feature_print.py', '1', '0', 'I:\VoiceConversionWebUI/logs/gemikovoice'] I:\VoiceConversionWebUI/logs/gemikovoice load model(s) from hubert_base.pt 2023-04-06 16:52:05 | INFO | fairseq.tasks.hubert_pretraining | current directory is I:\VoiceConversionWebUI 2023-04-06 16:52:05 | INFO | fairseq.tasks.hubert_pretraining | HubertPretrainingTask Config {'_name': 'hubert_pretraining', 'data': 'metadata', 'fine_tuning': False, 'labels': ['km'], 'label_dir': 'label', 'label_rate': 50.0, 'sample_rate': 16000, 'normalize': False, 'enable_padding': False, 'max_keep_size': None, 'max_sample_size': 250000, 'min_sample_size': 32000, 'single_target': False, 'random_crop': True, 'pad_audio': False} 2023-04-06 16:52:05 | INFO | fairseq.models.hubert.hubert | HubertModel Config: {'_name': 'hubert', 'label_rate': 50.0, 'extractor_mode': default, 'encoder_layers': 12, 'encoder_embed_dim': 768, 'encoder_ffn_embed_dim': 3072, 'encoder_attention_heads': 12, 'activation_fn': gelu, 'layer_type': transformer, 'dropout': 0.1, 'attention_dropout': 0.1, 'activation_dropout': 0.0, 'encoder_layerdrop': 0.05, 'dropout_input': 0.1, 'dropout_features': 0.1, 'final_dim': 256, 'untie_final_proj': True, 'layer_norm_first': False, 'conv_feature_layers': '[(512,10,5)] + [(512,3,2)] 4 + [(512,2,2)] 2', 'conv_bias': False, 'logit_temp': 0.1, 'target_glu': False, 'feature_grad_mult': 0.1, 'mask_length': 10, 'mask_prob': 0.8, 'mask_selection': static, 'mask_other': 0.0, 'no_mask_overlap': False, 'mask_min_space': 1, 'mask_channel_length': 10, 'mask_channel_prob': 0.0, 'mask_channel_selection': static, 'mask_channel_other': 0.0, 'no_mask_channel_overlap': False, 'mask_channel_min_space': 1, 'conv_pos': 128, 'conv_pos_groups': 16, 'latent_temp': [2.0, 0.5, 0.999995], 'skip_masked': False, 'skip_nomask': False, 'checkpoint_activations': False, 'required_seq_len_multiple': 2, 'depthwise_conv_kernel_size': 31, 'attn_type': '', 'pos_enc_type': 'abs', 'fp16': False} no-feature-todo ['extract_feature_print.py', '1', '0', 'I:\VoiceConversionWebUI/logs/gemikovoice'] I:\VoiceConversionWebUI/logs/gemikovoice load model(s) from hubert_base.pt no-feature-todo

INFO:gemikovoice:{'train': {'log_interval': 200, 'seed': 1234, 'epochs': 20000, 'learning_rate': 0.0001, 'betas': [0.8, 0.99], 'eps': 1e-09, 'batch_size': 4, 'fp16_run': True, 'lr_decay': 0.999875, 'segment_size': 12800, 'init_lr_ratio': 1, 'warmup_epochs': 0, 'c_mel': 45, 'c_kl': 1.0}, 'data': {'max_wav_value': 32768.0, 'sampling_rate': 40000, 'filter_length': 2048, 'hop_length': 400, 'win_length': 2048, 'n_mel_channels': 125, 'mel_fmin': 0.0, 'mel_fmax': None, 'training_files': './logs\gemikovoice/filelist.txt'}, 'model': {'inter_channels': 192, 'hidden_channels': 192, 'filter_channels': 768, 'n_heads': 2, 'n_layers': 6, 'kernel_size': 3, 'p_dropout': 0, 'resblock': '1', 'resblock_kernel_sizes': [3, 7, 11], 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'upsample_rates': [10, 10, 2, 2], 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16, 4, 4], 'use_spectral_norm': False, 'gin_channels': 256, 'spk_embed_dim': 109}, 'model_dir': './logs\gemikovoice', 'experiment_dir': './logs\gemikovoice', 'save_every_epoch': 5, 'name': 'gemikovoice', 'total_epoch': 10, 'pretrainG': 'pretrained/G40k.pth', 'pretrainD': 'pretrained/D40k.pth', 'gpus': '0', 'sample_rate': '40k', 'if_f0': 0, 'if_latest': 0, 'if_cache_data_in_gpu': 0} WARNING:gemikovoice:I:\VoiceConversionWebUI\train is not a git repository, therefore hash value comparison will be ignored. INFO:torch.distributed.distributed_c10d:Added key: store_based_barrier_key:1 to store for rank: 0 INFO:torch.distributed.distributed_c10d:Rank 0: Completed store-based barrier for key:store_based_barrier_key:1 with 1 nodes. gin_channels: 256 self.spk_embed_dim: 109 Traceback (most recent call last): File "I:\VoiceConversionWebUI\train_nsf_sim_cache_sid_loadpretrain.py", line 121, in run , , , epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.modeldir, "D*.pth"), net_d, optim_d) # D多半加载没事 File "I:\VoiceConversionWebUI\train\utils.py", line 163, in latest_checkpoint_path x = f_list[-1] IndexError: list index out of range INFO:gemikovoice:loaded pretrained pretrained/G40k.pth pretrained/D40k.pth

I:\VoiceConversionWebUI\venv\lib\site-packages\torch\cuda\amp\grad_scaler.py:120: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling. warnings.warn("torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.") INFO:gemikovoice:====> Epoch: 1 I:\VoiceConversionWebUI\venv\lib\site-packages\torch\optim\lr_scheduler.py:139: 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()`. " INFO:gemikovoice:====> Epoch: 2 INFO:gemikovoice:====> Epoch: 3 INFO:gemikovoice:====> Epoch: 4 INFO:gemikovoice:Saving model and optimizer state at iteration 5 to ./logs\gemikovoice\G_0.pth INFO:gemikovoice:Saving model and optimizer state at iteration 5 to ./logs\gemikovoice\D_0.pth INFO:gemikovoice:====> Epoch: 5 INFO:gemikovoice:====> Epoch: 6 INFO:gemikovoice:====> Epoch: 7 INFO:gemikovoice:====> Epoch: 8 INFO:gemikovoice:====> Epoch: 9 INFO:gemikovoice:Saving model and optimizer state at iteration 10 to ./logs\gemikovoice\G_0.pth INFO:gemikovoice:Saving model and optimizer state at iteration 10 to ./logs\gemikovoice\D_0.pth INFO:gemikovoice:====> Epoch: 10 INFO:gemikovoice:Training is done. The program is closed. saving final ckpt: Success. Traceback (most recent call last): File "I:\VoiceConversionWebUI\train_nsf_sim_cache_sid_load_pretrain.py", line 515, in main() File "I:\VoiceConversionWebUI\train_nsf_sim_cache_sid_load_pretrain.py", line 42, in main mp.spawn( File "I:\VoiceConversionWebUI\venv\lib\site-packages\torch\multiprocessing\spawn.py", line 239, in spawn return start_processes(fn, args, nprocs, join, daemon, start_method='spawn') File "I:\VoiceConversionWebUI\venv\lib\site-packages\torch\multiprocessing\spawn.py", line 197, in start_processes while not context.join(): File "I:\VoiceConversionWebUI\venv\lib\site-packages\torch\multiprocessing\spawn.py", line 149, in join raise ProcessExitedException( torch.multiprocessing.spawn.ProcessExitedException: process 0 terminated with exit code 2333333 Traceback (most recent call last): File "I:\VoiceConversionWebUI\venv\lib\site-packages\gradio\routes.py", line 393, in run_predict output = await app.get_blocks().process_api( File "I:\VoiceConversionWebUI\venv\lib\site-packages\gradio\blocks.py", line 1108, in process_api result = await self.call_function( File "I:\VoiceConversionWebUI\venv\lib\site-packages\gradio\blocks.py", line 929, in call_function prediction = await anyio.to_thread.run_sync( File "I:\VoiceConversionWebUI\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "I:\VoiceConversionWebUI\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "I:\VoiceConversionWebUI\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "I:\VoiceConversionWebUI\venv\lib\site-packages\gradio\utils.py", line 490, in async_iteration return next(iterator) File "I:\VoiceConversionWebUI\infer-web.py", line 421, in train1key big_npy = np.concatenate(npys, 0) File "<__array_function__ internals>", line 180, in concatenate ValueError: need at least one array to concatenate
NaughtDZ commented 1 year ago

是不是不能用venv,必须要主python来下一堆requirements?

chenxvb commented 1 year ago

CUDA 装了吗?pip 安装了带 cuda 版本的库吗?可以检查一下

RVC-Boss commented 1 year ago

CUDA is not available

RVC-Boss commented 1 year ago

还是环境的问题

NaughtDZ commented 1 year ago

CUDA 装了吗?pip 安装了带 cuda 版本的库吗?可以检查一下

放弃venv虚拟环境搞干净的训练环境了,直接主python运行就好了

006hjy commented 1 year ago

一开始我 pip install -r requirements.txt 直接启动网页也是一样不能用GPU,原因是requirements.txt里面的pytorch是CPU版本。 控制台运行一下这个命令,安装N卡版本的GPU pip install -U torch torchaudio --index-url https://download.pytorch.org/whl/cu118 再启动网页,就有显卡啦。本人拯救者3060的6GB都能用(^_^)