K1000M - CUDA driver initialization failed, you might not have a CUDA gpu

Hi, this is an oldy but for me pretty relevant. I STILL have a Lenovo W530 with Nvidia k1000m and I have it running Cuda and it seems like all is well.

My issue is that when attempting to run a script in Anaconda, I keep getting an error. I am not sure what it means so could really use some help. I reached out on GITHUB but nobody seems interested. Here is what I am running:

(ldm) C:\Users\MojoJojo\Documents\Stable Diffusion\stable-diffusion-main>set /P id=Enter Prompt And Options :
Enter Prompt And Options :

(ldm) C:\Users\MojoJojo\Documents\Stable Diffusion\stable-diffusion-main>python “optimizedSD\optimized_txt2img.py”
Global seed set to 42
Loading model from model 1.3.ckpt
Global Step: 470000
UNet: Running in eps-prediction mode
Selected timesteps for ddim sampler: [ 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341
361 381 401 421 441 461 481 501 521 541 561 581 601 621 641 661 681 701
721 741 761 781 801 821 841 861 881 901 921 941 961 981]
Traceback (most recent call last):
File “optimizedSD\optimized_txt2img.py”, line 193, in
model = instantiate_from_config(config.modelUNet)
File “c:\users\mojojojo\documents\stable diffusion\stable-diffusion-main\ldm\util.py”, line 85, in instantiate_from_config
return get_obj_from_str(config[“target”])(**config.get(“params”, dict()))
File “c:\users\mojojojo\documents\stable diffusion\stable-diffusion-main\optimizedSD\ddpm.py”, line 356, in init
self.make_schedule(ddim_num_steps=ddim_steps, ddim_eta=0.0, verbose=True)
File “c:\users\mojojojo\documents\stable diffusion\stable-diffusion-main\optimizedSD\ddpm.py”, line 450, in make_schedule
self.register_buffer1(‘betas’, to_torch(self.betas))
File “c:\users\mojojojo\documents\stable diffusion\stable-diffusion-main\optimizedSD\ddpm.py”, line 438, in register_buffer1
attr = attr.to(torch.device(“cuda”))
File “C:\Users\MojoJojo\anaconda3\envs\ldm\lib\site-packages\torch\cuda_init_.py”, line 216, in _lazy_init
torch._C._cuda_init()
RuntimeError: CUDA driver initialization failed, you might not have a CUDA gpu.

(ldm) C:\Users\MojoJojo\Documents\Stable Diffusion\stable-diffusion-main>cmd /k
(ldm) C:\Users\MojoJojo\Documents\Stable Diffusion\stable-diffusion-main>

Can anyone point me in the right direction because I am pretty lost at this point. Thanks!

Here is some more info from running nvidia-smi command

Thu Aug 25 22:22:55 2022
±----------------------------------------------------------------------------+
| NVIDIA-SMI 426.78 Driver Version: 426.78 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K1000M WDDM | 00000000:01:00.0 On | N/A |
| N/A 37C P8 N/A / N/A | 814MiB / 2048MiB | 0% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1468 C+G Insufficient Permissions N/A |
| 0 4656 C+G …mmersiveControlPanel\SystemSettings.exe N/A |
| 0 4796 C+G …ent.CBS_cw5n1h2txyewy\TextInputHost.exe N/A |
| 0 7524 C+G …t_cw5n1h2txyewy\ShellExperienceHost.exe N/A |
| 0 7860 C+G C:\Windows\explorer.exe N/A |
| 0 8660 C+G …10091.0_x64__8wekyb3d8bbwe\Video.UI.exe N/A |
| 0 8912 C+G …5n1h2txyewy\StartMenuExperienceHost.exe N/A |
| 0 9668 C+G …dows.Search_cw5n1h2txyewy\SearchApp.exe N/A |
| 0 10280 C+G …136.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A |
| 0 10288 C+G …es\Google\Chrome\Application\chrome.exe N/A |
| 0 10844 C+G …osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A |
| 0 12620 C+G C:\Program Files\NordVPN\NordVPN.exe N/A |
| 0 14200 C+G …3.8.0_x64__8wekyb3d8bbwe\Calculator.exe N/A |
| 0 14620 C+G C:\Windows\System32\WWAHost.exe N/A |
| 0 15124 C+G …dows.Search_cw5n1h2txyewy\SearchApp.exe N/A |
| 0 15204 C+G …x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A |
| 0 15808 C+G …dows.Search_cw5n1h2txyewy\SearchApp.exe N/A |
±----------------------------------------------------------------------------+

(base) C:\Users\MojoJojo>

your GPU is compute capability 3.0. Many pytorch builds have dropped support for compute capability 3.0 some time ago (~5 years ago).

Furthermore, pytorch when installed with anaconda usually brings its own version of CUDA. If you have selected a CUDA version when installing pytorch in your conda env that is greater than the 10.1 version reflected by nvidia-smi, then that won’t work either. (Currently, when I look at pytorch.org, I see that the lowest CUDA version currently offered is 10.2 - which would not work in your setup - and even that is no longer offered for windows users).

A usual suggestion in these situations is to update your GPU driver to the latest for your GPU, however this may not help for the other reasons I mentioned. CUDA 11.x no longer supports cc3.0 GPUs. I think your best bet is to look around to see if you can find a pytorch build for windows that uses CUDA 10.2, and supports cc3.0 devices (and update your GPU driver to the latest).

You may wish to ask questions about pytorch usage on the pytorch forum.

It will be difficult at best to use your machine for pytorch (with GPU). I may not be able to respond to further questions. I will not be able to give you a detailed recipe for getting pytorch to work on your machine. You may wish to find a newer setup to work on.

Hi Robert,

Thank you for that info. I figured that with having such a dated machine that I was pushing it.

I wonder if I can simply use an eGPU to do what I want to do.

Anyhow, thanks for the 411. You helped me avoid a week long dig down a deep dark rabbit hole ;-)