AUTOMATIC1111 / stable-diffusion-webui-rembg

Removes backgrounds from pictures. Extension for webui.
MIT License
1.17k stars 173 forks source link

dll load failed while importing "onnxruntime_pybind11_state" #33

Open DiegoRRR opened 6 months ago

DiegoRRR commented 6 months ago

Since I installed stable-diffusion-webui-rembg I have this error :

venv "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\Scripts\Python.ex e" Python 3.10.6 (main, Sep 19 2022, 15:45:37) [MSC v.1933 64 bit (AMD64)] Version: v1.7.0 Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e Launching Web UI with arguments: --xformers --skip-torch-cuda-test --medvram-sdx l Style database not found: D:\apps\stable-diffusion\webuiautomatic1111\webui\st yles.csv ControlNet preprocessor location: D:\apps\stable-diffusion\webuiautomatic1111\ webui\extensions\sd-webui-controlnet\annotator\downloads 2024-02-21 22:46:36,993 - ControlNet - INFO - ControlNet v1.1.438 2024-02-21 22:46:37,165 - ControlNet - INFO - ControlNet v1.1.438 *** Error loading script: api.py Traceback (most recent call last): File "D:\apps\stable-diffusion\webuiautomatic1111\webui\modules\scripts. py", line 469, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\apps\stable-diffusion\webuiautomatic1111\webui\modules\script_l oading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_remov ed File "D:\apps\stable-diffusion\webuiautomatic1111\webui\extensions\stabl e-diffusion-webui-rembg\scripts\api.py", line 7, in import rembg File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\rembg__init.py", line 5, in from .bg import remove File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\rembg\bg.py", line 21, in from .session_factory import new_session File "D:\apps\stable-diffusion\webui__automatic1111\webui\venv\lib\site-pa ckages\rembg\session_factory.py", line 4, in import onnxruntime as ort File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\onnxruntime__init.py", line 56, in raise import_capi_exception File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\onnxruntime__init.py", line 23, in from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401 File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\onnxruntime\capi_pybind_state.py", line 32, in from .onnxruntime_pybind11_state import * # noqa ImportError: DLL load failed while importing onnxruntime_pybind11_state: La procédure spécifiée est introuvable.


** Error loading script: postprocessing_rembg.py Traceback (most recent call last): File "D:\apps\stable-diffusion\webuiautomatic1111\webui\modules\scripts. py", line 469, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\apps\stable-diffusion\webuiautomatic1111\webui\modules\script_l oading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_remov ed File "D:\apps\stable-diffusion\webuiautomatic1111\webui\extensions\stabl e-diffusion-webui-rembg\scripts\postprocessing_rembg.py", line 6, in import rembg File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\rembg\init.py", line 5, in from .bg import remove File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\rembg\bg.py", line 21, in from .session_factory import new_session File "D:\apps\stable-diffusion\webui__automatic1111\webui\venv\lib\site-pa ckages\rembg\session_factory.py", line 4, in import onnxruntime as ort File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\onnxruntime__init.py", line 56, in raise import_capi_exception File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\onnxruntime__init.py", line 23, in from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401 File "D:\apps\stable-diffusion\webuiautomatic1111\webui\venv\lib\site-pa ckages\onnxruntime\capi_pybind_state.py", line 32, in from .onnxruntime_pybind11_state import # noqa ImportError: DLL load failed while importing onnxruntime_pybind11_state: La procédure spécifiée est introuvable.

I installed last VC_redist.x64.exe. I installed : pip install onnxruntime==1.15.0 but I still have this error :(

Please help

paras-B commented 4 weeks ago

Try installing latest c++ windows runtime https://aka.ms/vs/17/release/vc_redist.x64.exe and then try it again.