Error 126 onnxruntime_providers_cuda.dll when using cuda with ReActor face swap #16512
Unanswered
Spacebargone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
2024-09-23 03:33:10.7400470 [E:onnxruntime:Default, provider_bridge_ort.cc:1992 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1637 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\Users\Shaun\Desktop\AI Program\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
I get the error above when trying to use cuda and ReActor with the Dreamshaper8.safetensors model and auto1111, I have installed the following (sorry about long list I'm trying to give as much info as possible):
RTX 2080Ti using game ready driver 561.09
cuda 7.5 compute capability, cuda sdk versions 10.0 to 10.2 (I think compatible with 12 to 12.5)
Architecture = Turing
Windows 10 OS
Python 3.10.6 with "Add Python to PATH"
GIT 2.39.2
enabled xformers and working
visual studio community 2022 17.11.4 with "desktop developement with C++"
ReActor from github and reloaded
cuda 12.0.0 toolkit downloaded from nvidia developer site as cuda_12.0.0_windows_network.exe (did not install from install documentation under headding "3.2.4 Zip file installation: with link "12.0 update 1"")
added the path to system path variables for location of ZIP folder
copied dll files to cuda install directory
installed the TensorRT Python wheels cp310 for python 3.10.6 and the two optional wheels:
python.exe -m pip install tensorrt-10.4.0-cp310-none-win_amd64.whl
python.exe -m pip install tensorrt_lean-10.4.0-cp310-none-win_amd64.whl
python.exe -m pip install tensorrt_dispatch-10.4.0-cp310-none-win_amd64.whl
for now I havnt verified if visual studio works with the sample
TensorRT 10.4 GA for Windows 10, 11, Server 2019, Server 2022 and CUDA 12.0 to 12.6 ZIP Package
only unziped to C:\TensorRT\TensorRT-10.4.0.26
the TensorRT extension for stable diffusion
exported default engine in stable diffusion
added sd_unet to user interface/quick settings list and applied
reloaded the UI
Later downloaded cuDDN 8.9.7 (Dec 5th, 2023) for cuda 12.x zip (BACKEND) from Nvidia developer archive
and downloaded cuddn-frontend-main.zip from github #####NOT INSTALLED YET######
and copied the following files into the CUDA Toolkit directory.
a). Copy \cuda\bin\cudnn*.dll
to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vx.x\bin.
b). Copy \cuda\include\cudnn*.h
to C:\Program Files\NVIDIA GPUComputing Toolkit\CUDA\vx.x\include.
c). Copy \cuda\lib\x64\cudnn*.lib
to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vx.x\lib\x64.
relevent OS system PATH variables for this install:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\libnvvp
C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.4.0
C:\TensorRT\TensorRT-10.4.0.26\lib
I have checked if TensorRT is installed as below:
c:\pip show tensorrt
Name: tensorrt
Version: 10.4.0
Summary: A high performance deep learning inference library
Location: c:\users\xxxxx\appdata\local\programs\python\python310\lib\site-packages
Requires:
Required-by:
C:\pip list
Package Version
pip 24.2
setuptools 63.2.0
tensorrt 10.4.0
tensorrt_dispatch 10.4.0
tensorrt_lean 10.4.0
c:\pip show nvidia-tensorrt
WARNING: Package(s) not found: nvidia-tensorrt
when using dreamshaper8.safetensors model with SD Unet [TRT]dreamshaper8
there are no errors
Activating unet: [TRT] dreamshaper_8
Loading TensorRT engine: C:\Users\Shaun\Desktop\AI Program\stable-diffusion-webui\models\Unet-trt\dreamshaper_8_9d40847d_cc75_sample=1x4x64x64+2x4x64x64+8x4x96x96-timesteps=1+2+8-encoder_hidden_states=1x77x768+2x77x768+8x154x768.trt
Loaded Profile: 0
sample = [(1, 4, 64, 64), (2, 4, 64, 64), (8, 4, 96, 96)]
timesteps = [(1,), (2,), (8,)]
encoder_hidden_states = [(1, 77, 768), (2, 77, 768), (8, 154, 768)]
latent = [(-1945851392), (-1945850368), (-1945847296)]
I've read putting the path to the cuda dlls in webui-user.bat as:
set PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin;C:\TensorRT\TensorRT-10.4.0.26\lib%PATH%
can help but it didn't
another fix I saw was to install python on another drive but I haven't tried this yet
Apologies for the long list I hope its not too long
Beta Was this translation helpful? Give feedback.
All reactions