mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
Merge pull request #15738 from JLipnerPitt/JLipnerPitt-patch-1
Fix AttributeError
This commit is contained in:
commit
c1c4b3fb34
@ -789,7 +789,10 @@ def read_info_from_image(image: Image.Image) -> tuple[str | None, dict]:
|
|||||||
if exif_comment:
|
if exif_comment:
|
||||||
geninfo = exif_comment
|
geninfo = exif_comment
|
||||||
elif "comment" in items: # for gif
|
elif "comment" in items: # for gif
|
||||||
geninfo = items["comment"].decode('utf8', errors="ignore")
|
if isinstance(items["comment"], bytes):
|
||||||
|
geninfo = items["comment"].decode('utf8', errors="ignore")
|
||||||
|
else:
|
||||||
|
geninfo = items["comment"]
|
||||||
|
|
||||||
for field in IGNORED_INFO_KEYS:
|
for field in IGNORED_INFO_KEYS:
|
||||||
items.pop(field, None)
|
items.pop(field, None)
|
||||||
|
Loading…
Reference in New Issue
Block a user