Repository: stable-diffusion-webui
Issue: [Bug]: Webui freeze on first launch, nothing happens when hit generate & works fine after a browser refresh 
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?

Browser: Google Chrome
OS: Ubuntu 22 Linux
Command Line Args: 

`--api --ui-config-file /home/ubuntu/user_data/a1111/configs/ui-config.json --ui-settings-file /home/ubuntu/user_data/a1111/configs/config.json --no-download-sd-model --gradio-queue --xformers --enable-insecure-extension-access --embeddings-dir /home/ubuntu/user_data/a1111/embeddings --ckpt-dir /home/ubuntu/user_data/a1111/models/Stable-Diffusion --lora-dir /home/ubuntu/user_data/a1111/models/Lora --vae-dir /home/ubuntu/user_data/a1111/models/Vae --gfpgan-dir /home/ubuntu/user_data/a1111/models/Gfpgan --codeformer-models-path /home/ubuntu/user_data/a1111/models/Codeformer --esrgan-models-path /home/ubuntu/user_data/a1111/models/Esrgan --bsrgan-models-path /home/ubuntu/user_data/a1111/models/Bsrgan --realesrgan-models-path /home/ubuntu/user_data/a1111/models/Realesrgan --scunet-models-path /home/ubuntu/user_data/a1111/models/Scunet --swinir-models-path /home/ubuntu/user_data/a1111/models/Swinir --ldsr-models-path /home/ubuntu/user_data/a1111/models/Ldsr --lora-dir /home/ubuntu/user_data/a1111/models/Lora --embeddings-dir /home/ubuntu/user_data/a1111/embeddings --skip-version-check --no-hashing --skip-python-version-check --skip-torch-cuda-test --no-half-vae --styles-file /home/ubuntu/user_data/a1111/configs/styles.csv`
![Screenshot 2023-11-20 at 7 20 00 PM](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/108272701/9c4b8eaa-2351-41b3-9ce4-e399
![Screenshot 2023-11-20 at 7 20 00 PM](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/108272701/4543837f-f45a-4a6d-94df-d6d7ef9f5ca0)
![Screenshot 2023-11-20 at 7 19 18 PM](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/108272701/84912d2d-fa7b-4b0f-ad4d-a442efdb1b77)
5369c544)





### Steps to reproduce the problem

1. Navigate to the url 
2. Enter a prompt
3. Hit generate

Possible issue: I have moved all extensions from sd-dir/extensions to sd-dir/extensions-builtin
I have started to get this issue since this change, but this happens in some cases, when i refresh the browser once, everything works. I even don't have to restart webui. 

### What should have happened?

Generate should work as expected

### Sysinfo

RAM: 32 GB
Vram: 16GB
Graphics: Nvidia 


### What browsers do you use to access the UI ?

Google Chrome

### Console logs

```Shell
################################################################
[1m[32mInstall script for stable-diffusion + Web UI
[1m[34mTested on Debian 11 (Bullseye)[0m
################################################################

################################################################
Running on [1m[32mubuntu[0m user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.10 (main, Mar 24 2023, 16:12:06) [GCC 9.4.0]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Launching Web UI with arguments: --api --ui-config-file /home/ubuntu/user_data/a1111/configs/ui-config.json --ui-settings-file /home/ubuntu/user_data/a1111/configs/config.json --no-download-sd-model --gradio-queue --xformers --enable-insecure-extension-access --embeddings-dir /home/ubuntu/user_data/a1111/embeddings --ckpt-dir /home/ubuntu/user_data/a1111/models/Stable-Diffusion --lora-dir /home/ubuntu/user_data/a1111/models/Lora --vae-dir /home/ubuntu/user_data/a1111/models/Vae --gfpgan-dir /home/ubuntu/user_data/a1111/models/Gfpgan --codeformer-models-path /home/ubuntu/user_data/a1111/models/Codeformer --esrgan-models-path /home/ubuntu/user_data/a1111/models/Esrgan --bsrgan-models-path /home/ubuntu/user_data/a1111/models/Bsrgan --realesrgan-models-path /home/ubuntu/user_data/a1111/models/Realesrgan --scunet-models-path /home/ubuntu/user_data/a1111/models/Scunet --swinir-models-path /home/ubuntu/user_data/a1111/models/Swinir --ldsr-models-path /home/ubuntu/user_data/a1111/models/Ldsr --lora-dir /home/ubuntu/user_data/a1111/models/Lora --embeddings-dir /home/ubuntu/user_data/a1111/embeddings --skip-version-check --no-hashing --skip-python-version-check --skip-torch-cuda-test --no-half-vae --styles-file /home/ubuntu/user_data/a1111/configs/styles.csv
[-] ADetailer initialized. version: 23.10.1, num models: 9
Using sqlite file: /home/ubuntu/stable-diffusion-webui/extensions-builtin/sd-webui-agent-scheduler/task_scheduler.sqlite3
2023-11-20 13:24:19,946 - ControlNet - [0;32mINFO[0m - ControlNet v1.1.411
ControlNet preprocessor location: /home/ubuntu/stable-diffusion-webui/extensions-builtin/sd-webui-controlnet/annotator/downloads
2023-11-20 13:24:20,086 - ControlNet - [0;32mINFO[0m - ControlNet v1.1.411
13:24:20 - ReActor - [38;5;173mSTATUS[0m - Running v0.4.3
Loading weights [None] from /home/ubuntu/stable-diffusion-webui/models/Stable-diffusion/_sdxl/ThinkDiffusionXL.safetensors
2023-11-20 13:24:21,202 - AnimateDiff - [0;32mINFO[0m - Hacking i2i-batch.
[0;32m*Deforum ControlNet support: enabled*[0m
Creating model from config: /home/ubuntu/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL:  http://127.0.0.1:7860
Applying attention optimization: xformers... done.

To create a public link, set `share=True` in `launch()`.
[Lobe]: Initializing Lobe
Startup time: 23.6s (prepare environment: 0.2s, import torch: 2.9s, import gradio: 0.9s, setup paths: 1.2s, initialize shared: 0.4s, other imports: 0.7s, list SD models: 0.4s, load scripts: 3.6s, create ui: 3.3s, gradio launch: 8.9s, add APIs: 0.1s, app_started_callback: 0.8s).
```


### Additional information

_No response_