DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

_get_cuda_arch_flags() error

Open hnsigma opened this issue 1 year ago • 8 comments

Have everything properly installed but get this issue both in the notebook and on local version

line 1773, in _get_cuda_arch_flags arch_list[-1] += '+PTX' ~~~~~~~~~^^^^ IndexError: list index out of range

hnsigma avatar May 23 '23 03:05 hnsigma

The top of the error likely mentions that you have no CUDA runtime installed.

$ python gradio_app.py

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7'

fuadmefleh avatar May 23 '23 04:05 fuadmefleh

I defo have cuda installed, and tried various versions, I tried using conda also, always the same error. Is there an environment setup I need to do perhaps that didn't happen automatically with the install?

hnsigma avatar May 23 '23 04:05 hnsigma

It should run without any special setup. Could you run the following snippet with python interpreter at your env and see if it print True ?

import torch
print(torch.cuda.is_available())

Zeqiang-Lai avatar May 23 '23 04:05 Zeqiang-Lai

I get false, which is very strange, I have installed cuda several times now. Apologies for my errors! could it be an environment variable issue?

hnsigma avatar May 23 '23 05:05 hnsigma

It might be, but I could not give a certain answer. Another option is to use our online colab demo where you could obtain a free GPU from google.

Zeqiang-Lai avatar May 23 '23 05:05 Zeqiang-Lai

online collab demo is throwing the same error.

genecyber avatar May 24 '23 03:05 genecyber

online collab demo is throwing the same error.

Did you select a GPU via Runtime/Change runtime type ?

Zeqiang-Lai avatar May 24 '23 03:05 Zeqiang-Lai

Probably need to add "--extra-index-url https://download.pytorch.org/whl/cu118" to the top of the requirements.txt file so that it knows to install torch+cuda, versus just torch. ;)

Or, more specifically, you need to ensure your installed torch version includes "+cu118" or whichever version of the CUDA toolkit you have installed.

image

d8ahazard avatar May 24 '23 15:05 d8ahazard