Repository: stable-diffusion-webui
Issue: [Bug]: installation failed on macos sonoma
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

installation failes running `./webui.sh`

### Steps to reproduce the problem

1. clone AUTOMATIC1111
2. download a model and add it to the correct folder
3. run `./webui.sh`

### What should have happened?

successfully install the "webui"

### Sysinfo

```console
                    'c.          francesco@Francescos-MacBook-Air.local
                 ,xNMM.          --------------------------------------
               .OMMMMo           OS: macOS 14.0 23A344 arm64
               OMMM0,            Host: MacBookAir10,1
     .;loddo:' loolloddol;.      Kernel: 23.0.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 2 days, 6 hours, 56 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 56 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1440x900
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: WarpTerminal
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Apple M1
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Apple M1
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 1573MiB / 8192MiB
       .cooc,.    .,coo:.
```

### What browsers do you use to access the UI ?

Google Chrome

### Console logs


<details>
  <summary>Click me</summary>
  
```shell
./webui.sh
```

```console
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on francesco user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.11.6 (main, Oct  2 2023, 13:45:54) [Clang 15.0.0 (clang-1500.0.40.1)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing torch and torchvision
Collecting torch==2.0.1
  Downloading torch-2.0.1-cp311-none-macosx_11_0_arm64.whl (55.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 MB 25.1 MB/s eta 0:00:00
Collecting torchvision==0.15.2
  Downloading torchvision-0.15.2-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 26.5 MB/s eta 0:00:00
Collecting filelock (from torch==2.0.1)
  Obtaining dependency information for filelock from https://files.pythonhosted.org/packages/5e/5d/97afbafd9d584ff1b45fcb354a479a3609bd97f912f8f1f6c563cb1fae21/filelock-3.12.4-py3-none-any.whl.metadata
  Downloading filelock-3.12.4-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/24/21/7d397a4b7934ff4028987914ac1044d3b7d52712f30e2ac7a2ae5bc86dd0/typing_extensions-4.8.0-py3-none-any.whl.metadata
  Downloading typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
Collecting sympy (from torch==2.0.1)
  Downloading sympy-1.12-py3-none-any.whl (5.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 29.5 MB/s eta 0:00:00
Collecting networkx (from torch==2.0.1)
  Downloading networkx-3.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 25.9 MB/s eta 0:00:00
Collecting jinja2 (from torch==2.0.1)
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 10.7 MB/s eta 0:00:00
Collecting numpy (from torchvision==0.15.2)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/e8/06/0512e2582fd27bb7b358fa1e4ffc0f6c89c89f5ada31df58c5fa93171098/numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl.metadata
  Downloading numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl.metadata (115 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB 12.2 MB/s eta 0:00:00
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
  Downloading 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/c3/5b/6bcfd0c2631d1ce4bb29ea597556ed2783404c5ad38635caf7b3f2b19073/Pillow-10.1.0-cp311-cp311-macosx_11_0_arm64.whl.metadata
  Downloading Pillow-10.1.0-cp311-cp311-macosx_11_0_arm64.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/fe/09/c31503cb8150cf688c1534a7135cc39bb9092f8e0e6369ec73494d16ee0e/MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl.metadata
  Downloading MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.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/07/f3/6149137d06829d1d8b566421a194b9a98d593fb63a1c0d701813ae58bc80/charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl.metadata
  Downloading charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl.metadata (32 kB)
Collecting idna<4,>=2.5 (from requests->torchvision==0.15.2)
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 7.6 MB/s eta 0:00:00
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/26/40/9957270221b6d3e9a3b92fdfba80dd5c9661ff45a664b47edd5d00f707f5/urllib3-2.0.6-py3-none-any.whl.metadata
  Downloading urllib3-2.0.6-py3-none-any.whl.metadata (6.6 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/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl.metadata
  Downloading certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
Collecting mpmath>=0.19 (from sympy->torch==2.0.1)
  Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 19.1 MB/s eta 0:00:00
Downloading Pillow-10.1.0-cp311-cp311-macosx_11_0_arm64.whl (3.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 28.1 MB/s eta 0:00:00
Downloading filelock-3.12.4-py3-none-any.whl (11 kB)
Downloading numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl (14.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 28.1 MB/s eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 7.8 MB/s eta 0:00:00
Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 13.7 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl (116 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.5/116.5 kB 11.5 MB/s eta 0:00:00
Downloading MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl (17 kB)
Downloading urllib3-2.0.6-py3-none-any.whl (123 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.8/123.8 kB 9.2 MB/s eta 0:00:00
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.7.22 charset-normalizer-3.3.0 filelock-3.12.4 idna-3.4 jinja2-3.1.2 mpmath-1.3.0 networkx-3.1 numpy-1.26.1 pillow-10.1.0 requests-2.31.0 sympy-1.12 torch-2.0.1 torchvision-0.15.2 typing-extensions-4.8.0 urllib3-2.0.6

[notice] A new release of pip is available: 23.2.1 -> 23.3
[notice] To update, run: pip install --upgrade pip
Installing clip
Installing open_clip
Cloning Stable Diffusion into /Users/francesco/Development/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
Cloning into '/Users/francesco/Development/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'...
remote: Enumerating objects: 577, done.
remote: Counting objects: 100% (307/307), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 577 (delta 246), reused 219 (delta 218), pack-reused 270
Receiving objects: 100% (577/577), 73.43 MiB | 11.38 MiB/s, done.
Resolving deltas: 100% (278/278), done.
Cloning Stable Diffusion XL into /Users/francesco/Development/stable-diffusion-webui/repositories/generative-models...
Cloning into '/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models'...
remote: Enumerating objects: 740, done.
remote: Counting objects: 100% (393/393), done.
remote: Compressing objects: 100% (157/157), done.
remote: Total 740 (delta 307), reused 236 (delta 236), pack-reused 347
Receiving objects: 100% (740/740), 22.31 MiB | 19.66 MiB/s, done.
Resolving deltas: 100% (378/378), done.
Cloning K-diffusion into /Users/francesco/Development/stable-diffusion-webui/repositories/k-diffusion...
Cloning into '/Users/francesco/Development/stable-diffusion-webui/repositories/k-diffusion'...
remote: Enumerating objects: 1302, done.
remote: Counting objects: 100% (1302/1302), done.
remote: Compressing objects: 100% (412/412), done.
remote: Total 1302 (delta 913), reused 1239 (delta 883), pack-reused 0
Receiving objects: 100% (1302/1302), 232.58 KiB | 1.44 MiB/s, done.
Resolving deltas: 100% (913/913), done.
Cloning CodeFormer into /Users/francesco/Development/stable-diffusion-webui/repositories/CodeFormer...
Cloning into '/Users/francesco/Development/stable-diffusion-webui/repositories/CodeFormer'...
remote: Enumerating objects: 594, done.
remote: Counting objects: 100% (245/245), done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 594 (delta 176), reused 170 (delta 155), pack-reused 349
Receiving objects: 100% (594/594), 17.30 MiB | 16.38 MiB/s, done.
Resolving deltas: 100% (287/287), done.
Cloning BLIP into /Users/francesco/Development/stable-diffusion-webui/repositories/BLIP...
Cloning into '/Users/francesco/Development/stable-diffusion-webui/repositories/BLIP'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112
Receiving objects: 100% (277/277), 7.03 MiB | 11.49 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Installing requirements for CodeFormer
Installing requirements
Launching Web UI with arguments: --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Calculating sha256 for /Users/francesco/Development/stable-diffusion-webui/models/Stable-diffusion/sdXL_v10VAEFix.safetensors: Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 161.0s (prepare environment: 115.8s, import torch: 9.4s, import gradio: 8.4s, setup paths: 7.8s, initialize shared: 1.8s, other imports: 16.7s, setup codeformer: 0.2s, load scripts: 0.3s, create ui: 0.1s, gradio launch: 0.5s).
e6bb9ea85bbf7bf6478a7c6d18b71246f22e95d41bcdd80ed40aa212c33cfeff
Loading weights [e6bb9ea85b] from /Users/francesco/Development/stable-diffusion-webui/models/Stable-diffusion/sdXL_v10VAEFix.safetensors
Creating model from config: /Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Loading weights [e6bb9ea85b] from /Users/francesco/Development/stable-diffusion-webui/models/Stable-diffusion/sdXL_v10VAEFix.safetensors
Creating model from config: /Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
(…)it-large-patch14/resolve/main/vocab.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 961k/961k [00:00<00:00, 4.25MB/s]
(…)it-large-patch14/resolve/main/merges.txt: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 1.51MB/s]
(…)h14/resolve/main/special_tokens_map.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████| 389/389 [00:00<00:00, 1.86MB/s]
(…)tch14/resolve/main/tokenizer_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████| 905/905 [00:00<00:00, 3.48MB/s]
creating model quickly: TypeError
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/initialize.py", line 147, in load_model
    shared.sd_model  # noqa: B018
  File "/Users/francesco/Development/stable-diffusion-webui/modules/shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 499, in get_sd_model
    load_model()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 602, in load_model
    sd_model = instantiate_from_config(sd_config.model)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/sgm/models/diffusion.py", line 61, in __init__
    self.conditioner = instantiate_from_config(
                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/sgm/util.py", line 175, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/sgm/modules/encoders/modules.py", line 88, in __init__
    embedder = instantiate_from_config(embconfig)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/sgm/util.py", line 175, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/sgm/modules/encoders/modules.py", line 361, in __init__
    self.transformer = CLIPTextModel.from_pretrained(version)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_disable_initialization.py", line 68, in CLIPTextModel_from_pretrained
    res = self.CLIPTextModel_from_pretrained(None, *model_args, config=pretrained_model_name_or_path, state_dict={}, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_disable_initialization.py", line 68, in CLIPTextModel_from_pretrained
    res = self.CLIPTextModel_from_pretrained(None, *model_args, config=pretrained_model_name_or_path, state_dict={}, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: transformers.modeling_utils.PreTrainedModel.from_pretrained() got multiple values for keyword argument 'config'

Failed to create model quickly; will retry using slow method.
(…)t-large-patch14/resolve/main/config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████| 4.52k/4.52k [00:00<00:00, 16.4MB/s]
model.safetensors: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.71G/1.71G [00:52<00:00, 32.6MB/s]
open_clip_pytorch_model.bin: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 10.2G/10.2G [05:16<00:00, 32.1MB/s]
changing setting sd_model_checkpoint to sdXL_v10VAEFix.safetensors: RuntimeError
Traceback (most recent call last):
  File "/Users/francesco/Development/stable-diffusion-webui/modules/options.py", line 140, in set
    option.onchange()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/call_queue.py", line 13, in f
    res = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/initialize_util.py", line 170, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: sd_models.reload_model_weights()), call=False)
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 751, in reload_model_weights
    load_model(checkpoint_info, already_loaded_state_dict=state_dict)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 626, in load_model
    load_model_weights(sd_model, checkpoint_info, state_dict, timer)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 353, in load_model_weights
    model.load_state_dict(state_dict, strict=False)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_disable_initialization.py", line 223, in <lambda>
    module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, **kwargs: load_state_dict(module_load_state_dict, *args, **kwargs))
                                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_disable_initialization.py", line 219, in load_state_dict
    state_dict = {k: v.to(device="meta", dtype=v.dtype) for k, v in state_dict.items()}
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_disable_initialization.py", line 219, in <dictcomp>
    state_dict = {k: v.to(device="meta", dtype=v.dtype) for k, v in state_dict.items()}
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: dictionary changed size during iteration

Applying attention optimization: sub-quadratic... done.
loading stable diffusion model: RuntimeError
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/initialize.py", line 147, in load_model
    shared.sd_model  # noqa: B018
  File "/Users/francesco/Development/stable-diffusion-webui/modules/shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 499, in get_sd_model
    load_model()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 649, in load_model
    sd_model.cond_stage_model_empty_prompt = get_empty_cond(sd_model)
                                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models.py", line 534, in get_empty_cond
    d = sd_model.get_learned_conditioning([""])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_models_xl.py", line 31, in get_learned_conditioning
    c = self.conditioner(sdxl_conds, force_zero_embeddings=['txt'] if force_zero_negative_prompt else [])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/repositories/generative-models/sgm/modules/encoders/modules.py", line 141, in forward
    emb_out = embedder(batch[embedder.input_key])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_hijack_clip.py", line 234, in forward
    z = self.process_tokens(tokens, multipliers)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_hijack_clip.py", line 273, in process_tokens
    z = self.encode_with_transformers(tokens)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_hijack_clip.py", line 349, in encode_with_transformers
    outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=self.wrapped.layer == "hidden")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/transformers/models/clip/modeling_clip.py", line 822, in forward
    return self.text_model(
           ^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/transformers/models/clip/modeling_clip.py", line 730, in forward
    hidden_states = self.embeddings(input_ids=input_ids, position_ids=position_ids)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/transformers/models/clip/modeling_clip.py", line 227, in forward
    inputs_embeds = self.token_embedding(input_ids)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/sd_hijack.py", line 321, in forward
    inputs_embeds = self.wrapped(input_ids)
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/modules/sparse.py", line 162, in forward
    return F.embedding(
           ^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/torch/nn/functional.py", line 2210, in embedding
    return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Placeholder storage has not been allocated on MPS device!


Stable diffusion model failed to load
Exception in thread Thread-3 (load_model):
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/initialize.py", line 153, in load_model
    devices.first_time_calculation()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/devices.py", line 148, in first_time_calculation
    linear(x)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/ui_extra_networks.py", line 392, in pages_html
    return refresh()
           ^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/ui_extra_networks.py", line 398, in refresh
    pg.refresh()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/ui_extra_networks_textual_inversion.py", line 13, in refresh
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 255, in load_textual_inversion_embeddings
    self.expected_shape = self.get_expected_shape()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 154, in get_expected_shape
    vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'
Traceback (most recent call last):
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/venv/lib/python3.11/site-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/ui_extra_networks.py", line 392, in pages_html
    return refresh()
           ^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/ui_extra_networks.py", line 398, in refresh
    pg.refresh()
  File "/Users/francesco/Development/stable-diffusion-webui/modules/ui_extra_networks_textual_inversion.py", line 13, in refresh
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
  File "/Users/francesco/Development/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 255, in load_textual_inversion_embeddings
    self.expected_shape = self.get_expected_shape()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francesco/Development/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 154, in get_expected_shape
    vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'

```

</details>