152334H / tortoise-tts-fast

Fast TorToiSe inference (5x or your money back!)
GNU Affero General Public License v3.0
771 stars 179 forks source link

UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling #9

Closed perkel666 closed 1 year ago

perkel666 commented 1 year ago

I have 3080 and installed it as per git readme.

While running: python tortoise/do_tts.py --kv_cache --half --no_cond_free --preset single_sample --candidates 1 --text "I have a problem Huston, i repeat !" --voice train-grace

This is the full ouput from console:

C:\Users\Perkel\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\amp\autocast_mode.py:202: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
  warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:31<00:00,  3.89s/it]
Computing best candidates using CLVP
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:10<00:00,  1.32s/it]
Transforming autoregressive outputs into audio..
100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [00:04<00:00,  2.18it/s]
Generating 1 candidates for voice train_grace (seed=None) took 51.85 seconds


From what I read about this kind of issue it seems to be problem with dependency.

perkel666 commented 1 year ago

Oh, never mind.

C:\Users\Perkel\AppData\Local\Programs\Python\Python310

Python 3.10 is not yet compatible with a lot of pytorch.

Use Python 3.9. Leaving this for people to see if they get this problem.

perkel666 commented 1 year ago

Turns out problem was different. For some reason original repo of Tortoise had link to PyTorch repo that was supposed to install cuda capable version. Well it didn't for me.

I run this:

pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html

And with it my problem is gone. Generation time went from 58 seconds on CPU to 9 seconds which is massive improvement.

noahlessard commented 1 year ago

Perkel666's solution to this problem stills works as of 3/16. Thanks perkel