From 5fd638f14d75a71a37157ded5d33c716ab9eb8ca Mon Sep 17 00:00:00 2001 From: ruocaled Date: Sat, 15 Oct 2022 02:00:46 -0700 Subject: fix download section layout --- modules/ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/ui.py') diff --git a/modules/ui.py b/modules/ui.py index c9b53247..3206113e 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -619,7 +619,7 @@ def create_ui(wrap_gradio_gpu_call): txt2img_preview = gr.Image(elem_id='txt2img_preview', visible=False) txt2img_gallery = gr.Gallery(label='Output', show_label=False, elem_id='txt2img_gallery').style(grid=4) - with gr.Group(): + with gr.Column(): with gr.Row(): save = gr.Button('Save') send_to_img2img = gr.Button('Send to img2img') @@ -834,7 +834,7 @@ def create_ui(wrap_gradio_gpu_call): img2img_preview = gr.Image(elem_id='img2img_preview', visible=False) img2img_gallery = gr.Gallery(label='Output', show_label=False, elem_id='img2img_gallery').style(grid=4) - with gr.Group(): + with gr.Column(): with gr.Row(): save = gr.Button('Save') img2img_send_to_img2img = gr.Button('Send to img2img') -- cgit v1.2.1 From 74a9ee70020ffa2746c82300c533de3f7e523f22 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sat, 15 Oct 2022 17:25:35 +0300 Subject: fix saving images compatibility with gradio update --- modules/ui.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'modules/ui.py') diff --git a/modules/ui.py b/modules/ui.py index 3206113e..b867d40f 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -154,10 +154,7 @@ def save_files(js_data, images, do_make_zip, index): writer.writerow(["prompt", "seed", "width", "height", "sampler", "cfgs", "steps", "filename", "negative_prompt"]) for image_index, filedata in enumerate(images, start_index): - if filedata.startswith("data:image/png;base64,"): - filedata = filedata[len("data:image/png;base64,"):] - - image = Image.open(io.BytesIO(base64.decodebytes(filedata.encode('utf-8')))) + image = image_from_url_text(filedata) is_grid = image_index < p.index_of_first_image i = 0 if is_grid else (image_index - p.index_of_first_image) -- cgit v1.2.1