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

In model inference, there is no sound after the conversion【模型推理转换后播放没有声音】

Open
#2,069 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
38.4k
Forks
5.3k
PR merge metrics
No merged PRs in 30d

Description

When using my own trained model, there is no sound during playback after conversion in model inference. However, attempting conversion with a preset model works fine.
【用自己已经训练好的模型,模型推理时,转换后播放没有声音,但是尝试用预设的模型转换却是正常的】

C:\Application\RVC1006Nvidia>runtime\python.exe infer-web.py --pycmd runtime\python.exe --port 7897
2024-05-21 21:35:59 | INFO | configs.config | Found GPU NVIDIA GeForce GTX 1660 SUPER, force to fp32
2024-05-21 21:35:59 | INFO | configs.config | overwrite v1/32k.json
2024-05-21 21:35:59 | INFO | configs.config | overwrite v1/40k.json
2024-05-21 21:35:59 | INFO | configs.config | overwrite v1/48k.json
2024-05-21 21:35:59 | INFO | configs.config | overwrite v2/48k.json
2024-05-21 21:35:59 | INFO | configs.config | overwrite v2/32k.json
2024-05-21 21:35:59 | INFO | configs.config | overwrite preprocess_per to 3
2024-05-21 21:35:59 | INFO | configs.config | Half-precision floating-point: False, device: cuda:0
2024-05-21 21:36:02 | INFO | main | Use Language: zh_CN
Running on local URL: http://0.0.0.0:7897

