InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[enhancement]: Display image while generating next image

Open kasbah opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What should this feature add?

I noticed while generating batches of images the web UI would show me the loading "intermediate" image rather than letting me take a look at the most recent fully generated image. I think in general it would be nice to keep looking at the latest fully generated image rather than watch the "intermediate" image being formed. It could be an option at the very least

I went ahead and played around with implementing this but noticed when generating batches the server is completely blocked on generating the next image. It won't even respond to the http request to show the latest fully generated image.

As far as I can tell the server first need to be made non-blocking. I would reach for either multiprocessing or asyncio to achieve that. Happy to hear any suggestions on this though.

kasbah avatar Dec 22 '22 11:12 kasbah

Hello @kasbah, have you checked the settings page?

image

I have disabled the option Display In-Progress Images, so the Web UI is always showing me the last image created now.

wbecher avatar Dec 22 '22 12:12 wbecher

Thanks, I hadn't seen that. That solves it for case when I am generating a single image. However there still seems to be a problem when generating a batch of images. Here I am generating a batch of 2 images:

image

(Testing on a CPU, don't mind the low step count and blurry images.)

When the first image is already on disk. It shows a blank image in the sidebar and doesn't switch to it. At this point I believe the server is not responding to the image request.

image

Only when both images are done can you see any of the new images:

image

kasbah avatar Dec 22 '22 13:12 kasbah

Well, that`s odd. For me, the new thumb image in the gallery only shows after the new image is generated. I do not see an empty square at any moment. Even when generating a batch of 10 images.

wbecher avatar Dec 22 '22 14:12 wbecher

Ah, it seems to have been because I was testing on my laptop CPU. I just tried it on a VPS with a GPU and it does indeed show the first image while the next one is processing. Thanks for your help!

kasbah avatar Dec 23 '22 11:12 kasbah