diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-15 14:25:35 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-15 17:09:45 +0000 |
commit | 74a9ee70020ffa2746c82300c533de3f7e523f22 (patch) | |
tree | 9bb09782c4d8d0f77dc5bd9e0ea1256d5ec988cc /modules/ui.py | |
parent | 606519813dd998140a741096f9029c732ee52d2a (diff) | |
download | stable-diffusion-webui-gfx803-74a9ee70020ffa2746c82300c533de3f7e523f22.tar.gz stable-diffusion-webui-gfx803-74a9ee70020ffa2746c82300c533de3f7e523f22.tar.bz2 stable-diffusion-webui-gfx803-74a9ee70020ffa2746c82300c533de3f7e523f22.zip |
fix saving images compatibility with gradio update
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 5 |
1 files changed, 1 insertions, 4 deletions
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)
|