AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Layout is broken #14733

Open daryldejori opened 9 months ago

daryldejori commented 9 months ago

Checklist

What happened?

After a clean install on Windows I am welcomed by a completely broken web-UI (see attached screen).

No errors were seen during the console installation (first update, then run), except for "Style database not found: Y:\SD1\stable-diffusion-webui\styles.csv" . Which I suppose could be the issue since the file is missing.

I tried all different ways to install it (via GIT, via download extract and execute). screencapture-127-0-0-1-7860-2024-01-22-21_17_44

Steps to reproduce the problem

Download. Install (via GIT or extraction) Run View in a browser (tried Edge, Chrome, Firefox - same result)

What should have happened?

A working web UI.

What browsers do you use to access the UI ?

Mozilla Firefox, Google Chrome, Microsoft Edge

Sysinfo

sysinfo-2024-01-22-20-20.json

Console logs

Creating venv in directory Y:\SD1\stable-diffusion-webui\venv using python "X:\anaconda3\python.exe"
venv "Y:\SD1\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar  1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Collecting torch==2.0.1
  Using cached https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-win_amd64.whl (2619.1 MB)
Collecting torchvision==0.15.2
  Using cached https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp310-cp310-win_amd64.whl (4.9 MB)
Collecting jinja2
  Using cached Jinja2-3.1.3-py3-none-any.whl (133 kB)
Collecting filelock
  Using cached filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting networkx
  Using cached networkx-3.2.1-py3-none-any.whl (1.6 MB)
Collecting typing-extensions
  Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Collecting sympy
  Using cached https://download.pytorch.org/whl/sympy-1.12-py3-none-any.whl (5.7 MB)
Collecting numpy
  Using cached numpy-1.26.3-cp310-cp310-win_amd64.whl (15.8 MB)
