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

[Bug]: Olive: Failed to load olive-ai: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed. #541

Open
1 of 6 tasks
gwenmillett opened this issue Sep 28, 2024 · 1 comment

Comments

@gwenmillett
Copy link

gwenmillett commented Sep 28, 2024

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

cloned the git and ran the webui.bat file but I keep getting this error:
Olive: Failed to load olive-ai: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.

Steps to reproduce the problem

used CMD to clone the GIT for automatic installation and it came up with this error, the webui didn't open

What should have happened?

webui should have opened

What browsers do you use to access the UI ?

Brave

Sysinfo

sysinfo-2024-09-28-16-32.json

Console logs

venv "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\venv\Scripts\Python.exe"
ROCm Toolkit was found.
==============================================================================================================
INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.11.5.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.

You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/

Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases

Use --skip-python-version-check to suppress this warning.
==============================================================================================================
Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)]
Version: v1.7.0-amd-533-g25a3b6cb
Commit hash: 25a3b6cbeea8a07afd5e4594afc2f1c79f41ac1a
Olive: Failed to load olive-ai: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\venv\Lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
  rank_zero_deprecation(
Launching Web UI with arguments:
Traceback (most recent call last):
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\launch.py", line 48, in <module>
    main()
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\launch.py", line 44, in main
    start()
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\modules\launch_utils.py", line 663, in start
    import webui
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\modules\initialize.py", line 36, in imports
    shared_init.initialize()
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\modules\shared_init.py", line 62, in initialize
    initialize_onnx()
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\modules\onnx_impl\__init__.py", line 232, in initialize
    from .pipelines.onnx_stable_diffusion_pipeline import OnnxStableDiffusionPipeline
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\modules\onnx_impl\pipelines\__init__.py", line 7, in <module>
    import onnx
  File "C:\Users\Gwen\Documents\zluda\stable-diffusion-webui-amdgpu\venv\Lib\site-packages\onnx\__init__.py", line 77, in <module>
    from onnx.onnx_cpp2py_export import ONNX_ML
ImportError: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.
Press any key to continue . . .

Additional information

I have an AMD 6950XT

@CS1o
Copy link

CS1o commented Oct 1, 2024

Hey, first you need to uninstall Python 3.12 because its not supported with Stable Diffusion Webuis.
Then make sure you git clone the latest version (1.10.1, yours was on 1.7.0).
Also dont git clone the repo into Documents, Desktop, or Downloads Folder. Your is currently in Documents. That can cause Permission errors.

Then if you want to use Zluda you can follow my AMD Automatic1111 with ZLUDA Install Guide from here:
https://github.com/CS1o/Stable-Diffusion-Info/wiki/Webui-Installation-Guides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants