AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Unexpected behavior #13473

Open AndreyRGW opened 1 year ago

AndreyRGW commented 1 year ago

Is there an existing issue for this?

What happened?

This will be quite a long story, there will probably be a lot of errors in understanding and language, since I am not a native English speaker from birth. Two bugs will be discussed here: the bug with the VAE hash and the bug with the inability to replicate your own generated images.

Basic specifications: WebUI version (dev) - v1.6.0-199-ge3c849da, commit - e3c849da0686377296b2276c6981179a11941586 GPU - RTX 2060 12GB, 537.13 CUDA - 11.8 Torch - 2.0.1+cu118 Xformers - 0.0.20 CPU - R5 5600X RAM - 32GB Model - epicphotogasm_x (1.5) VAE - vae-ft-mse-840000-ema-pruned.

So, I guess we'll start with the first bug (the weirdest one) - the inability to replicate my generated images. On 01.10.2023 (October 1) I was quietly generating images, working in photoshop, etc., and then I get a blue screen of death. I restart my computer, start stable diffusion again and realize that I can no longer repeat the images I generated a few minutes before the blue screen of death. The weirdness doesn't end there, because I can replicate the images I generated on 30.09.2023 (September 30) absolutely exactly the same, without any difference.

Now, bug number 2 is the VAE hash. For some reason, Stable Diffusion doesn't count the VAE hash as it should. When switching VAEs, it doesn't count the hash for each new VAE, it remembers the hash of one VAE and doesn't change it. I switched from SDXL to 1.5 and changed the VAE from SDXL to mse-840000, but the hash, including in the metadata of the generated images remained from the SDXL VAE!

No changes were made to the Stable Diffusion settings or to the system!

I don't know if bug number 1 is related to bug number 2, because images made two days earlier I can replicate, but images made one day earlier I can't.

If you know how to solve this, I very much ask you to help me. Thank you in advance.

Steps to reproduce the problem

I don't know if it's possible to repeat bug 1, but bug 2 is possible:

1) Find out the hash of two different VAEs 2) Swap one VAE for another, generate an image and write the hash from the metadata. 3) Swap one VAE for another, generate the image again, and see that the hash hasn't changed.

What should have happened?

The image should have repeated exactly the same.

Sysinfo

sysinfo-2023-10-02-14-51.txt

What browsers do you use to access the UI ?

Microsoft Edge

Console logs

venv "F:\WBC\automatic1111_dev\venv\Scripts\Python.exe"
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Version: v1.6.0-199-ge3c849da
Commit hash: e3c849da0686377296b2276c6981179a11941586
Installing requirements
Faceswaplab : Use GPU requirements
Checking faceswaplab requirements
Install onnxruntime-gpu>=1.15.0
Installing sd-webui-faceswaplab requirement: onnxruntime-gpu>=1.15.0
4.347799099999975
Launching Web UI with arguments: --xformers --medvram-sdxl
F:\WBC\automatic1111_dev\venv\lib\site-packages\torchaudio\backend\utils.py:74: UserWarning: No audio backend is available.
  warnings.warn("No audio backend is available.")
Skipping broken symlink: F:\WBC\automatic1111_dev\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 23.9.3, num models: 9
2023-10-02 17:47:37,131 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: F:\WBC\automatic1111_dev\extensions\sd-webui-controlnet\annotator\downloads
2023-10-02 17:47:37,301 - ControlNet - INFO - ControlNet v1.1.410
Loading FABRIC v0.6.1
[sd-webui-freeu] Controlnet support: *enabled*
[Vec. CC] Style Sheet Loaded...
Loading weights [8635af1c8c] from F:\WBC\automatic1111_dev\models\Stable-diffusion\epicphotogasm_x.safetensors
Creating model from config: F:\WBC\automatic1111_dev\configs\v1-inference.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 71.0s (prepare environment: 56.3s, import torch: 3.8s, import gradio: 1.0s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 2.4s, setup codeformer: 0.2s, list SD models: 0.2s, load scripts: 4.4s, create ui: 1.0s, gradio launch: 0.5s).
Loading VAE weights specified in settings: F:\WBC\automatic1111_dev\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: xformers... done.
Model loaded in 8.6s (load weights from disk: 0.9s, create model: 0.9s, apply weights to model: 5.0s, load VAE: 1.3s, load textual inversion embeddings: 0.1s, calculate empty prompt: 0.4s).
Skipping broken symlink: F:\WBC\automatic1111_dev\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors
Skipping broken symlink: F:\WBC\automatic1111_dev\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors
100%|██████████████████████████████████████████████████████████████████████████████████| 36/36 [00:07<00:00,  4.61it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 36/36 [00:06<00:00,  5.19it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 36/36 [00:06<00:00,  6.13it/s]

Additional information

No response

AndreyRGW commented 1 year ago

I will attach 2 images for example, one was generated on October 1, the other on October 2 - today. The metadata has been preserved.

https://drive.google.com/drive/folders/1BAdzwbeDKXkU2YaDxjnpX0Ux-DnmkBtS?usp=sharing

I really hope you can help me, otherwise I'm just going crazy. Stable Diffusion started generating worse after that unfortunate blue screen of death and I have no explanation why it got worse.