AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: The picture in process 90% is normal, but got a gray picture at last(txt2img). decode_first_stage function returned all 0 #7617

Open yufengyao-lingoace opened 1 year ago

yufengyao-lingoace commented 1 year ago

Is there an existing issue for this?

What happened?

I finetuned a stable diffusion v2.1 model, and run it. It looks normal in the progress 90% as follows(Nvidia T4 GPU 16G VRAM):

截屏2023-02-07 下午10 59 47

But when after 97%, it returned a gray picture as follows:

截屏2023-02-07 下午10 59 59

Could you tell me what is the problem?

Steps to reproduce the problem

  1. train a model of myself
  2. generate a picture using sd webui

What should have happened?

get a normal picture

Commit where the problem happens

It seems to have no problem from the text below, but the output is a gray picture: the horrace sitting at a table in lingo room style Negative prompt: the tigoace Steps: 39, Sampler: Euler a, CFG scale: 7, Seed: 2562504435, Size: 768x577, Model hash: 9f58a10c2a, Model: 399

What platforms do you use to access the UI ?

Linux

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

export COMMANDLINE_ARGS="--medvram  --precision full --no-half --disable-nan-check --opt-split-attention"

List of extensions

No

Console logs

(stable-diffusion-webui) ubuntu@us-prod-liveroom-gpu-1:/data/stable-diffusion-webui$ ./webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on ubuntu user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.9.12 (main, Jun  1 2022, 11:38:51) 
[GCC 7.5.0]
Commit hash: ea9bd9fc7409109adcd61b897abc2c8881161256
Installing requirements for Web UI
############################
Launching Web UI with arguments: --medvram --precision full --no-half --disable-nan-check --opt-split-attention
No module 'xformers'. Proceeding without it.
Loading weights [9f58a10c2a] from /data/stable-diffusion-webui/models/Stable-diffusion/399.ckpt
Creating model from config: /data/stable-diffusion-webui/models/Stable-diffusion/399.yaml
LatentDiffusion: Running in v-prediction mode
DiffusionWrapper has 865.91 M params.
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0): 
Model loaded in 36.6s (load weights from disk: 12.2s, create model: 22.8s, apply weights to model: 0.3s, load VAE: 0.9s, move model to device: 0.3s).
Running on local URL:  http://10.0.1.174:7860
Running on public URL: https://422b7689-37a1-4c60.gradio.live
This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:12<00:00,  1.55it/s]
██████████████████████████████████████████████████████████████████████| 20/20 [00:08<00:00,  2.12it/s]
Total progress: 100%|███████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:15<00:00,  1.28it/s]

Additional information

No response

ntr-forage commented 1 year ago

I had this issue after upgrading nvidia drivers; I went from 515 to 525, downgraded back to 515 thinking it was the cause of the issue but it persisted.

In the end I just had to reload the model checkpoint through the dropdown and it started working again.

hope this helps

PGTBoos commented 1 year ago

It might be that LoRa file was used instead of a checkpoint I moved some files and have it no longer

Outlook voor Android downloadenhttps://aka.ms/ghei36


From: Nathan Rashleigh @.> Sent: Wednesday, April 12, 2023 3:55:38 PM To: AUTOMATIC1111/stable-diffusion-webui @.> Cc: PGTBoos @.>; Manual @.> Subject: Re: [AUTOMATIC1111/stable-diffusion-webui] [Bug]: The picture in process 90% is normal, but got a gray picture at last(txt2img). decode_first_stage function returned all 0 (Issue #7617)

I had this issue after upgrading nvidia drivers; I went from 515 to 525, downgraded back to 515 thinking it was the cause of the issue but it persisted.

In the end I just had to reload the model checkpoint through the dropdown and it started working again.

hope this helps

— Reply to this email directly, view it on GitHubhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7617#issuecomment-1505322472, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQQOG3RJJIG37HIKZTJLZTXA2X5VANCNFSM6AAAAAAUUC24VU. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Henry-Sky commented 12 months ago

same problem

Marvellia commented 12 months ago

Yes, I have this too.

ema7569 commented 1 month ago

I'm not exactly sure of that but that can come from the vae you use. Because the vae act as the end of the process. Last time I encountered this problem I switched the vae to automatic and that seem working a bit more good now, I not see this sort of blurry or gray filter applying at the end of the steps. I not tested this deeply, but that a possible way to explore to solve the pbm.