Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'dict' object is not callable #1

Open
dillfrescott opened this issue Nov 21, 2022 · 10 comments
Open

TypeError: 'dict' object is not callable #1

dillfrescott opened this issue Nov 21, 2022 · 10 comments

Comments

@dillfrescott
Copy link

      7 mel = mel_spectrogram_torch(wav, 2048, 256, 48000, 512, 2048, 0, None, False)
      8 mel = mel.cuda()
----> 9 out = hifigan(mel)
     10 
     11 wav_out = out.squeeze(0).cpu()

TypeError: 'dict' object is not callable
@dillfrescott
Copy link
Author

Also, I get this error when trying to just load your model from hub:

Using cache found in /root/.cache/torch/hub/vtuber-plan_hifi-gan_main
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-31-3ed915ea688c>](https://localhost:8080/#) in <module>
      1 import torch, torchaudio
      2 from hifigan.mel_processing import mel_spectrogram_torch
----> 3 hifigan = torch.hub.load("vtuber-plan/hifi-gan:main", "hifigan_48k")
      4 wav, sr = torchaudio.load("rec.wav")
      5 assert sr == 48000

3 frames
[/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in load_state_dict(self, state_dict, strict)
   1603         if len(error_msgs) > 0:
   1604             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
-> 1605                                self.__class__.__name__, "\n\t".join(error_msgs)))
   1606         return _IncompatibleKeys(missing_keys, unexpected_keys)
   1607 

RuntimeError: Error(s) in loading state_dict for Generator:
	size mismatch for conv_pre.weight: copying a param with shape torch.Size([512, 256, 7]) from checkpoint, the shape in current model is torch.Size([512, 128, 7]).

@FrostMiKu
Copy link
Member

Hi @dillfrescott , the main brach is still under development, we'll let you know when we release an available version.

@dillfrescott
Copy link
Author

Oh, okay!

@jstzwj
Copy link
Contributor

jstzwj commented Nov 21, 2022

I just uploaded the weights and code for version 0.2.1, the example in the readme works now. And the network is still in training, the output of this version may not be high quality.

@dillfrescott
Copy link
Author

okay!

@dillfrescott
Copy link
Author

Quick question. Could I use this for singing voice conversion?

@jstzwj
Copy link
Contributor

jstzwj commented Nov 21, 2022

We did take the singing voice conversion task into account, so a part of training dataset are singing voice, such as JSUT-Song and RAVDESS-Song. It is possible to put it into a singing voice conversion model. In future versions, we may add more singing data to fit the task better.

@dillfrescott
Copy link
Author

Oh cool! Is it okay if I go ahead and try to run inference? Or is it not going to be ready?

@jstzwj
Copy link
Contributor

jstzwj commented Nov 21, 2022

This repository is the code of vocoder, the singing voice conversion model is in the vcvits repository and the model is still in development.

@dillfrescott
Copy link
Author

Oh okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants