Failed to load library libonnxruntime_providers_cuda.so with error
Closed this issue · 3 comments
925-Studio commented
First, confirm
- I have read the instruction carefully
- I have searched the existing issues
- I have updated the extension to the latest version
What happened?
Red warning texts shows in terminal after updated to the latest version. But it still works with good result.
Steps to reproduce the problem
Your workflow
Ksampler -> ReActor
Sysinfo
PC, Linux, Chrome, 4080S, IP Adapter
Relevant console log
[ReActor] 00:38:28 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 00:38:28 - STATUS - Analyzing Source Image...
2024-12-17 00:38:28.502050063 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
2024-12-17 00:38:28.694873794 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
2024-12-17 00:38:28.707961815 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
2024-12-17 00:38:28.727992600 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
2024-12-17 00:38:28.773953372 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
[ReActor] 00:38:29 - STATUS - Analyzing Target Image...
[ReActor] 00:38:29 - STATUS - Source Face 0: Detected Gender -F-
[ReActor] 00:38:29 - STATUS - OK - Detected Gender matches Condition
2024-12-17 00:38:29.481078118 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
[ReActor] 00:38:30 - STATUS - Target Face 0: Detected Gender -F-
[ReActor] 00:38:30 - STATUS - OK - Detected Gender matches Condition
[ReActor] 00:38:30 - STATUS - Swapping...
[ReActor] 00:38:30 - STATUS - Face Boost is enabled
[ReActor] 00:38:31 - STATUS - Boosting the Face with GPEN-BFR-2048.onnx | Face Size is set to 2048 with Scale Factor = 16.0 and 'Lanczos' interpolation
2024-12-17 00:38:31.187650852 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
[ReActor] 00:38:33 - STATUS - --Done!--
[ReActor] 00:38:33 - STATUS - Restoring with GFPGANv1.4.pth | Face Size is set to 512
Warning torch.load doesn't support weights_only on this pytorch version, loading unsafely.
Additional information
925-Studio commented
If I hit the "queue" button again, it still shows the error message, but it only appears one time.
[ReActor] 00:48:38 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 00:48:38 - STATUS - Using Hashed Source Face(s) Model...
[ReActor] 00:48:38 - STATUS - Analyzing Target Image...
[ReActor] 00:48:38 - STATUS - Source Face 0: Detected Gender -F-
[ReActor] 00:48:38 - STATUS - OK - Detected Gender matches Condition
[ReActor] 00:48:38 - STATUS - Target Face 0: Detected Gender -F-
[ReActor] 00:48:38 - STATUS - OK - Detected Gender matches Condition
[ReActor] 00:48:38 - STATUS - Swapping...
[ReActor] 00:48:38 - STATUS - Face Boost is enabled
[ReActor] 00:48:39 - STATUS - Boosting the Face with GPEN-BFR-2048.onnx | Face Size is set to 2048 with Scale Factor = 16.0 and 'Lanczos' interpolation
2024-12-17 00:48:39.336035976 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
[ReActor] 00:48:42 - STATUS - --Done!--
[ReActor] 00:48:42 - STATUS - Restoring with GFPGANv1.4.pth | Face Size is set to 512
Warning torch.load doesn't support weights_only on this pytorch version, loading unsafely.
925-Studio commented
Fixed by myself. Turns out both "onnxruntime" and "onnxruntim-gpu" should be the same version. After updated both in 1.20.1, problem solved.
ritlo commented
With your solution, you are using the CPU.
I fixed it by
pip uninstall -y onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.19.2
With torch 2.5.1 cuda 12.1 and cudnn 9 installed