AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: 1.6.0 with SDXL still giving black images. #12923

Open ZeroCool22 opened 1 year ago

ZeroCool22 commented 1 year ago

Is there an existing issue for this?

What happened?

https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/13344308/7f231192-83f5-428f-9887-aeade67814ba

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

Create a normal image.

Sysinfo

sysinfo-2023-08-31-18-55.txt

What browsers do you use to access the UI ?

Mozilla Firefox

Console logs

Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 51.9s (prepare environment: 39.5s, other imports: 0.9s, setup codeformer: 0.2s, load scripts: 6.8s, create ui: 4.0s, gradio launch: 0.3s).
Loading VAE weights specified in settings: C:\Users\ZeroCool22\Desktop\Auto3\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Model loaded in 18.7s (load weights from disk: 1.0s, create model: 0.4s, apply weights to model: 15.6s, load VAE: 0.7s, calculate empty prompt: 0.8s).
Calculating sha256 for C:\Users\ZeroCool22\Desktop\Auto3\models\VAE\sdxl_vae.safetensors: 63aeecb90ff7bc1c115395962d3e803571385b61938377bc7089b36e81e92e2e
100%|██████████████████████████████████████████████████████████████████████████████████| 25/25 [00:18<00:00,  1.34it/s]
 80%|█████████████████████████████████████████████████████████████████▌                | 20/25 [00:14<00:03,  1.51it/s]Reusing loaded model sd_xl_base_1.0.safetensors [31e35c80fc] to load sd_xl_refiner_1.0_0.9vae.safetensors [8d0ce6c016]s]
Loading weights [8d0ce6c016] from C:\Users\ZeroCool22\Desktop\Auto3\models\Stable-diffusion\sd_xl_refiner_1.0_0.9vae.safetensors
Creating model from config: C:\Users\ZeroCool22\Desktop\Auto3\repositories\generative-models\configs\inference\sd_xl_refiner.yaml
Loading VAE weights specified in settings: C:\Users\ZeroCool22\Desktop\Auto3\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Model loaded in 16.1s (create model: 0.4s, apply weights to model: 14.9s, load VAE: 0.1s, calculate empty prompt: 0.5s).
100%|██████████████████████████████████████████████████████████████████████████████████| 25/25 [00:37<00:00,  1.50s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 50/50 [00:59<00:00,  1.19s/it]
Reusing loaded model sd_xl_refiner_1.0_0.9vae.safetensors [8d0ce6c016] to load sd_xl_base_1.0.safetensors [31e35c80fc]]
Loading weights [31e35c80fc] from C:\Users\ZeroCool22\Desktop\Auto3\models\Stable-diffusion\sd_xl_base_1.0.safetensors
Creating model from config: C:\Users\ZeroCool22\Desktop\Auto3\repositories\generative-models\configs\inference\sd_xl_base.yaml
Loading VAE weights specified in settings: C:\Users\ZeroCool22\Desktop\Auto3\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Model loaded in 15.8s (create model: 0.4s, apply weights to model: 14.6s, load VAE: 0.1s, calculate empty prompt: 0.6s).
100%|██████████████████████████████████████████████████████████████████████████████████| 25/25 [00:31<00:00,  1.27s/it]
 80%|█████████████████████████████████████████████████████████████████▌                | 20/25 [00:14<00:03,  1.48it/s]Reusing loaded model sd_xl_base_1.0.safetensors [31e35c80fc] to load sd_xl_refiner_1.0_0.9vae.safetensors [8d0ce6c016]s]
