[GH-ISSUE #44] Runtime Error #35

Open
opened 2026-10-30 21:08:39 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @SedidX on GitHub (Jul 17, 2024).
Original GitHub issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg/issues/44

Hi,
I have installed Rembg with the extension tab, as indicated on the official github, and it didn't work. There's nothing in the Extra tab. Can someone help please ?

Here is my error:

*** Error loading script: api.py
    Traceback (most recent call last):
      File "S:\Stable Diffusion\webui\modules\scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "S:\Stable Diffusion\webui\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "S:\Stable Diffusion\webui\extensions\stable-diffusion-webui-rembg\scripts\api.py", line 7, in <module>
        import rembg
      File "S:\Stable Diffusion\webui\venv\lib\site-packages\rembg\__init__.py", line 5, in <module>
        from .bg import remove
      File "S:\Stable Diffusion\webui\venv\lib\site-packages\rembg\bg.py", line 21, in <module>
        from .session_factory import new_session
      File "S:\Stable Diffusion\webui\venv\lib\site-packages\rembg\session_factory.py", line 4, in <module>
        import onnxruntime as ort
      File "S:\Stable Diffusion\webui\venv\lib\site-packages\onnxruntime\__init__.py", line 57, in <module>
        raise import_capi_exception
      File "S:\Stable Diffusion\webui\venv\lib\site-packages\onnxruntime\__init__.py", line 23, in <module>
        from onnxruntime.capi._pybind_state import ExecutionMode  # noqa: F401
      File "S:\Stable Diffusion\webui\venv\lib\site-packages\onnxruntime\capi\_pybind_state.py", line 32, in <module>
        from .onnxruntime_pybind11_state import *  # noqa
    ImportError: DLL load failed while importing onnxruntime_pybind11_state: Une routine d’initialisation d’une bibliothèque de liens dynamiques (DLL) a échoué.

---
*** Error loading script: postprocessing_rembg.py
    Traceback (most recent call last):
      File "S:\Stable Diffusion\webui\modules\scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "S:\Stable Diffusion\webui\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "S:\Stable Diffusion\webui\extensions\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py", line 6, in <module>

I saw on internet it might have something to do with english and utf-8. But how to change that on SB?
image

Originally created by @SedidX on GitHub (Jul 17, 2024). Original GitHub issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg/issues/44 Hi, I have installed Rembg with the extension tab, as indicated on the official github, and it didn't work. There's nothing in the Extra tab. Can someone help please ? Here is my error: ``` *** Error loading script: api.py Traceback (most recent call last): File "S:\Stable Diffusion\webui\modules\scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "S:\Stable Diffusion\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "S:\Stable Diffusion\webui\extensions\stable-diffusion-webui-rembg\scripts\api.py", line 7, in <module> import rembg File "S:\Stable Diffusion\webui\venv\lib\site-packages\rembg\__init__.py", line 5, in <module> from .bg import remove File "S:\Stable Diffusion\webui\venv\lib\site-packages\rembg\bg.py", line 21, in <module> from .session_factory import new_session File "S:\Stable Diffusion\webui\venv\lib\site-packages\rembg\session_factory.py", line 4, in <module> import onnxruntime as ort File "S:\Stable Diffusion\webui\venv\lib\site-packages\onnxruntime\__init__.py", line 57, in <module> raise import_capi_exception File "S:\Stable Diffusion\webui\venv\lib\site-packages\onnxruntime\__init__.py", line 23, in <module> from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401 File "S:\Stable Diffusion\webui\venv\lib\site-packages\onnxruntime\capi\_pybind_state.py", line 32, in <module> from .onnxruntime_pybind11_state import * # noqa ImportError: DLL load failed while importing onnxruntime_pybind11_state: Une routine d’initialisation d’une bibliothèque de liens dynamiques (DLL) a échoué. --- *** Error loading script: postprocessing_rembg.py Traceback (most recent call last): File "S:\Stable Diffusion\webui\modules\scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "S:\Stable Diffusion\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "S:\Stable Diffusion\webui\extensions\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py", line 6, in <module> ``` I saw on internet it might have something to do with english and utf-8. But how to change that on SB? ![image](https://github.com/user-attachments/assets/d0ec69a4-4ad5-49b0-9939-6d2e7ef400ac)
Author
Owner

@SedidX commented on GitHub (Jul 17, 2024):

I succeed to install it, when changing all the locales and now I have this error (attached files).
rembg error2

<!-- gh-comment-id:2233077119 --> @SedidX commented on GitHub (Jul 17, 2024): I succeed to install it, when changing all the locales and now I have this error (attached files). ![rembg error2](https://github.com/user-attachments/assets/863fcb89-e2e7-4b43-b896-d1369cfa461e)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AUTOMATIC1111/stable-diffusion-webui-rembg#35
No description provided.