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

Outpainting script does not save multiple images when using batch sliders

Open illtellyoulater opened this issue 1 year ago • 8 comments

When using the batch-count slider and the batch-size slider, the outpainting script does not save multiple images, but just the first one.

Looking at the console window we can see the actual processing is happening for all the N images (batch-count * batch-size), but at the end of the process only the first one is saved to disk.

illtellyoulater avatar Sep 22 '22 18:09 illtellyoulater

+1 hoping this gets fixed soon. Having to manually generate one image at a time is no fun when I need to generate a lot of them.

gibsonfan2332 avatar Oct 03 '22 23:10 gibsonfan2332

+1, totally agree with @gibsonfan2332

morganavr avatar Oct 05 '22 14:10 morganavr

2 weeks and problem still persists. :/

Same issue happening here, it's very frustrating as it makes outpainting tedious and not very useful (considering you will almost always have to generate quite a few pictures before getting the right one).

I hope this is resolved soon!

Ainaemaet avatar Oct 09 '22 04:10 Ainaemaet

Why has this been labelled an enhancement when it's clearly a bug? I too would love for this to be fixed.

Somasonic avatar Oct 12 '22 04:10 Somasonic

@AUTOMATIC1111 could you please relabel this as a bug so it can get some more attention?

illtellyoulater avatar Oct 14 '22 02:10 illtellyoulater

i even could not find the outpainting option in the ui ?

dashy84 avatar Oct 20 '22 04:10 dashy84

@dashy84 it's at the bottom of the txt2img screen, in the script dropdown menu.

illtellyoulater avatar Oct 20 '22 04:10 illtellyoulater

New PR to implement batch count & batch size #3244

wywywywy avatar Oct 20 '22 16:10 wywywywy

I believe I have some useful info on why this happens. I've been able to replicate the issue in two completely separate environments. If I generate a single image, it works, but throws an error to the console. If I push the batch count higher than 1, it won't write any output file, but throws the same error back at the console when you interrupt the run.

Error completing request Arguments: (0, 'prompt goes here', '', 'None', 'None', <PIL.Image.Image image mode=RGB size=512x512 at 0x7F501469AEE0>, None, None, None, 0, 20, 0, 4, 1, False, False, 100, 1, 7, 0.01, -1.0, -1.0, 0, 0, 0, False, 512, 512, 0, False, 32, 0, '', '', 3, '<ul>\n<li><code>CFG Scale</code> should be 2 or lower.</li>\n</ul>\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, '<p style="margin-bottom:0.75em">Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8</p>', 128, 8, ['down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, False, '', '<p style="margin-bottom:0.75em">Will upscale the image to twice the dimensions; use width and height sliders to set tile size</p>', 64, 0, 1, '', 0, '', True, False, False) {} Traceback (most recent call last): File "/home/studio-lab-user/stable-diffusion-webui/modules/ui.py", line 185, in f res = list(func(*args, **kwargs)) File "/home/studio-lab-user/stable-diffusion-webui/webui.py", line 54, in f res = func(*args, **kwargs) File "/home/studio-lab-user/stable-diffusion-webui/modules/img2img.py", line 137, in img2img processed = modules.scripts.scripts_img2img.run(p, *args) File "/home/studio-lab-user/stable-diffusion-webui/modules/scripts.py", line 296, in run processed = script.run(p, *script_args) File "/home/studio-lab-user/stable-diffusion-webui/scripts/outpainting_mk_2.py", line 263, in run imgs = expand(imgs, batch_size, down, is_bottom=True) File "/home/studio-lab-user/stable-diffusion-webui/scripts/outpainting_mk_2.py", line 241, in expand output_images[n].paste(proc.images[n], (0 if is_left else output_images[n].width - proc.images[n].width, 0 if is_top else output_images[n].height - proc.images[n].height)) IndexError: list index out of range

GitchNZ avatar Dec 06 '22 09:12 GitchNZ

This should be implemented now.

ClashSAN avatar May 01 '23 20:05 ClashSAN