Loading weights [8d0ce6c016] from C:\Users\ZeroCool22\Desktop\Auto3\models\Stable-diffusion\sd_xl_refiner_1.0_0.9vae.safetensors
Creating model from config: C:\Users\ZeroCool22\Desktop\Auto3\repositories\generative-models\configs\inference\sd_xl_refiner.yaml
Loading VAE weights specified in settings: C:\Users\ZeroCool22\Desktop\Auto3\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Model loaded in 15.7s (create model: 0.1s, apply weights to model: 14.8s, load VAE: 0.1s, calculate empty prompt: 0.5s).
100%|██████████████████████████████████████████████████████████████████████████████████| 25/25 [00:37<00:00,  1.50s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 50/50 [01:12<00:00,  1.45s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 50/50 [01:12<00:00,  2.06s/it]

Additional information

set COMMANDLINE_ARGS=--xformers --api --disable-nan-check --medvram-sdxl

GutterPump commented 1 year ago

Can you try with the first refiner version ? => sd_xl_refiner_1.0.safetensors

nekhtiari commented 1 year ago

I tried with sd_xl_refiner_1.0.safetensors and didn't work!

ZeroCool22 commented 1 year ago

Can you try with the first refiner version ? => sd_xl_refiner_1.0.safetensors

Fresh installation, no addons, no nothing.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/13344308/fe2d3f0f-7920-441d-b8cc-682e8c506739

pelado-cronica-pelado-trebucq

mobentec commented 1 year ago

Same issue happening with me after updating to 1.6.0.

kamtorocks commented 1 year ago
image

You should set COMMANDLINE_ARGS=--no-half-vae or use sdxl-vae-fp16-fix

If you have enough VRAM, you can avoid switching the VAE model to 16-bit floats. Otherwise, you will need to use sdxl-vae-fp16-fix.

BaiMoHan commented 1 year ago

Same problem here! I used model dreamshaper-xl10, I got a black pic every time. My webUI don't have a column named "SD VAE", I want to know if some settings were be ignored 🥺🥺🥺🥺

kamtorocks commented 1 year ago

Same problem here! I used model dreamshaper-xl10, I got a black pic every time. My webUI don't have a column named "SD VAE", I want to know if some settings were be ignored 🥺🥺🥺🥺

You can add the sd_vae tag in Setting -> User Interface -> Quicksettings list, then Reload UI. You will see the vae selection list at the top.

BaiMoHan commented 1 year ago

Same problem here! I used model dreamshaper-xl10, I got a black pic every time. My webUI don't have a column named "SD VAE", I want to know if some settings were be ignored 🥺🥺🥺🥺

You can add the sd_vae tag in Setting -> User Interface -> Quicksettings list, then Reload UI. You will see the vae selection list at the top.

Thank you! I got this. 👍👍👍

cuajoneta commented 1 year ago

I had the same problem as the author of the thread, I have a 3090 with 24GB and it always had black images with the same arguments from 1.5.2 in the new 1.6.0. I could only get it working by adding --medvram, but I was itching to use --medvram with 24GB, so I kept trying arguments until --disable-model-loading-ram-optimization got it working with the same ones. old 1.5.2 arguments without the --medvram. Long story short, I had to add --disable-model-loading-ram-optimization to the existing arguments to fix the black image problem.

KarhellTwitch commented 1 year ago

I don't know if it's a bug who affect more than 16xx user, so perhpas it can help you

I found a fix for my 1660 Super to work with half precision without any extra parameters (i launch only with ---xformers), perhaps it can help you too with your actual problem, even if it look different (Unet seems completly messy with prompt split/queuing)

Go in settings > Optimizations and check «Pad prompt/negative prompt to be same length» (and save) to try

slashedstar commented 9 months ago

I had the same problem as the author of the thread, I have a 3090 with 24GB and it always had black images with the same arguments from 1.5.2 in the new 1.6.0. I could only get it working by adding --medvram, but I was itching to use --medvram with 24GB, so I kept trying arguments until --disable-model-loading-ram-optimization got it working with the same ones. old 1.5.2 arguments without the --medvram. Long story short, I had to add --disable-model-loading-ram-optimization to the existing arguments to fix the black image problem.

Thank you so much for this, finally fixed it

SMMSSMMS2 commented 7 months ago

And me help this setting set COMMANDLINE_ARGS=--autolaunch --theme dark --xformers --disable-safe-unpickle --lowvram