diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2024-01-12 17:22:32 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2024-01-14 08:57:26 +0000 |
commit | cfb90a938eff6d5d4cfa39f58ebc0ab32ffedfb3 (patch) | |
tree | e6e0c3c7fd8e5c09efaa5a099d0cf908a2e429ce /modules/txt2img.py | |
parent | 92501d4f8006866cec3438c038e1588315d835bc (diff) | |
download | stable-diffusion-webui-gfx803-cfb90a938eff6d5d4cfa39f58ebc0ab32ffedfb3.tar.gz stable-diffusion-webui-gfx803-cfb90a938eff6d5d4cfa39f58ebc0ab32ffedfb3.tar.bz2 stable-diffusion-webui-gfx803-cfb90a938eff6d5d4cfa39f58ebc0ab32ffedfb3.zip |
allowe hr pass to return multiple images
Diffstat (limited to 'modules/txt2img.py')
-rw-r--r-- | modules/txt2img.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/txt2img.py b/modules/txt2img.py index 11558785..daf8f51a 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -88,18 +88,13 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g new_gallery = []
for i, image in enumerate(gallery):
- fake_image = Image.new(mode="RGB", size=(1, 1))
-
if i == gallery_index:
- already_saved_as = getattr(processed.images[0], 'already_saved_as', None)
- if already_saved_as is not None:
- fake_image.already_saved_as = already_saved_as
- else:
- fake_image = processed.images[0]
+ geninfo["infotexts"][gallery_index: gallery_index+1] = processed.infotexts
+ new_gallery.extend(processed.images)
else:
+ fake_image = Image.new(mode="RGB", size=(1, 1))
fake_image.already_saved_as = image["name"]
-
- new_gallery.append(fake_image)
+ new_gallery.append(fake_image)
geninfo["infotexts"][gallery_index] = processed.info
|