Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Quick Solution

謬紗特 edited this page Apr 16, 2023 · 8 revisions

Recommended environment

  • python version: 3.8|3.9

  • pip source: https://pypi.org(default)

Previous problems and solutions in issues

**Here are some problems that occurred in the previous issues. Due to the updating of dependency packages and code, these contents have certain timeliness.



This error is due to an update that add a new feature, which is controled by all_in_mem in config.json. The config.json in your preprocessed dataset saved previously did not include this key.

  • Solution:

    • Update your config.json by executing python preprocess_flist_config.py. Note: It will also generate a new filelist/train.txt

    • So it is more recommended to add a all_in_mem in config.json manually.

    "port": "8001",
-   "keep_ckpts": 3
+   "keep_ckpts": 3,
+   "all_in_mem": false
  },
  "data": {



This error is due to the n_speaker in config.json does not match the actual number of speaker embidding weight in models(G_0.pth, D_0.pth).

This is likely because you are training with a model that has been used by others.

  • Solution:

    • output with shape[*,256] doesn't match the broadcast shape[200,256]

      • Set the n_speaker in config.json to 200 , and so on if there is another number.
    • output with shape[*,256] doesn't match the broadcast shape[2,256]

      • Set the n_speaker in config.json to 2 , and so on if there is another number.



Traceback (most recent call last):
  File "train.py", line 435, in <module>
    main()
  File "train.py", line 59, in main
    cpurun(0, 1, hps)
  File "train.py", line 174, in cpurun
    train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d],
  File "train.py", line 219, in train_and_evaluate
    pred_lf0, loss_f0, norm_f0 = net_g(c, c_lengths, f0,uv, mel, mel_lengths, spk_id=spkid)
  File "C:\Users\29099\.conda\envs\vits4.0v2\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "G:\so-vits-svc\models.py", line 985, in forward
    noise_x = self.dec_noise(p_z, y_mask)
  File "C:\Users\29099\.conda\envs\vits4.0v2\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "G:\so-vits-svc\models.py", line 621, in forward
    istft_x = torch.istft(spec, self.fft_size, self.hop_size, self.win_size, self.window.to(amp), False,
RuntimeError: istft requires a complex-valued input tensor matching the output from stft with return_complex=True.



Process Process-1:
Traceback (most recent call last):
File "init.pxd", line 943, in numpy.import_array
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/anaconda3/envs/sovits/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/data/anaconda3/envs/sovits/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/data/home/gxl/so-vits-svc/preprocess_hubert_f0.py", line 44, in process_batch
process_one(filename, hmodel)
File "/data/home/gxl/so-vits-svc/preprocess_hubert_f0.py", line 34, in process_one
f0 = utils.compute_f0_dio(wav, sampling_rate=sampling_rate, hop_length=hop_length)
File "/data/home/gxl/so-vits-svc/utils.py", line 156, in compute_f0_dio
import pyworld
File "/data/anaconda3/envs/sovits/lib/python3.8/site-packages/pyworld/init.py", line 7, in
from .pyworld import *
File "pyworld/pyworld.pyx", line 6, in init pyworld.pyworld
File "init.pxd", line 945, in numpy.import_array
ImportError: numpy.core.multiarray failed to import
  • Solution:

    • pip install numpy==1.23.5
    • pip install -U scipy librosa numba
    • pip install numpy==1.23.5 if numpy is overwrote