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
Error running demonstration: TypeError: __init__() got multiple values for argument 'enabled' #93
Comments
Looks like you might be using an old version of pytorch. What version are you using? Try updating it if it's older than 1.10. Not sure when this function signature changed but it was somewhere around there. |
running EDIT: |
Hey, I'm pretty stumped too. The error is saying the "enabled" parameter is being specified twice. It points out this line: There are only two parameters specified to this function, one is a keyword arg "enabled". The error is essentially implying that the positional arg is also "enabled". This was the case for older versions of Torch, but has not been the case for some time now (I think since 1.9?). See the docs: I still suspect there is some dependency issue on your end, as many people (including myself) have exercised this code and have not had any issues. One thing you could do is simply delete the line in question. For inference, it isn't doing anything. You'll need to unindent the block it covers. |
I'm still getting this if I try to run it from command line, but I am able to get around this by using the notebook. |
This should work with torch11, but try upgrading? The function being pointed to is here: https://pytorch.org/docs/stable/amp.html#autocasting |
Making some minor tweaks, I've been able to use both versions of the collab locally with the pre-trained voices in my environment. (The ipynb you download with the directory is different than the link you have in the description. They have slightly different requirements the other.) Mind if I ask you for your package/version list, along with which version of python you're running? I'm having a real hard time imagining what I'm doing differently than you at this point. |
Sure, here is a list of packages in a python environment that runs Tortoise on Windows. Most packages are not required.
|
GOT IT, COACH During my wild goose chase, I determined that we are running the same versions of torch, torchvision, and torchaudio. Where/why it gets stuck is, again, past my realm of understanding. |
Ah yes, if you I'm also quite bad at Python packages. Most of what I know is hard-learned in the vein of what you've done here. Cheers! :) |
I'm self-taught, so all of my learning has gone through this method. |
:) Can't help myself, because patrick stewart is one of the models I have fine-tuned: https://drive.google.com/file/d/1zg8o7Dfmr3d2I2_a6U2bonE-PaQvgKwi/view?usp=sharing |
and I can't blame you! That sounds brilliant! I spent some time regenerating samples to get that much. |
I sure think I got everything installed and ready to work with my 3090, but when I try to run
python tortoise/do_tts.py --text "I'm going to speak this" --voice random --preset fast
I receive
Generating autoregressive samples.. 100%|█████████████████████████████████████████████| 6/6 [00:03<00:00, 1.63it/s] Computing best candidates using CLVP 0%| | 0/6 [00:00<?, ?it/s]/home/al/.local/lib/python3.8/site-packages/torch/utils/checkpoint.py:25: UserWarning: None of the inputs have requires_grad=True. Gradients will be None warnings.warn("None of the inputs have requires_grad=True. Gradients will be None") 100%|█████████████████████████████████████████████| 6/6 [00:00<00:00, 6.15it/s] Transforming autoregressive outputs into audio.. 0%| | 0/80 [00:00<?, ?it/s] Traceback (most recent call last): File "tortoise/do_tts.py", line 37, in <module> gen, dbg_state = tts.tts_with_preset(args.text, k=args.candidates, voice_samples=voice_samples, conditioning_latents=conditioning_latents, File "/home/al/tortoise-tts/tortoise/api.py", line 325, in tts_with_preset return self.tts(text, **settings) File "/home/al/tortoise-tts/tortoise/api.py", line 488, in tts mel = do_spectrogram_diffusion(self.diffusion, diffuser, latents, diffusion_conditioning, File "/home/al/tortoise-tts/tortoise/api.py", line 158, in do_spectrogram_diffusion mel = diffuser.p_sample_loop(diffusion_model, output_shape, noise=noise, File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/utils/diffusion.py", line 565, in p_sample_loop for sample in self.p_sample_loop_progressive( File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/utils/diffusion.py", line 611, in p_sample_loop_progressive out = self.p_sample( File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/utils/diffusion.py", line 514, in p_sample out = self.p_mean_variance( File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/utils/diffusion.py", line 1121, in p_mean_variance return super().p_mean_variance(self._wrap_model(model), *args, **kwargs) File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/utils/diffusion.py", line 340, in p_mean_variance model_output = model(x, self._scale_timesteps(t), **model_kwargs) File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/utils/diffusion.py", line 1220, in __call__ return self.model(x, new_ts, **kwargs) File "/home/al/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/al/.local/lib/python3.8/site-packages/TorToiSe-2.4.2-py3.8.egg/tortoise/models/diffusion_decoder.py", line 306, in forward with autocast(x.device.type, enabled=self.enable_fp16 and i != 0): TypeError: __init__() got multiple values for argument 'enabled'
and I'm a bit stumped.
The text was updated successfully, but these errors were encountered: