Repository: stable-diffusion-webui
Issue: [Bug]: webui connection errored and reloads webui when switching tabs or searching loras or changing models, etc (like it gets stuck and resets after it has been a while)
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [x] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [x] The issue has been reported before but has not been fixed yet

### What happened?

everytime i switch a tab like checkpoints or textual inversions or even searach up a lora name the webui freezes and no button works, the cursur gets stuck as the last thing u were hovering on, like if it was a button it will get stuck as a pointing hand

everytime since the newest web ui update this has happened, even when switching checkpoints

after it freezes when i switch browser tabs it gets stuck on white and even if i refresh the page it doesnt fix it, nothing can be seen on the page

if u close the tab and enter it again with the same link it shows u gray with again nothing in it but that is temporary it gets resolved after a few mins

### Steps to reproduce the problem

1. use stable diffusion

### What should have happened?

worked normal and didnt bug out

### What browsers do you use to access the UI ?

Other

### Sysinfo

cannot see the option in the webui

### Console logs

```Shell
remote: Enumerating objects: 130, done.
remote: Counting objects: 100% (126/126), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 130 (delta 45), reused 79 (delta 31), pack-reused 4
Receiving objects: 100% (130/130), 244.60 KiB | 2.55 MiB/s, done.
Resolving deltas: 100% (45/45), completed with 9 local objects.
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
   45b8a499..eee46a50  dev        -> origin/dev
 * [new branch]        fix-extract_style_text_from_prompt -> origin/fix-extract_style_text_from_prompt
Already up to date.
venv "C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
Launching Web UI with arguments: --skip-torch-cuda-test --precision full --no-half --vae-path models\VAE\orangemix.vae.pt --medvram
CUDA SETUP: Loading binary C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cudaall.dll...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx', memory monitor disabled
==============================================================================
You are running torch 2.0.0+cu118.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Additional Network extension not installed, Only hijack built-in lora
LoCon Extension hijack built-in lora successfully

========================= a1111-sd-webui-lycoris =========================
Starting from stable-diffusion-webui version 1.5.0
a1111-sd-webui-lycoris extension is no longer needed

All its features have been integrated into the native LoRA extension
LyCORIS models can now be used as if there are regular LoRA models

This extension has been automatically deactivated
Please remove this extension
==========================================================================

*** Error loading script: ddetailer.py
    Traceback (most recent call last):
      File "C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\modules\scripts.py", line 527, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\extensions\ddetailer\scripts\ddetailer.py", line 458, in <module>
        from mmdet.core import get_classes
      File "C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\venv\lib\site-packages\mmdet\__init__.py", line 3, in <module>
        import mmengine
    ModuleNotFoundError: No module named 'mmengine'

---
CivitAI Browser+: Aria2 RPC started
2024-03-05 22:45:16,580 - ControlNet - INFO - ControlNet v1.1.422
ControlNet preprocessor location: C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-03-05 22:45:17,157 - ControlNet - INFO - ControlNet v1.1.422
Thumbnailizer initialized
Loading weights [cbfba64e66] from C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\models\Stable-diffusion\CounterfeitV30_v30.safetensors
Creating model from config: C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\configs\v1-inference.yaml
C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\extensions\stable-diffusion-webui-two-shot\scripts\two_shot.py:397: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  canvas_image = gr.Image(source='upload', mirror_webcam=False, type='numpy', tool='color-sketch',
C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\extensions\stable-diffusion-webui-two-shot\scripts\two_shot.py:471: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  visual_regions = gr.Gallery(label="Regions").style(grid=(4, 4, 4, 8), height="auto")
C:\Users\DELL\Desktop\xmattar\Ai\stable-diffusion-webui\extensions\stable-diffusion-webui-two-shot\scripts\two_shot.py:471: GradioDeprecationWarning: The 'grid' parameter will be deprecated. Please use 'columns' in the constructor instead.
  visual_regions = gr.Gallery(label="Regions").style(grid=(4, 4, 4, 8), height="auto")
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 71.1s (prepare environment: 6.1s, import torch: 34.1s, import gradio: 3.3s, setup paths: 3.0s, initialize shared: 1.4s, other imports: 2.3s, list SD models: 1.3s, load scripts: 11.3s, initialize extra networks: 0.1s, create ui: 5.7s, gradio launch: 2.7s, app_started_callback: 0.1s).
Loading VAE weights from commandline argument: C:\Users\Dell\Desktop\xmattar\Ai\stable-diffusion-webui\models\VAE\orangemix.vae.pt
Applying attention optimization: InvokeAI... done.
Model loaded in 97.3s (load weights from disk: 0.6s, create model: 1.6s, apply weights to model: 66.1s, apply float(): 20.4s, apply dtype to VAE: 0.1s, load VAE: 5.9s, load weights from state dict: 0.2s, hijack: 0.3s, load textual inversion embeddings: 1.1s, calculate empty prompt: 0.9s).
 20%|████████████████▌                                                                  | 4/20 [07:11<26:30, 99.42s/it]
```


### Additional information

the generations work fine but the webui doesnt