2024-05-21 21:42:20 | INFO | main | Use gpus: 0
2024-05-21 21:42:20 | INFO | main | Execute: "runtime\python.exe" infer/modules/train/train.py -e "noboro1" -sr 40k -f0 1 -bs 3 -g 0 -te 20 -se 5 -pg assets/pretrained_v2/f0G40k.pth -pd assets/pretrained_v2/f0D40k.pth -l 1 -c 0 -sw 0 -v v2
INFO:noboro1:{'data': {'filter_length': 2048, 'hop_length': 400, 'max_wav_value': 32768.0, 'mel_fmax': None, 'mel_fmin': 0.0, 'n_mel_channels': 125, 'sampling_rate': 40000, 'win_length': 2048, 'training_files': './logs\noboro1/filelist.txt'}, 'model': {'filter_channels': 768, 'gin_channels': 256, 'hidden_channels': 192, 'inter_channels': 192, 'kernel_size': 3, 'n_heads': 2, 'n_layers': 6, 'p_dropout': 0, 'resblock': '1', 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'resblock_kernel_sizes': [3, 7, 11], 'spk_embed_dim': 109, 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16, 4, 4], 'upsample_rates': [10, 10, 2, 2], 'use_spectral_norm': False}, 'train': {'batch_size': 3, 'betas': [0.8, 0.99], 'c_kl': 1.0, 'c_mel': 45, 'epochs': 20000, 'eps': 1e-09, 'fp16_run': False, 'init_lr_ratio': 1, 'learning_rate': 0.0001, 'log_interval': 200, 'lr_decay': 0.999875, 'seed': 1234, 'segment_size': 12800, 'warmup_epochs': 0}, 'model_dir': './logs\noboro1', 'experiment_dir': './logs\noboro1', 'save_every_epoch': 5, 'name': 'noboro1', 'total_epoch': 20, 'pretrainG': 'assets/pretrained_v2/f0G40k.pth', 'pretrainD': 'assets/pretrained_v2/f0D40k.pth', 'version': 'v2', 'gpus': '0', 'sample_rate': '40k', 'if_f0': 1, 'if_latest': 1, 'save_every_weights': '0', 'if_cache_data_in_gpu': 0}
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.
DEBUG:infer.lib.infer_pack.models:gin_channels: 256, self.spk_embed_dim: 109
INFO:noboro1:loaded pretrained assets/pretrained_v2/f0G40k.pth
INFO:noboro1:
INFO:noboro1:loaded pretrained assets/pretrained_v2/f0D40k.pth
INFO:noboro1:
INFO:torch.nn.parallel.distributed:Reducer buckets have been rebuilt in this iteration.
C:\Application\RVC1006Nvidia\runtime\lib\site-packages\torch\autograd_init_.py:200: UserWarning: Grad strides do not match bucket view strides. This may indicate grad was not created according to the gradient layout contract, or that the param's strides changed since DDP was constructed. This is not an error, but may impair performance.
grad.sizes() = [64, 1, 4], strides() = [4, 1, 1]
bucket_view.sizes() = [64, 1, 4], strides() = [4, 4, 1] (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\reducer.cpp:337.)
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
INFO:noboro1:Train Epoch: 1 [0%]
INFO:noboro1:[0, 0.0001]
INFO:noboro1:loss_disc=4.054, loss_gen=4.768, loss_fm=14.125,loss_mel=26.307, loss_kl=6.248
DEBUG:matplotlib:matplotlib data path: C:\Application\RVC1006Nvidia\runtime\lib\site-packages\matplotlib\mpl-data
DEBUG:matplotlib:CONFIGDIR=C:\Users\12400F.matplotlib
DEBUG:matplotlib:interactive is False
DEBUG:matplotlib:platform is win32
INFO:torch.nn.parallel.distributed:Reducer buckets have been rebuilt in this iteration.
INFO:noboro1:====> Epoch: 1 [2024-05-21 21:42:57] | (0:00:23.218699)
INFO:noboro1:====> Epoch: 2 [2024-05-21 21:43:19] | (0:00:22.203234)
INFO:noboro1:====> Epoch: 3 [2024-05-21 21:43:41] | (0:00:21.340653)
INFO:noboro1:====> Epoch: 4 [2024-05-21 21:44:03] | (0:00:22.553188)
INFO:root:Saving model and optimizer state at epoch 5 to ./logs\noboro1\G_2333333.pth
INFO:root:Saving model and optimizer state at epoch 5 to ./logs\noboro1\D_2333333.pth
INFO:noboro1:====> Epoch: 5 [2024-05-21 21:44:26] | (0:00:22.521683)
INFO:noboro1:====> Epoch: 6 [2024-05-21 21:44:48] | (0:00:21.820073)
INFO:noboro1:Train Epoch: 7 [45%]
INFO:noboro1:[200, 9.99250234335941e-05]
INFO:noboro1:loss_disc=nan, loss_gen=nan, loss_fm=nan,loss_mel=nan, loss_kl=nan
INFO:noboro1:====> Epoch: 7 [2024-05-21 21:45:10] | (0:00:21.945320)
INFO:noboro1:====> Epoch: 8 [2024-05-21 21:45:31] | (0:00:21.243423)
INFO:noboro1:====> Epoch: 9 [2024-05-21 21:45:52] | (0:00:21.422991)
INFO:root:Saving model and optimizer state at epoch 10 to ./logs\noboro1\G_2333333.pth
INFO:root:Saving model and optimizer state at epoch 10 to ./logs\noboro1\D_2333333.pth
INFO:noboro1:====> Epoch: 10 [2024-05-21 21:46:15] | (0:00:22.676498)
INFO:noboro1:====> Epoch: 11 [2024-05-21 21:46:37] | (0:00:22.207919)
INFO:noboro1:====> Epoch: 12 [2024-05-21 21:46:59] | (0:00:21.851813)
INFO:noboro1:Train Epoch: 13 [90%]
INFO:noboro1:[400, 9.98501030820433e-05]
INFO:noboro1:loss_disc=nan, loss_gen=nan, loss_fm=nan,loss_mel=nan, loss_kl=nan
INFO:noboro1:====> Epoch: 13 [2024-05-21 21:47:21] | (0:00:22.226533)
INFO:noboro1:====> Epoch: 14 [2024-05-21 21:47:43] | (0:00:21.602905)
INFO:root:Saving model and optimizer state at epoch 15 to ./logs\noboro1\G_2333333.pth
INFO:root:Saving model and optimizer state at epoch 15 to ./logs\noboro1\D_2333333.pth
INFO:noboro1:====> Epoch: 15 [2024-05-21 21:48:06] | (0:00:22.733763)
INFO:noboro1:====> Epoch: 16 [2024-05-21 21:48:27] | (0:00:21.072409)
INFO:noboro1:====> Epoch: 17 [2024-05-21 21:48:48] | (0:00:21.461390)
INFO:noboro1:====> Epoch: 18 [2024-05-21 21:49:10] | (0:00:21.399597)
INFO:noboro1:====> Epoch: 19 [2024-05-21 21:49:31] | (0:00:21.258005)
INFO:noboro1:Train Epoch: 20 [35%]
INFO:noboro1:[600, 9.976276699833672e-05]
INFO:noboro1:loss_disc=nan, loss_gen=nan, loss_fm=nan,loss_mel=nan, loss_kl=nan
INFO:root:Saving model and optimizer state at epoch 20 to ./logs\noboro1\G_2333333.pth
INFO:root:Saving model and optimizer state at epoch 20 to ./logs\noboro1\D_2333333.pth
INFO:noboro1:====> Epoch: 20 [2024-05-21 21:49:54] | (0:00:23.317478)
INFO:noboro1:Training is done. The program is closed.
INFO:noboro1:saving final ckpt:Success.
2024-05-21 21:50:41 | INFO | infer.modules.vc.modules | Get sid: noboro1.pth
2024-05-21 21:50:41 | INFO | infer.modules.vc.modules | Loading: assets/weights/noboro1.pth
2024-05-21 21:50:41 | INFO | infer.modules.vc.modules | Select index: logs\noboro1\added_IVF326_Flat_nprobe_1_noboro1_v2.index
2024-05-21 21:51:20 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt
2024-05-21 21:51:25 | ERROR | root | Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "asyncio\events.py", line 80, in _run
File "asyncio\proactor_events.py", line 162, in _call_connection_lost
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with infer-web.py and reproduce the custom-model conversion, comparing it with the preset-model path. Inspect infer/modules/train/train.py, infer/modules/vc/modules, and infer/modules/vc/pipeline alongside the training logs showing NaN losses and the Windows connection-reset error. Done means identifying the failure path and restoring audible output for converted custom models without breaking preset-model conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.