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

[Bug] ImportError: cannot import name 'parametrize' from 'torch.nn.utils' #3624

Open
GreshAnt opened this issue Mar 9, 2024 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on but feel free to help.

Comments

@GreshAnt
Copy link

GreshAnt commented Mar 9, 2024

Describe the bug

warnings.warn('torchaudio C++ extension is not available.')
Traceback (most recent call last):
File "d:/programing/Nenu-xuzhenjie/testcuda.py", line 1, in
from TTS.api import TTS
File "d:\programing\Nenu-xuzhenjie\TTS\api.py", line 11, in
from TTS.utils.synthesizer import Synthesizer
File "d:\programing\Nenu-xuzhenjie\TTS\utils\synthesizer.py", line 11, in
from TTS.tts.configs.vits_config import VitsConfig
File "d:\programing\Nenu-xuzhenjie\TTS\tts\configs\vits_config.py", line 5, in
from TTS.tts.models.vits import VitsArgs, VitsAudioConfig
File "d:\programing\Nenu-xuzhenjie\TTS\tts\models\vits.py", line 25, in
from TTS.tts.layers.vits.networks import PosteriorEncoder, ResidualCouplingBlocks, TextEncoder
File "d:\programing\Nenu-xuzhenjie\TTS\tts\layers\vits\networks.py", line 6, in
from TTS.tts.layers.glow_tts.glow import WN
File "d:\programing\Nenu-xuzhenjie\TTS\tts\layers\glow_tts\glow.py", line 6, in
from TTS.tts.layers.generic.wavenet import WN
File "d:\programing\Nenu-xuzhenjie\TTS\tts\layers\generic\wavenet.py", line 3, in
from torch.nn.utils import parametrize
ImportError: cannot import name 'parametrize' from 'torch.nn.utils' (D:\programing\Nenu-xuzhenjie\env\lib\site-packages\torch\nn\utils_init_.py)

image

image

it's a bug import

To Reproduce

import torch
from TTS.api import TTS

device = "cuda" if torch.cuda.is_available() else "cpu"

print(TTS().list_models())

tts = TTS(model_name="tts_models/de/thorsten/tacotron2-DDC", progress_bar=False).to(device)

tts.tts_to_file("This is voice cloning.", speaker_wav="D:/programing/Nenu-xuzhenjie/xzj.wav", language="en", file_path="output.wav")

gives me the error

Expected behavior

gen a wav

Logs

No response

Environment

tts 0.22.0
windows11
torch1.8.0
cuda10.1

Additional context

No response

@GreshAnt GreshAnt added the bug Something isn't working label Mar 9, 2024
Copy link

stale bot commented Apr 22, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on but feel free to help.
Projects
None yet
Development

No branches or pull requests

1 participant