lucidrains / deep-daze

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network). Technique was originally created by https://twitter.com/advadnoun
MIT License
4.37k stars 327 forks source link

UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling. #138

Open 69Vishal opened 3 years ago

69Vishal commented 3 years ago

C:\Users\balha\AppData\Roaming\Python\Python39\site-packages\deep_daze\clip.py:38: UserWarning: C:\Users\balha/.cache/clip\ViT-B-32.pt exists, but the SHA256 checksum does not match; re-downloading the file
  warnings.warn(f"{download_target} exists, but the SHA256 checksum does not match; re-downloading the file")
Downloading ViT-B-32.pt: 100%|██████████████████████████████████████████████████████| 354M/354M [18:22<00:00, 321kiB/s]
C:\Users\balha\AppData\Roaming\Python\Python39\site-packages\torch\cuda\amp\grad_scaler.py:116: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available.  Disabling.
  warnings.warn("torch.cuda.amp.GradScaler is enabled, but CUDA is not available.  Disabling.") ```

I'm getting this Error, How do I overcome this Error I got i3 and integrated graphics, I may sound like a fool but I just wanna test it out... 
:/
NotNANtoN commented 3 years ago

Hi, this only seems to be a warning, not an error. So the program should continue. Does it raise an Error later?

69Vishal commented 3 years ago

thats the only thing it shows :(

nikopueringer commented 3 years ago

You need to install pytorch. If you're using anaconda, run "conda install pytorch torchvision -c pytorch"

69Vishal commented 3 years ago

I'm not running it on anaconda, I'm just using terminal ;-;

TaylorBurnham commented 3 years ago

@69Vishal Try and see if you have a CUDA device available for pytorch to use. Open up a Python terminal and try this, or run the one liner further down.

import torch
x = torch.cuda.get_device_name(0) if torch.cuda.is_available() else None
print(x)

One liner:

python -c "import torch; x = (torch.cuda.get_device_name(0) if torch.cuda.is_available() else None); print(x)"

This is the output for my Windows workstation for reference.

> python -c "import torch; x = (torch.cuda.get_device_name(0) if torch.cuda.is_available() else None); print(x)"
NVIDIA GeForce RTX 2070

If you have a CUDA device available it should print the name of it, otherwise pytorch isn't seeing it. Depending on your OS there are special drivers that are not part of the standard packages you need to install to have the CUDA support.

You can learn more by looking up your device name and "cuda drivers," in my case I'd google "RTX 2070 CUDA drivers."

69Vishal commented 3 years ago

Lol, I fucked up, I got no Cuda device available!

adiv5 commented 2 years ago

The issue in my case was due to my machine's CUDA Toolkit having version 10.1 but my pytorch installation CUDA toolkit was 11.3, Installing pytorch with cuda 10.1 solved the issue

bsudhanva commented 1 year ago

@adiv5 How do you find out the pytotch cuda version?,

I know how to find out machine cuda toolkit version(nvidia-smi)