Commit cfb90a93 authored by w-e-w's avatar w-e-w

allowe hr pass to return multiple images

parent 92501d4f
...@@ -88,18 +88,13 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g ...@@ -88,18 +88,13 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g
new_gallery = [] new_gallery = []
for i, image in enumerate(gallery): for i, image in enumerate(gallery):
fake_image = Image.new(mode="RGB", size=(1, 1))
if i == gallery_index: if i == gallery_index:
already_saved_as = getattr(processed.images[0], 'already_saved_as', None) geninfo["infotexts"][gallery_index: gallery_index+1] = processed.infotexts
if already_saved_as is not None: new_gallery.extend(processed.images)
fake_image.already_saved_as = already_saved_as
else:
fake_image = processed.images[0]
else: else:
fake_image = Image.new(mode="RGB", size=(1, 1))
fake_image.already_saved_as = image["name"] fake_image.already_saved_as = image["name"]
new_gallery.append(fake_image)
new_gallery.append(fake_image)
geninfo["infotexts"][gallery_index] = processed.info geninfo["infotexts"][gallery_index] = processed.info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment