Whenever I try to run my stable diffusion space it returns this error “RuntimeError: CUDA error: CUDA driver version is insufficient for CUDA runtime version CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.” how do I fix it?
Could you provide a link to your Space along with the type of hardware you chose ?
In the meantime if your Space is torch based you can try adding this to your requirements:
--extra-index-url https://download.pytorch.org/whl/cu113 torch
@AdamOswald1 the issue is during the inference a
torch.Generator('cuda') is created while you are using a CPU hardware (so cuda is not available).
Similar to what is done L94 of the
app.py you should test for cuda availability and if it is not available simply create the generator like this
So as a solution you should either upgrade this space to a GPU hardware or replace L142 of app.py by:
if torch.cuda.is_available(): generator = torch.Generator('cuda').manual_seed(seed) else: generator = torch.Generator().manual_seed(seed)
Fixed now! Thanks!
Hey! I am running whisper on a space, and they require torch==1.13.1, which in turn deprecated support for 11.3 cuda drivers so I have to run it on CPU upgrade… do you know a solution for my situation? Thanks!!!
hi @chr1 can you run a custom Docker Space for your project? thus you can choose your requirements accordingly
hi, thanks for helping! Yes, it is running in a custom docker space, but the torch version was set by whisper, “not me”.
great! did you solve the issue then?
Nope… that torch version (the one whisper requires) needs >=11.7 driver version (im a newbie…could be wrong) and my understanding is that spaces use cuda driver version 11.3
could you share your Space? If you’re using a custom Dockerfile you can use any driver for example
Indeed, if you’re using our default Gradio/Streamlit SDKs the base image is
OH! thanks! I didn’t know I could choose. I’ll try and let you know.
Have the same error here, can you maybe explain to me how to fix that as if I am 5 years old…