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

[Bug]: Live Preview is non-functional

Open DarthMov opened this issue 2 years ago • 18 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

Recently git-pulled to the master-branch. Everything works fine except for the Live Preview window. Generate button reverts back to orange almost instantaneously after clicked, implying the batch is already finished when I can see in the konsole that it's still generating images. The Interupt and Skip buttons appear fr a split secod and then reverts back to generate way too early regardless of what is being generated, the batch number, resolution, whether its on img2img or txt2img, etc. No live preview appears but the final results will still appear as expected.

Steps to reproduce the problem

  1. Go to txt2img/txt2img
  2. Press Generate
  3. Generate button appears too early and live preview does not appear.

See attached video for a reproduction of the bug.

https://user-images.githubusercontent.com/100316723/212816170-9182afc7-1523-42db-88f5-e7e8b661ee5e.mp4

What should have happened?

A live preview of the image generation process should appear.

Commit where the problem happens

e0e80050091ea7f58ae17c69f31d1b5de5e0ae20

What platforms do you use to access UI ?

Other/Cloud

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No response

Additional information, context and logs

I'm using this on a PaperSpace install:

https://rentry.org/865dy

DarthMov avatar Jan 17 '23 05:01 DarthMov

I have the identical issue w/ the exact same install on paperspace.

Also my webui seems to crash if I generate anything bigger than 512x512.

highly-illiquid avatar Jan 17 '23 06:01 highly-illiquid

Same here under colab with standard (512x512) size too.

mykeehu avatar Jan 17 '23 08:01 mykeehu

Same issue here - in the latest pull version, the processing of the image is visible, but when finished then the box is empty again (latest pull) image Images are saved in the correct folder

PhilippSPOTTERON avatar Jan 17 '23 15:01 PhilippSPOTTERON

same exact issue here on colab.

my very very very stupid "second" notebook that symlinks an entire Google Drive folder with a "local" webui install from back in December and launches that still works fine though...

vt-idiot avatar Jan 18 '23 03:01 vt-idiot

I tested with the latest 6faae2323963f9b0e0086a85b9d0472a24fbaa73 version and the error still occurs on colab

mykeehu avatar Jan 18 '23 14:01 mykeehu

I have the identical issue w/ the exact same install on paperspace.

Also my webui seems to crash if I generate anything bigger than 512x512.

reverting back to an older commit (!git checkout 24e21c07108c0691636c0a54bf3936b847102330) fixed the issue with live preview. It's probably a good idea to not update to the latest commit until a good amount of time has passed, or just don't git pull the latest one at all for now.

SmartSelectImage_2023-01-18-15-09-52

DarthMov avatar Jan 18 '23 20:01 DarthMov

I haven't tested it yet, but it's probably the result of this rework. A programmer would review the code, what could be wrong with this revision?

mykeehu avatar Jan 19 '23 06:01 mykeehu

It's a big change, so difficult to review. It might be related to #6898 but I have no real idea how to debug it.

lbeltrame avatar Jan 19 '23 12:01 lbeltrame

Still an issue for me as well.

vt-idiot avatar Jan 22 '23 13:01 vt-idiot

Any of you can check your logs? I'm getting the same issue, but I also have this error showing up in my console: RuntimeError: Input type (c10::Half) and bias type (float) should be the same (full log here)

~~Not sure if it is related, so I wanted to make sure before opening an issue.~~ Nvm that, disabling the live preview completely eliminates the error. I'll dig around and see if I can find a workaround. I'm running on Colab btw.

As4shi avatar Jan 27 '23 15:01 As4shi

@As4shi there was nothing in my logs that would give me any clue as to what was wrong, just a 404 error for what should've been the internal/progress address.

See here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7128#issuecomment-1402579822

Removing --gradio-debug from my launch arguments fixed previews for me, and it brought the progress bar, and Interrupt/Skip buttons back. I have no idea why enabling it breaks the API endpoint for progress...

vt-idiot avatar Jan 27 '23 20:01 vt-idiot

@vt-idiot thanks for the info. Not sure what was wrong in my case tho, it suddenly started working after I switched to another Colab account, even tho I did reset the runtime a couple times in the first one and nothing changed.

As4shi avatar Jan 27 '23 21:01 As4shi

@vt-idiot this trick also "fixed" gradio for me, and I can see events in the console without the option. Weird. I am very happy about it, thanks!

mykeehu avatar Jan 28 '23 17:01 mykeehu

How the heck does live preview still not work on newest version of defoum and automatic? That's half of the fun of using the deforum extension, seeing the preview generate at like 1 frame per second live.

311-code avatar Jan 30 '23 03:01 311-code

I have same problem after reinstalling SD automatic in bat file with argument git pull every time i launch Stable diffusion. It a resonantly new since i updated it two days ago. I read progress bar post at, https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/064983c0adb00cd9e88d2f06f66c9a1d5bc116c3 and Jan,15 update https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/d8b90ac121cbf0c18b1dc9d56a5e1d14ca51e74e . Unfortunately i did not find a source of a problem.

AugAndrey avatar Feb 17 '23 20:02 AugAndrey

I took a look at the devtool, it seems like the progress with the job id return 404 not found....

neo avatar Mar 06 '23 21:03 neo

I took a look at the devtool, it seems like the progress with the job id return 404 not found....

Me, too. How did you solve it

Qhao6 avatar Mar 10 '23 07:03 Qhao6

For me, remove --share got fixed.

syq7970 avatar Mar 11 '23 07:03 syq7970

I fixed this bug, by doing this: edit file: modules/sd_samplers_common.py change line35:

        x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()

to:

        sample2 = sample.to(devices.device, devices.dtype).unsqueeze(0)
        model = sd_vae_approx.model().to(devices.device, devices.dtype)
        x_sample = model(sample2)[0].detach()

tips: be aware of the indentation

Bob-AFei avatar Apr 03 '23 10:04 Bob-AFei

I fixed this bug, by doing this: edit file: modules/sd_samplers_common.py change line35:

        x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()

to:

        sample2 = sample.to(devices.device, devices.dtype).unsqueeze(0)
        model = sd_vae_approx.model().to(devices.device, devices.dtype)
        x_sample = model(sample2)[0].detach()

tips: be aware of the indentation

This fixed it for me. Thanks!

Apocalypse612 avatar May 10 '23 01:05 Apocalypse612

I fixed this bug, by doing this: edit file: modules/sd_samplers_common.py change line35:

        x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()

to:

        sample2 = sample.to(devices.device, devices.dtype).unsqueeze(0)
        model = sd_vae_approx.model().to(devices.device, devices.dtype)
        x_sample = model(sample2)[0].detach()

tips: be aware of the indentation

worked like a charm! 😀

tomy128 avatar Aug 07 '23 15:08 tomy128