Collecting requests
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting pillow!=8.3.*,>=5.3.0
  Using cached pillow-10.2.0-cp310-cp310-win_amd64.whl (2.6 MB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.4-cp310-cp310-win_amd64.whl (17 kB)
Collecting urllib3<3,>=1.21.1
  Using cached urllib3-2.1.0-py3-none-any.whl (104 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.11.17-py3-none-any.whl (162 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl (100 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.6-py3-none-any.whl (61 kB)
Collecting mpmath>=0.19
  Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 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.4 certifi-2023.11.17 charset-normalizer-3.3.2 filelock-3.13.1 idna-3.6 jinja2-3.1.3 mpmath-1.3.0 networkx-3.2.1 numpy-1.26.3 pillow-10.2.0 requests-2.31.0 sympy-1.12 torch-2.0.1+cu118 torchvision-0.15.2+cu118 typing-extensions-4.9.0 urllib3-2.1.0

[notice] A new release of pip available: 22.3.1 -> 23.3.2
[notice] To update, run: Y:\SD1\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Installing clip
Installing open_clip
Cloning Stable Diffusion into Y:\SD1\stable-diffusion-webui\repositories\stable-diffusion-stability-ai...
Cloning into 'Y:\SD1\stable-diffusion-webui\repositories\stable-diffusion-stability-ai'...
remote: Enumerating objects: 580, done.
remote: Counting objects: 100% (580/580), done.
remote: Compressing objects: 100% (311/311), done.
remote: Total 580 (delta 279), reused 452 (delta 248), pack-reused 0
Receiving objects: 100% (580/580), 73.44 MiB | 15.95 MiB/s, done.

Resolving deltas: 100% (279/279), done.
Cloning Stable Diffusion XL into Y:\SD1\stable-diffusion-webui\repositories\generative-models...
Cloning into 'Y:\SD1\stable-diffusion-webui\repositories\generative-models'...
remote: Enumerating objects: 860, done.
remote: Counting objects: 100% (489/489), done.
remote: Compressing objects: 100% (224/224), done.
remote: Total 860 (delta 368), reused 265 (delta 265), pack-reused 371
Receiving objects: 100% (860/860), 42.67 MiB | 23.98 MiB/s, done.
Resolving deltas: 100% (445/445), done.
Cloning K-diffusion into Y:\SD1\stable-diffusion-webui\repositories\k-diffusion...
Cloning into 'Y:\SD1\stable-diffusion-webui\repositories\k-diffusion'...
remote: Enumerating objects: 1329, done.
remote: Counting objects: 100% (611/611), done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 1329 (delta 568), reused 538 (delta 530), pack-reused 718
Receiving objects: 100% (1329/1329), 239.04 KiB | 2.88 MiB/s, done.

Resolving deltas: 100% (931/931), done.
Cloning CodeFormer into Y:\SD1\stable-diffusion-webui\repositories\CodeFormer...
Cloning into 'Y:\SD1\stable-diffusion-webui\repositories\CodeFormer'...
remote: Enumerating objects: 594, done.
remote: Counting objects: 100% (245/245), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 594 (delta 175), reused 173 (delta 157), pack-reused 349
Receiving objects:  98% (583/594), 9.71 MiB | 19.40 MiB/s
Receiving objects: 100% (594/594), 17.31 MiB | 24.17 MiB/s, done.
Resolving deltas: 100% (286/286), done.
Cloning BLIP into Y:\SD1\stable-diffusion-webui\repositories\BLIP...
Cloning into 'Y:\SD1\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
objects:  99% (275/277), 2.60 MiB | 5.18 MiB/s
Receiving objects: 100% (277/277), 7.03 MiB | 8.15 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Installing requirements for CodeFormer
Installing requirements
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Style database not found: Y:\SD1\stable-diffusion-webui\styles.csv
Downloading: "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" to Y:\SD1\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors

100%|█████████████████████████████████████| 3.97G/3.97G [01:56<00:00, 36.7MB/s]
Calculating sha256 for Y:\SD1\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors: Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 349.0s (prepare environment: 216.1s, import torch: 5.2s, import gradio: 2.1s, setup paths: 2.6s, initialize shared: 0.4s, other imports: 2.6s, setup codeformer: 0.3s, list SD models: 116.6s, load scripts: 2.2s, create ui: 0.4s, gradio launch: 0.4s).
6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa
Loading weights [6ce0161689] from Y:\SD1\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: Y:\SD1\stable-diffusion-webui\configs\v1-inference.yaml
Applying attention optimization: Doggettx... done.
Model loaded in 8.9s (calculate hash: 4.8s, load weights from disk: 0.2s, create model: 0.5s, apply weights to model: 2.0s, apply half(): 1.0s, calculate empty prompt: 0.3s).

Additional information

version: v1.7.0  •  python: 3.10.9  •  torch: 2.0.1+cu118  •  xformers: N/A  •  gradio: 3.41.2  •  checkpoint: 6ce0161689

w-e-w commented 9 months ago

Use Browser F12 Debug to see what is not loading image

daryldejori commented 9 months ago

Thanks for the quick response and apologies or not specifying this. The network tab in firebug reveals that all is loaded correctly (200 codes) and there are no errors so far. I'm attaching the har file (zipped as har is not supported firebug_har_file.zip ). Also, I have no extensions installed - it is starting straight away with a broken layout.

light-and-ray commented 9 months ago

You need to clear cache in your browser (not cookies!!)

w-e-w commented 9 months ago

you mean like Ctrl + F5?

daryldejori commented 9 months ago

I already used several browsers and tried to clear the cache as well. Use incognito mode with no browser extensions, etc. But no luck so far.

daryldejori commented 9 months ago

I wonder if the Style database not found: Y:\SD1\stable-diffusion-webui\styles.csv is the culprit. But as I see, it is related to the models not the UI itself.

venv "Y:\SD1\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)] Version: v1.7.0 Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e Launching Web UI with arguments: no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. Style database not found: Y:\SD1\stable-diffusion-webui\styles.csv "Disable all extensions" option was set, will not load any extensions Loading weights [6ce0161689] from Y:\SD1\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors Running on local URL: http://127.0.0.1:7860 Creating model from config: Y:\SD1\stable-diffusion-webui\configs\v1-inference.yaml

To create a public link, set share=True in launch(). Startup time: 14.7s (prepare environment: 2.8s, import torch: 4.1s, import gradio: 1.8s, setup paths: 1.6s, initialize shared: 0.3s, other imports: 1.4s, setup codeformer: 0.1s, scripts list_optimizers: 1.5s, create ui: 0.4s, gradio launch: 0.6s). Applying attention optimization: Doggettx... done. Model loaded in 4.6s (load weights from disk: 0.5s, create model: 0.4s, apply weights to model: 2.4s, apply half(): 0.9s, calculate empty prompt: 0.2s).

w-e-w commented 9 months ago

I wonder if the Style database not found: Y:\SD1\stable-diffusion-webui\styles.csv is the culprit.

no

that's file is used for storing prompt styles, it just tells you it's not found and it will be created if you added your own styles

light-and-ray commented 9 months ago

idk, i had this problem on android, and cleared apk cache. I don't know what is the equivalent of apk cache in desktop browser

daryldejori commented 9 months ago

I'm attaching the actual source code from the index. It seems to me that the index-xx.css are not loaded or imported anywhere in the file=style.css?1705953914.7966385. I also couldn't find any broken link in the styles. Very weird. view-source_127.0.0.1_7860.zip

w-e-w commented 9 months ago

did you solve it? what's the cause

daryldejori commented 9 months ago

Apologies for accidentally closing it. The issue is still persisting but I suppose it is a local issue. It happens with all similar apps (Gradio Apps - Focuus, etc. ComfyUI) across all browsers (Chrome, Firefox, Edge) on this system.

Do you have any suggestions that could help in debugging the cause?

w-e-w commented 9 months ago

It happens with all similar apps (Gradio Apps - Focuus, etc. ComfyUI) across all browsers (Chrome, Firefox, Edge) on this system.

since you have multiple things that are experiencing similar issues it is unlikely that the issue is within webui have you tried disabling adblock firewall antivirus

what happens if you connect to web UI using your phone?

--listen

daryldejori commented 9 months ago

Thanks for the hint. Things are getting complicated now (see screenshot) 1706373319129 . The issue remains the same when accessed locally on an Android 13 device running Chrome. What could be a local system component that causes this isseu (Windows 10 Pro)?

w-e-w commented 9 months ago

to be honest I'm out of ideas

since there's no obvious connection issues on browser side I'm guessing that this is something server side

maybe somehow it's blocked by some sort of firewall rule or antivirus setting the antivirus can also decides to quarantine some weuiI files are "damaged" webui but if it's the case I think it likely won't even launch

this is me guessing randomly


FYI the index-xx.css stuff should be gradio built-in stuff

daryldejori commented 9 months ago

Thanks for your input. I tried to disable the firewall and antivirus but no luck so far. I suppose that's a dead end then.

w-e-w commented 9 months ago

confirm, did you try disabling antivirus AND THEN re-install? like if the antiverse remove some files it's permanent, you need to reinstall to make them come back

daryldejori commented 9 months ago

Yes. Just tried it again with AV/FW completely deactivated. Checked the logs as well - no success, same results. StableSwarmUI works fine. Basically, I think it has to do with Gradio. I am confused that noone else is experiencing this issue tho.

w-e-w commented 9 months ago

the closest thing I got is this and I only managed to get this by a strange combination of killing the server and reloading the webpage image

daryldejori commented 9 months ago

It's indeed very strange and I spent another few hours on finding the issue.

So far we can exclude that:

It may have to do with an external compontent that is required on Windows. Are there any .NET or other frameworks that need to be installed to run Gradio apps? Currently I am looking into a potential faulty cache from Gradio.