danielgatis / rembg

Rembg is a tool to remove images background
MIT License
17.01k stars 1.87k forks source link

[BUG] [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "G:\SDLANUCHER\sd-webui-aki-v4\py310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll" #468

Closed zhangjun-AI closed 1 year ago

zhangjun-AI commented 1 year ago

Describe the bug when I click generate after input image this bug show up rguments: (0, <PIL.Image.Image image mode=RGB size=736x1632 at 0x16627573220>, None, '', '', True, 0, 4, 512, 512, True, 'None', 'None', 0, 0, 0, 0, 'u2net', False, False, 240, 10, 10) {} Traceback (most recent call last): File "G:\SDLANUCHER\sd-webui-aki-v4\modules\call_queue.py", line 57, in f res = list(func(*args, *kwargs)) File "G:\SDLANUCHER\sd-webui-aki-v4\modules\call_queue.py", line 37, in f res = func(args, kwargs) File "G:\SDLANUCHER\sd-webui-aki-v4\modules\postprocessing.py", line 61, in run_postprocessing scripts.scripts_postproc.run(pp, args) File "G:\SDLANUCHER\sd-webui-aki-v4\modules\scripts_postprocessing.py", line 130, in run script.process(pp, process_args) File "G:\SDLANUCHER\sd-webui-aki-v4\extensions\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py", line 55, in process session=rembg.new_session(model), File "G:\SDLANUCHER\sd-webui-aki-v4\py310\lib\site-packages\rembg\session_factory.py", line 66, in new_session ort.InferenceSession( File "G:\SDLANUCHER\sd-webui-aki-v4\py310\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 360, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "G:\SDLANUCHER\sd-webui-aki-v4\py310\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 408, in _create_inference_session sess.initialize_session(providers, provider_options, disabled_optimizers) RuntimeError: D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1106 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "G:\SDLANUCHER\sd-webui-aki-v4\py310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"

Moppel127 commented 1 year ago

Had the same error code. With the following information: "Could not locate zlibwapi.dll. Please make sure it is in your library path!" I uninstalled onnxruntime-gpu 1.15.0 and reinstalled the DirectML Version this time: pip install onnxruntime-directml, which fixed it for me.

https://onnxruntime.ai/

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.