voicefixer icon indicating copy to clipboard operation
voicefixer copied to clipboard

unable to run

Open suhitaghosh10 opened this issue 1 year ago • 2 comments

I am getting this issue, after runing python3 test/test.py My pytorch version is 2.0.0+cu117

Initializing VoiceFixer... Traceback (most recent call last): File "/home/sughosh/voicefixer/test/test.py", line 41, in voicefixer = VoiceFixer() ^^^^^^^^^^^^ File "/home/sughosh/miniconda3/envs/emo/lib/python3.11/site-packages/voicefixer/base.py", line 13, in init self._model = voicefixer_fe(channels=2, sample_rate=44100) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sughosh/miniconda3/envs/emo/lib/python3.11/site-packages/voicefixer/restorer/model.py", line 180, in init self.vocoder = Vocoder(sample_rate=44100) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sughosh/miniconda3/envs/emo/lib/python3.11/site-packages/voicefixer/vocoder/base.py", line 19, in init self._load_pretrain(Config.ckpt) File "/home/sughosh/miniconda3/envs/emo/lib/python3.11/site-packages/voicefixer/vocoder/base.py", line 25, in _load_pretrain self.model = Generator(Config.cin_channels) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sughosh/miniconda3/envs/emo/lib/python3.11/site-packages/voicefixer/vocoder/model/generator.py", line 34, in init nn.utils.parametrizations.weight_norm( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'torch.nn.utils.parametrizations' has no attribute 'weight_norm'

suhitaghosh10 avatar Dec 06 '23 11:12 suhitaghosh10

Exactly the same for me

itswalli avatar Dec 25 '23 03:12 itswalli

Go to the Generator's code and remove the "parametrizations" from the code. in other words, change all the nn.utils.parametrizations.weight_norm to nn.utils.weight_norm

Respaired avatar Dec 25 '23 14:12 Respaired