From 39ce23f42d9b63eff39c50a0d069a442e6416cf5 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Fri, 23 Sep 2022 22:49:21 +0300 Subject: add the bitton to paste parameters into UI for txt2img, img2img, and pnginfo tabs fixed some [send to..] buttons to work properly with all tabs --- modules/extras.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/extras.py') diff --git a/modules/extras.py b/modules/extras.py index 92569cff..382ffa7d 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -102,6 +102,7 @@ def run_pnginfo(image): return '', '', '' items = image.info + geninfo = '' if "exif" in image.info: exif = piexif.load(image.info["exif"]) @@ -111,13 +112,14 @@ def run_pnginfo(image): except ValueError: exif_comment = exif_comment.decode('utf8', errors="ignore") - items['exif comment'] = exif_comment + geninfo = exif_comment for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif', 'loop', 'background', 'timestamp', 'duration']: items.pop(field, None) + geninfo = items.get('parameters', geninfo) info = '' for key, text in items.items(): @@ -132,4 +134,4 @@ def run_pnginfo(image): message = "Nothing found in the image." info = f"
{message}