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

AttributeError: module 'torch.nn.utils.parametrizations' has no attribute 'weight_norm' #38

Open
HydraBucket opened this issue Dec 21, 2023 · 3 comments

Comments

@HydraBucket
Copy link

When trying to run tortoise-tts-fast, I recieve this error

(venv) E:\X\Voice Training\tortoise-tts-fast>python "E:\X\Voice Training\tortoise-tts-fast\scripts\tortoise_tts.py" --preset high_quality --ar_checkpoint "E:\X\Voice Training\DL-Art-School\experiments\Matthew_VC\models\875_gpt.pth" "Hello. Can you hear me? Is this thing on?."
Traceback (most recent call last):
File "E:\X\Voice Training\tortoise-tts-fast\scripts\tortoise_tts.py", line 240, in
from tortoise.inference import (
File "E:\X\Voice Training\tortoise-tts-fast\tortoise\inference.py", line 167, in
vfixer = VoiceFixer()
File "E:\X\Voice Training\tortoise-tts-fast\venv\lib\site-packages\voicefixer\base.py", line 13, in init
self._model = voicefixer_fe(channels=2, sample_rate=44100)
File "E:\X\Voice Training\tortoise-tts-fast\venv\lib\site-packages\voicefixer\restorer\model.py", line 180, in init
self.vocoder = Vocoder(sample_rate=44100)
File "E:\X\Voice Training\tortoise-tts-fast\venv\lib\site-packages\voicefixer\vocoder\base.py", line 19, in init
self._load_pretrain(Config.ckpt)
File "E:\X\Voice Training\tortoise-tts-fast\venv\lib\site-packages\voicefixer\vocoder\base.py", line 25, in _load_pretrain
self.model = Generator(Config.cin_channels)
File "E:\X\Voice Training\tortoise-tts-fast\venv\lib\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'"

@FurkanGozukara
Copy link
Owner

Hello. Tortoise is very sensitive to setup. You have space in your folder name. So do a fresh install in a new folder
Moreover coqui is much better for voice clone and inference. many times faster

I am preparing a tutorial hopefully but not ready yet. I can share my scripts and knowledge for 150$ private lecture

@itswalli
Copy link

Unfortunately, that doesn't help.

I have exactly the same problem and can't figure out how to fix it. I am very sure that it doesn't have anything to do with spaces in folder names, because in my case, there were no spaces at all. Furthermore, I tried to reproduce this error on another system and I received the very same erro, so it seems to be some global problem.

@itswalli
Copy link

lol, might be that I just fixed it. Seems like we need an older version of voicefixer. Try:
pip uninstall voicefixer pip install voicefixer==0.1.2

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