AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.07k stars 26.4k forks source link

cannot load 'libomp.dylib' #8583

Closed zhaojigang closed 1 year ago

zhaojigang commented 1 year ago

Is there an existing issue for this?

What happened?

run command './webui.sh' on mac.

Steps to reproduce the problem

run command './webui.sh' on mac.

What should have happened?

can run

Commit where the problem happens

dfeee786f903e392dbef1519c7c246b9856ebab3

What platforms do you use to access the UI ?

MacOS

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

Commit hash: dfeee786f903e392dbef1519c7c246b9856ebab3
Installing requirements for Web UI
Launching Web UI with arguments: --upcast-sampling --no-half-vae --use-cpu interrogate
Traceback (most recent call last):
  File "/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/launch.py", line 381, in <module>
    start()
  File "/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/launch.py", line 372, in start
    import webui
  File "/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/webui.py", line 15, in <module>
    from modules import paths, timer, import_hook, errors
  File "/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/modules/paths.py", line 4, in <module>
    import modules.safe
  File "/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/modules/safe.py", line 9, in <module>
    import torch
  File "/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/__init__.py", line 202, in <module>
    from torch._C import *  # noqa: F403
ImportError: dlopen(/Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/_C.cpython-310-darwin.so, 2): Library not loaded: @loader_path/../.dylibs/libomp.dylib
  Referenced from: /Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/lib/libtorch_cpu.dylib
  Reason: no suitable image found.  Did find:
    /Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/lib/../.dylibs/libomp.dylib: cannot load 'libomp.dylib' (load command 0x80000034 is unknown)
    /Users/zhaowang/Desktop/dev/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/lib/../.dylibs/libomp.dylib: cannot load 'libomp.dylib' (load command 0x80000034 is unknown)

Additional information

i run "brew install libomp", but that not work

zhaojigang commented 1 year ago

env: macOS:10.14.6 python:3.10.10

mradhuber commented 1 year ago

I had the same problem (running on macOS 10.14.6) and fixed it by updating to macOS 13.2.1.

zhaojigang commented 1 year ago

I had the same problem (running on macOS 10.14.6) and fixed it by updating to macOS 13.2.1.

thanks, i will try updating macOS version later, now i closed this issue