stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: batch images disappear right after generation

Open askAvoid opened this issue 1 year ago • 4 comments
trafficstars

Checklist

  • [X] The issue exists after disabling all extensions
  • [X] The issue exists on a clean installation of webui
  • [ ] 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
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

images generated in batch (count or size >1) disappear from the screen ~1 second after generation. they are still saved to the output directory, however.

single images remain on the screen and can be interacted with.

Steps to reproduce the problem

generate txt2img in batch, either batch count or batch size of 2+

What should have happened?

the generated images remain on screen and can be interacted with

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

Not really sure it's relevant here.

Console logs

################################################################                                                             
Install script for stable-diffusion + Web UI                                                                                 
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.                                                  
################################################################                                                             
                                                                                                                             
################################################################                                                             
Running on askavoid user                                                                                                     
################################################################                                                             
                                                                                                                             
################################################################                                                             
Repo already cloned, using it as install directory                                                                           ################################################################                                                             
                                                                                                                             
################################################################                                                             
Create and activate python venv                                                                                              
################################################################                                                             
                                                                                                                             
################################################################                                                             
Launching launch.py...                                                                                                       ################################################################                                                             
glibc version is 2.39                                                                                                        
Check TCMalloc: libtcmalloc_minimal.so.4                                                                                     
libtcmalloc_minimal.so.4 is linked with libc.so,execute LD_PRELOAD=/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4            
Python 3.10.14 (main, Mar 21 2024, 16:24:04) [GCC 11.2.0]                                                                    
Version: v1.9.3                                                                                                              
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0      
Launching Web UI with arguments: --skip-torch-cuda-test --opt-sdp-attention
no module 'xformers'. Processing without...                                                                                  
no module 'xformers'. Processing without...                                                                                  
No module 'xformers'. Proceeding without it.                                                                                 
==============================================================================                                               
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.                                                         
==============================================================================                                               
Loading weights [835d65144c] from /home/askavoid/build/stable-diffusion-webui/models/Stable-diffusion/zavychromaxl_v60.safete
nsors                                                                                                                        Running on local URL:  http://127.0.0.1:7860                                                                                 
                                                                                                                             
To create a public link, set `share=True` in `launch()`.                                                                     
Startup time: 3.7s (import torch: 1.5s, import gradio: 0.7s, setup paths: 0.4s, initialize shared: 0.1s, other imports: 0.2s,
 load scripts: 0.3s, create ui: 0.3s).                                                                                       
Creating model from config: /home/askavoid/build/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_x
l_base.yaml                                                                                                                  
/home/askavoid/miniconda3/envs/python/lib/python3.10/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to 
force a new download, use `force_download=True`.                                                                             
  warnings.warn(                                                                                                             
Applying attention optimization: sdp... done.                                                                                
Model loaded in 1.8s (load weights from disk: 0.4s, create model: 0.3s, apply weights to model: 1.0s).                       
100%|████████████████████████████████████████████████████████████████████████████████████████| 50/50 [00:40<00:00,  1.23it/s]

Additional information

Brand new build, brand new Ubuntu 24 LTS install.

askAvoid avatar May 04 '24 16:05 askAvoid

I feel like you might have Do not show any images in gallery enabled but I can't know because if this is the case as

Sysinfo Not really sure it's relevant here.

and it is working in 1.9

image

w-e-w avatar May 05 '24 06:05 w-e-w

Is the default behavior not to show images? Because that would surprise me, and I did not explicitely change the setting.

After a few hundred gens, the problem seems to only happen 4/5 times, the other 20% the gallery is shown as expected. So this feels like a bug than a feature option.

askAvoid avatar May 05 '24 15:05 askAvoid

Is the default behavior not to show images? Because that would surprise me, and I did not explicitely change the setting.

no the default is to show (Do not show any images in gallery disabled) but accidental click does happen from time to time

only happen 4/5 time

that sounds more like a bug now but with any bug we first need to recreate the bug in order to be able to fix it

and this

Sysinfo Not really sure it's relevant here.

is not helping Sysinfo contain lots of information including information that we can use to try and retreat your setup

w-e-w avatar May 05 '24 16:05 w-e-w

This happens on a brand new machine I built as well. 2, sometimes even 4, images can render in a grid just fine. But if I push it to 6 or 8 per batch, the images generate but just do not show up in the UI.

Same problem for video diffusion.

askAvoid avatar May 19 '24 15:05 askAvoid

I experience the same issue in forge and have raised https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/796

It seems to do with the amount of VRAM the operation takes, but I could be mistaken.

askAvoid avatar Jun 07 '24 22:06 askAvoid

I don't think I ever seen this happen myself the issue with this sort of thing is that if we cannot reproduce it we can't fix it sorry...

if the image has been saved then vram should have nothing to do with it

send Sysinfo even though you think that is not relevant but your other words says otherwise as you are already suspecting vram if you have posted your Sysinfo, we will have info on your system including GPU and VRAM (even though I doubt that this has anything to do with it), your settings which I think it's might be more important etc

I have a couple of theories that I want to check

  • I want you to send a sample of image that is wasn't showing in UI (maybe something is weird in the image)
  • what is the full path and name of image that was not showing
  • try disabling live preview (since you haven't post sysinfo I don't know if you have enabled or not)

w-e-w avatar Jun 07 '24 22:06 w-e-w

Thank you for the detailed response!

I hesitated to include sysinfo because I can reproduce this issue on two separate machines (AMD and NVIDIA), and I am overly privacy-conscious, but point well taken - once I'm back home, I will get those for you.

Indeed, the application is not OOM and images are being saved/processed as expected. I'm Ryzen 9 7900X3D / RTX 4090 and generating modest images of chairs at 1024x1024 resolution. No live preview and default output paths ($HOME/git/stable-diffusion-webui/output)

If I'm the only one with this problem, don't sweat it. I just wanted to get it filed in case others are experiencing the same. Have a great weekend!

askAvoid avatar Jun 08 '24 00:06 askAvoid

There's also another thing that I would like you to try Try a different browser see if Maybe there is a weird JavaScript compatibility issue with the browser

Also Open the browser debug console F12 And check if there's anything weird such as connection 404 Or are there any weird JavaScript errors inside the console Also see if you can see what is the state of elements

To be honest this seems like more of a client side ever and other server side one But it's hard to tell because well like I said I can't reproduce it I'm suspecting for whatever reason that the client (web page) decides to randomly remove the displayed image


It is possible that you have some sort of browser extension that can be doing this

w-e-w avatar Jun 08 '24 07:06 w-e-w

@w-e-w you are so right; I'm foolish for not having checked for a client-side issue sooner.

Vanilla firefox and chrome both work as expected, even with batches of 4 and highres enabled. It must be a firefox profile setting I changed!

Thank you again for your patience with befuddled users such as myself. We are lucky to have your support.

askAvoid avatar Jun 08 '24 22:06 askAvoid

great let me know if you ever find out the actual cause

w-e-w avatar Jun 08 '24 22:06 w-e-w