Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

when pressing start or live or preview i get cuda wasnt able to be loaded. i installed everything according to the tutorial

Open HG-ERIK opened this issue 7 months ago • 5 comments

(venv) D:\Deep-Live-Cam>python run.py --execution-provider cuda 2025-04-29 17:25:43.9095646 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Deep-Live-Cam\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

EP Error D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported. when using ['CUDAExecutionProvider'] Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying. 2025-04-29 17:26:58.6875459 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Deep-Live-Cam\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

Exception in Tkinter callback Traceback (most recent call last): File "D:\Deep-Live-Cam\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "D:\Deep-Live-Cam\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 463, in _create_inference_session sess.initialize_session(providers, provider_options, disabled_optimizers) RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

HG-ERIK avatar Apr 29 '25 15:04 HG-ERIK

same

riyadiscold1 avatar Apr 29 '25 19:04 riyadiscold1

so as me on windows. I pull the repo today, and the cuda version in conda venv is right (11.7), but not work.

drunkenQCat avatar Apr 30 '25 06:04 drunkenQCat

I had the same and fixed it with installing cuDNN From here https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/ I took 9.7.1.26 And pasting the libraries here C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vXX.X\

If this doens't help Use https://github.com/lucasg/Dependencies, on the "onnxruntime_providers_cuda.dll" file to find any missing dependencies

BorisB82 avatar Apr 30 '25 23:04 BorisB82

  1. You need to download cuDNN v8.9.7
  2. Completely install CUDA 11.8
  3. Unzip cuDNN Files and copy/paste into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8
  4. run pip install onnxruntime-gpu --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-11/pypi/simple/
  5. Check nvcc --version
  6. Test providers thru >python3.10 > import onnxruntime as ort print(ort.get_available_providers())

yuriyyurov avatar May 03 '25 18:05 yuriyyurov

Interesting issue. I’ll try to test this out and see what I can contribute.

Imaxden4ik avatar May 04 '25 13:05 Imaxden4ik