Skip to content
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

Breaks rembg extension upon install, sometimes. #11

Open
B34STW4RS opened this issue Apr 13, 2023 · 4 comments
Open

Breaks rembg extension upon install, sometimes. #11

B34STW4RS opened this issue Apr 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@B34STW4RS
Copy link

Traceback:

File "D:\NasD\stable-diffusion-webui\modules\call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "D:\NasD\stable-diffusion-webui\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "D:\NasD\stable-diffusion-webui\modules\postprocessing.py", line 56, in run_postprocessing
scripts.scripts_postproc.run(pp, args)
File "D:\NasD\stable-diffusion-webui\modules\scripts_postprocessing.py", line 130, in run
script.process(pp, **process_args)
File "D:\NasD\stable-diffusion-webui\extensions\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py", line 53, in process
session=rembg.new_session(model),
File "D:\NasD\stable-diffusion-webui\venv\lib\site-packages\rembg\session_factory.py", line 66, in new_session
ort.InferenceSession(
File "D:\NasD\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 360, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "D:\NasD\stable-diffusion-webui\venv\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 "D:\NasD\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"

Platform: Win10pro

Attempted fix: delete \venv\lib\site-packages\onnxruntime\ and relaunch webui-user.bat, however pbremtools no longer functions afterwards.

The funny thing is, just the other day I could have sworn I was using both tools at the same time.

@mattyamonaca mattyamonaca added the bug Something isn't working label Apr 14, 2023
@mattyamonaca
Copy link
Owner

Is this problem still going on?

@B34STW4RS
Copy link
Author

Not sure, can't risk testing until I finish the project I'm working on, sorry for any trouble.

If no further reply within 7 days close as stale.

@schoenid
Copy link

schoenid commented Jun 29, 2024

Got a similar problem after installing and activating the extension:

2024-06-29 16:06:54.0131322 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "G:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-06-29 16:06:54.0172678 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:861 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirementsto ensure all dependencies are met.
2024-06-29 16:06:54.4586185 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "G:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-06-29 16:06:54.4640822 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:861 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirementsto ensure all dependencies are met.

The extension does not work.

webui:
version: v1.9.4  •  python: 3.10.11  •  torch: 2.1.2+cu121  •  xformers: 0.0.23.post1  •  gradio: 3.41.2

@schoenid
Copy link

schoenid commented Jun 29, 2024

I had to remove the venv folder and let the system rebuild venv.

Now it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants