picobyte / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
601 stars 74 forks source link

Installing tagger causes webui to crash on Mac M3 Max #93

Closed hal0thane closed 11 months ago

hal0thane commented 11 months ago

Brand new system. Installed webui, all was working well. Installed dynamic prompts, reload UI, all is good. Installed latent mirror, reload UI, all is good. Installed wd14-tagger, shut down and restarted webui.sh, and now every time I try to run webui.sh, it crashes with an Illegal Instruction:

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on hal0 user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.13 (main, Aug 24 2023, 22:48:59) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Installing torch and torchvision
Collecting torch==2.0.1
  Using cached torch-2.0.1-cp310-none-macosx_10_9_x86_64.whl (143.4 MB)
Collecting torchvision==0.15.2
  Using cached torchvision-0.15.2-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB)
Collecting filelock (from torch==2.0.1)
  Obtaining dependency information for filelock from https://files.pythonhosted.org/packages/81/54/84d42a0bee35edba99dee7b59a8d4970eccdd44b99fe728ed912106fc781/filelock-3.13.1-py3-none-any.whl.metadata
  Using cached filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)
Collecting typing-extensions (from torch==2.0.1)
  Obtaining dependency information for typing-extensions from https://files.pythonhosted.org/packages/b7/f4/6a90020cd2d93349b442bfcb657d0dc91eee65491600b2cb1d388bc98e6b/typing_extensions-4.9.0-py3-none-any.whl.metadata
  Using cached typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)
Collecting sympy (from torch==2.0.1)
  Using cached sympy-1.12-py3-none-any.whl (5.7 MB)
Collecting networkx (from torch==2.0.1)
  Obtaining dependency information for networkx from https://files.pythonhosted.org/packages/d5/f0/8fbc882ca80cf077f1b246c0e3c3465f7f415439bdea6b899f6b19f61f70/networkx-3.2.1-py3-none-any.whl.metadata
  Using cached networkx-3.2.1-py3-none-any.whl.metadata (5.2 kB)
Collecting jinja2 (from torch==2.0.1)
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting numpy (from torchvision==0.15.2)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/76/ac/dea2939dfc3c591a2494121669455fd7d049248ef284c9542904ddbe05d5/numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl.metadata
  Using cached numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl.metadata (61 kB)
Collecting requests (from torchvision==0.15.2)
  Obtaining dependency information for requests from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting pillow!=8.3.*,>=5.3.0 (from torchvision==0.15.2)
  Obtaining dependency information for pillow!=8.3.*,>=5.3.0 from https://files.pythonhosted.org/packages/cb/64/1a4fb688fb4e1a8c621b49ac398858d49f0d6c9289b06027a3f0d4027568/Pillow-10.1.0-cp310-cp310-macosx_10_10_x86_64.whl.metadata
  Using cached Pillow-10.1.0-cp310-cp310-macosx_10_10_x86_64.whl.metadata (9.5 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch==2.0.1)
  Obtaining dependency information for MarkupSafe>=2.0 from https://files.pythonhosted.org/packages/f7/9c/86cbd8e0e1d81f0ba420f20539dd459c50537c7751e28102dbfee2b6f28c/MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl.metadata
  Using cached MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl.metadata (3.0 kB)
