mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Remove try/except in img metadata read
This commit is contained in:
parent
7a1bbf99da
commit
60062b51d8
@ -668,10 +668,7 @@ def read_info_from_image(image):
|
|||||||
for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif',
|
for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif',
|
||||||
'loop', 'background', 'timestamp', 'duration', 'progressive', 'progression',
|
'loop', 'background', 'timestamp', 'duration', 'progressive', 'progression',
|
||||||
'icc_profile', 'chromaticity']:
|
'icc_profile', 'chromaticity']:
|
||||||
try:
|
|
||||||
items.pop(field, None)
|
items.pop(field, None)
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if items.get("Software", None) == "NovelAI":
|
if items.get("Software", None) == "NovelAI":
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user