prophesier / diff-svc

Singing Voice Conversion via diffusion model
GNU Affero General Public License v3.0
2.62k stars 802 forks source link

TypeError: argument of type 'NoneType' is not iterable #45

Closed AzoSBear closed 1 year ago

AzoSBear commented 1 year ago

This is an error during inferencing, I have not changed anything other than the project name, pitching, and location of model

TypeError                                 Traceback (most recent call last)
Cell In[1], line 20
     18 config_path=f'./checkpoints/{project_name}/config.yaml
     19 hubert_gpu=True
---> 20 svc_model = Svc(project_name,config_path,hubert_gpu, model_path)
     21 print('model loaded')

File c:\Users\AzoSBear\Desktop\Folders\Artificial Inteligence\Diff-SVC\Diff-SVC\infer_tools\infer_tool.py:107, in Svc.__init__(self, project_name, config_name, hubert_gpu, model_path)
    104 self.model_path = model_path
    105 self.dev = torch.device("cuda")
--> 107 self._ = set_hparams(config=config_name, exp_name=self.project_name, infer=True,
    108                      reset=True,
    109                      hparams_str='',
    110                      print_hparams=False)
    112 self.mel_bins = hparams['audio_num_mel_bins']
    113 self.model = GaussianDiffusion(
    114     phone_encoder=Hubertencoder(hparams['hubert_path']),
    115     out_dims=self.mel_bins, denoise_fn=self.DIFF_DECODERS[hparams['diff_decoder_type']](hparams),
   (...)
    119     spec_min=hparams['spec_min'], spec_max=hparams['spec_max'],
    120 )

File c:\Users\AzoSBear\Desktop\Folders\Artificial Inteligence\Diff-SVC\Diff-SVC\utils\hparams.py:90, in set_hparams(config, exp_name, hparams_str, print_hparams, global_hparams, reset, infer)
     86         args.config = ckpt_config_path
...
---> 58 if 'base_config' in hparams_:
     59     ret_hparams = {}
     60     if not isinstance(hparams_['base_config'], list):

TypeError: argument of type 'NoneType' is not iterable
AzoSBear commented 1 year ago

Update seems like the contents of Config.yaml which is inside the project folder (with the checkpoints) seems to have been erased

AzoSBear commented 1 year ago

Solution: Copy contents of config_nsf.yaml to config.yaml in the checkpoints' folder (if it's a 44k model)