ilian6806/rembgr

[BUG] not working for me :(

Rogal80 opened this issue · 4 comments

Hi, each time i have this issue

Error running postprocess: I:\Github\new_webui\stable-diffusion-webui\extensions\rembgr\scripts\rb_script.py 1.73it/s]
Traceback (most recent call last):
File "I:\Github\new_webui\stable-diffusion-webui\modules\scripts.py", line 436, in postprocess
script.postprocess(p, processed, *script_args)
File "I:\Github\new_webui\stable-diffusion-webui\extensions\rembgr\scripts\rb_script.py", line 35, in postprocess
return self.rb_core.execute_postprocess(p, processed, *args)
File "I:\Github\new_webui\stable-diffusion-webui\extensions\rembgr\scripts\rembgr\script.py", line 19, in execute_postprocess
new_image = bgr_remover.process(image)
File "I:\Github\new_webui\stable-diffusion-webui\extensions\rembgr\scripts\rembgr\bgr_remover.py", line 4, in process
return remove(img)
File "I:\Github\new_webui\stable-diffusion-webui\venv\lib\site-packages\rembg\bg.py", line 133, in remove
session = new_session("u2net")
File "I:\Github\new_webui\stable-diffusion-webui\venv\lib\site-packages\rembg\session_factory.py", line 66, in new_session
ort.InferenceSession(
File "I:\Github\new_webui\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 347, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "I:\Github\new_webui\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 395, 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:1069 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "I:\Github\new_webui\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"

any clue how to solve it ?

It looks like there is dependency (onnxruntime) collision with some other extension you use at the same time. The exntension use rembg package, that depends on onnxruntime==1.13.1. You can try to disable some other extensions and try again to check if this is the issue. You can check your other plugins requirements.txt files and manually downgrade onnxruntime to their version.

Hi, I found it is ABG Remover – but this installs all the stuff with onnx, and after that even when I remove the extension still same issue, how I can downgrade manually

I think you can disable the other extension, delete \venv\Lib\site-packages\onnxruntime and restart

yep it works - thank you :)