Collecting charset-normalizer<4,>=2 (from requests->torchvision==0.15.2)
  Obtaining dependency information for charset-normalizer<4,>=2 from https://files.pythonhosted.org/packages/cc/94/f7cf5e5134175de79ad2059edf2adce18e0685ebdb9227ff0139975d0e93/charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl.metadata
  Using cached charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests->torchvision==0.15.2)
  Obtaining dependency information for idna<4,>=2.5 from https://files.pythonhosted.org/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl.metadata
  Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests->torchvision==0.15.2)
  Obtaining dependency information for urllib3<3,>=1.21.1 from https://files.pythonhosted.org/packages/96/94/c31f58c7a7f470d5665935262ebd7455c7e4c7782eb525658d3dbf4b9403/urllib3-2.1.0-py3-none-any.whl.metadata
  Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests->torchvision==0.15.2)
  Obtaining dependency information for certifi>=2017.4.17 from https://files.pythonhosted.org/packages/64/62/428ef076be88fa93716b576e4a01f919d25968913e817077a386fcbe4f42/certifi-2023.11.17-py3-none-any.whl.metadata
  Using cached certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Collecting mpmath>=0.19 (from sympy->torch==2.0.1)
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Using cached Pillow-10.1.0-cp310-cp310-macosx_10_10_x86_64.whl (3.5 MB)
Using cached filelock-3.13.1-py3-none-any.whl (11 kB)
Using cached networkx-3.2.1-py3-none-any.whl (1.6 MB)
Using cached numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl (20.6 MB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Using cached certifi-2023.11.17-py3-none-any.whl (162 kB)
Using cached charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl (122 kB)
Using cached idna-3.6-py3-none-any.whl (61 kB)
Using cached MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl (13 kB)
Using cached urllib3-2.1.0-py3-none-any.whl (104 kB)
Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, filelock, charset-normalizer, certifi, requests, jinja2, torch, torchvision
Successfully installed MarkupSafe-2.1.3 certifi-2023.11.17 charset-normalizer-3.3.2 filelock-3.13.1 idna-3.6 jinja2-3.1.2 mpmath-1.3.0 networkx-3.2.1 numpy-1.26.2 pillow-10.1.0 requests-2.31.0 sympy-1.12 torch-2.0.1 torchvision-0.15.2 typing-extensions-4.9.0 urllib3-2.1.0

[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
Installing clip
Installing open_clip
Installing requirements for CodeFormer
Installing requirements
Collecting send2trash~=1.8
  Using cached Send2Trash-1.8.2-py3-none-any.whl (18 kB)
Collecting dynamicprompts[attentiongrabber,magicprompt]~=0.30.4
  Obtaining dependency information for dynamicprompts[attentiongrabber,magicprompt]~=0.30.4 from https://files.pythonhosted.org/packages/55/18/ee387122d87c2f00c5a745cd1c43e25d48ffd0c072607fa2c7152c365991/dynamicprompts-0.30.4-py3-none-any.whl.metadata
  Using cached dynamicprompts-0.30.4-py3-none-any.whl.metadata (18 kB)
Requirement already satisfied: jinja2~=3.1 in ./venv/lib/python3.10/site-packages (from dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (3.1.2)
Requirement already satisfied: pyparsing~=3.0 in ./venv/lib/python3.10/site-packages (from dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (3.1.1)
Requirement already satisfied: transformers[torch]~=4.19 in ./venv/lib/python3.10/site-packages (from dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (4.30.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.10/site-packages (from jinja2~=3.1->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2.1.3)
Requirement already satisfied: filelock in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (3.13.1)
Requirement already satisfied: huggingface-hub<1.0,>=0.14.1 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (0.20.1)
Requirement already satisfied: numpy>=1.17 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (1.23.5)
Requirement already satisfied: packaging>=20.0 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (23.2)
Requirement already satisfied: pyyaml>=5.1 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (6.0.1)
Requirement already satisfied: regex!=2019.12.17 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2023.10.3)
Requirement already satisfied: requests in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2.31.0)
Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (0.13.3)
Requirement already satisfied: safetensors>=0.3.1 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (0.3.1)
Requirement already satisfied: tqdm>=4.27 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (4.66.1)
Requirement already satisfied: torch!=1.12.0,>=1.9 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2.0.1)
Requirement already satisfied: accelerate>=0.20.2 in ./venv/lib/python3.10/site-packages (from transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (0.21.0)
Requirement already satisfied: psutil in ./venv/lib/python3.10/site-packages (from accelerate>=0.20.2->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (5.9.5)
Requirement already satisfied: fsspec>=2023.5.0 in ./venv/lib/python3.10/site-packages (from huggingface-hub<1.0,>=0.14.1->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2023.12.2)
Requirement already satisfied: typing-extensions>=3.7.4.3 in ./venv/lib/python3.10/site-packages (from huggingface-hub<1.0,>=0.14.1->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (4.9.0)
Requirement already satisfied: sympy in ./venv/lib/python3.10/site-packages (from torch!=1.12.0,>=1.9->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (1.12)
Requirement already satisfied: networkx in ./venv/lib/python3.10/site-packages (from torch!=1.12.0,>=1.9->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (3.2.1)
Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib/python3.10/site-packages (from requests->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.10/site-packages (from requests->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./venv/lib/python3.10/site-packages (from requests->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.10/site-packages (from requests->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (2023.11.17)
Requirement already satisfied: mpmath>=0.19 in ./venv/lib/python3.10/site-packages (from sympy->torch!=1.12.0,>=1.9->transformers[torch]~=4.19->dynamicprompts[attentiongrabber,magicprompt]~=0.30.4) (1.3.0)
Using cached dynamicprompts-0.30.4-py3-none-any.whl (51 kB)
Installing collected packages: send2trash, dynamicprompts
Successfully installed dynamicprompts-0.30.4 send2trash-1.8.2
sd-dynamic-prompts installer: running /Volumes/Diffusion/webui/m3/venv/bin/python3.10 -m pip install 'send2trash~=1.8' 'dynamicprompts[attentiongrabber,magicprompt]~=0.30.4'
loading WD14-tagger reqs from /Volumes/Diffusion/webui/m3/extensions/stable-diffusion-webui-wd14-tagger/requirements.txt
Checking WD14-tagger requirements.
Launching Web UI with arguments: --skip-torch-cuda-test --skip-version-check --no-download-sd-model --upcast-sampling --no-half-vae --opt-sub-quad-attention --use-cpu interrogate --api --max-batch-count 250 --port 9595 --ckpt-dir /Volumes/Diffusion/Models/Reorg/Checkpoints --vae-dir /Volumes/Diffusion/Models/Library/VAE --embeddings-dir /Volumes/Diffusion/Models/Library/Embeddings --hypernetwork-dir /Volumes/Diffusion/Models/Library/Hypernetworks --esrgan-models-path /Volumes/Diffusion/Models/Library/ESRGAN --lora-dir /Volumes/Diffusion/Models/Library/Lora --cors-allow-origins=http://localhost:3456/
./webui.sh: line 256: 70305 Illegal instruction: 4  "${python_cmd}" -u "${LAUNCH_SCRIPT}" "$@"

I rm -rf venv __pycache__ and tried again. Same result. If I rm -rf extensions/stable-diffusion-webui-wd14-tagger then it starts up normally.

I cloned the tagger repo right before I tried running it, so it's fresh. I'm running on AUTOMATIC1111/stable-diffusion-webui master branch, currently up to date with origin (commit 3e068de0).

Other details

If there are any details I'm forgetting, please let me know what you need.

hal0thane commented 11 months ago

Update: I seem to be having problems with a lot of extensions right now. All the others are giving me segmentation faults, not illegal instructions, but I have previously used these same extensions just fine in the past on my older Intel Mac. The problem is likely not with Tagger, so I will close this now. If it turns out that all the others are resolved and this is still an issue, I'll reopen at that time.