diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-05-25 12:33:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 12:33:40 +0000 |
commit | 60062b51d821411e8830f321a39ee473431c4535 (patch) | |
tree | e56b83c2377a51fda5050cec2397d246e2c2d146 | |
parent | 7a1bbf99da7c9bad866a50890221e4e539e1025d (diff) | |
download | stable-diffusion-webui-gfx803-60062b51d821411e8830f321a39ee473431c4535.tar.gz stable-diffusion-webui-gfx803-60062b51d821411e8830f321a39ee473431c4535.tar.bz2 stable-diffusion-webui-gfx803-60062b51d821411e8830f321a39ee473431c4535.zip |
Remove try/except in img metadata read
-rw-r--r-- | modules/images.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/images.py b/modules/images.py index d1801355..93252f41 100644 --- a/modules/images.py +++ b/modules/images.py @@ -668,10 +668,7 @@ def read_info_from_image(image): for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif',
'loop', 'background', 'timestamp', 'duration', 'progressive', 'progression',
'icc_profile', 'chromaticity']:
- try:
- items.pop(field, None)
- except KeyError:
- pass
+ items.pop(field, None)
if items.get("Software", None) == "NovelAI":
try:
|