-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ...RuntimeError: D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1029 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\Program Files\Python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll" #312
Comments
I have the same issue. when you find a solution please share. |
I don't find solution, but i run on window is activate but on macos has error |
I also have the same issue on windows 11. |
The same issue on Win10 |
wait for solve error danielgatis/rembg#312
The same issue, smth always happens while working with c++ :( |
|
I've found a solution for this. I changed my installed Python folder from C:\Users to D:. I think it's a permission issue. I'm using Windows 10 |
重新安装包‘onnxruntime’,问题解决了 |
我用的是win10,就是package的问题,重新安装onnxruntime,解决问题。 |
I also have same issue. |
The same problem also with the new v2.0.30 version. I am on Win 10. |
I am also facing the same problem on Windows 10, v2.0.30. I have tried re-installing the appropriate versions of CUDA, ONNX Runtime and cuDNN to no avail. |
I changed the install directory to one in my Documents folder and that seemed to fix it. |
New here, can you please tell how to change the install directory ? Thank you |
Win10: For me, it appears this was because of multiple python installations. The traceback path showed 2 different paths, miniconda3 and python39. I also have python310 installed. I solved it by putting on another machine that only has one python installation. However, another way might be to rename all python folders, except one, so that the PATH variables only resolve to one. Hopefully, it's the same one as the onnx lib install. Otherwise, you may have to reinstall this package. ANOTHER way, if other apps are not dependent on your current installs is simply to uninstall all python, reinstall one python, then install this package. HTH |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
same issue here. |
Same issue here. I had a look with procmon to investigate, and the problem is that onnxruntime_providers_tensorrt.dll has dependencies (imports) from the following dlls and fails to load because it is not finding them in the library load path search:
So this issue is because TensorRT, CUDA 11.x, or cuDNN verison 8.x is not installed or not added to path yet. The one most commonly missing is probably TensorRT for CUDA 11.x:
Install CUDA 11.x: CuDNN 8.x for CUDA 11.x, matching the above TensorRT version requirement: And don't forget them to add all the My issue was installing TensorRT and adding it to path, this fixed it to get the next error for me. Upon running, it eventually got to a different error stating that TensorRT was linked to cuDNN 8.6.0, while I had cuDNN 8.3.0 installed. The next step was adding cuDNN 8.6.0 as well, and making sure it's path was before my older version. You have click the "Archive" button on the cuDNN download page to see all versions. Hope this helps someone! |
Absolutely helped, thank you! I didn't know about procmon either, that's going to be a very useful tool in the future. I referred to your solution in this thread where people are having the same issue. |
Works for me:
|
this doesn't work at all |
I went down the rabbit hole of trying to get it working on the GPU on Windows. It's not worth the hassle, just uninstall the GPU version and let it use the CPU, it's plenty fast. Thanks @Jangsoodlor |
If it does not work, please make sure you use the python in the Stable-Diffusion directory |
how to use the python in the SD directory? Thank you. |
Thank |
It's really help me. By the way, you should be care with your python location, especially your executable python isn't the golbal one. .\system\python\python.exe -m 'pip' uninstall rembg
.\system\python\python.exe -m 'pip' uninstall onnxruntime
.\system\python\python.exe -m 'pip' install rembg[gpu] onnxruntime-gpu
|
see https://onnxruntime.ai/docs/install/, install onnxruntime-gpu in [pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/]. good! |
U are right. |
Thanks~~ |
My comment is not necessarily to do with rembg, but this error can also be caused when your ONNXRuntime version does not support your TensorRT version. |
it works but...with out onxxruntime other nodes would be error |
应该是 onnxruntime onnxruntime-gpu 两个版本不一致造成的 , 更新成相同的版本 |
pip uninstall rembg //uninstall rembg its work for me 2 :) thanx a lot :) |
It worked when I changed ONNX Runtime-gpu version to 1.17.1 (My cuda version is 12.1), even Runtime-gpu 1.18.1 doesn't work |
when i run rembg gpu has it error : RuntimeError: D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1029 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\Program Files\Python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"
The text was updated successfully, but these errors were encountered: