mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-25 11:21:05 -08:00
Add files via upload
Fixed an error (AttributeError: 'str' object has no attribute 'decode') coming from line 792 in images.py when trying to upscale certain images.
This commit is contained in:
parent
1c0a0c4c26
commit
e736c3b36b
1 changed files with 4 additions and 1 deletions
|
|
@ -789,7 +789,10 @@ def read_info_from_image(image: Image.Image) -> tuple[str | None, dict]:
|
|||
if exif_comment:
|
||||
geninfo = exif_comment
|
||||
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:
|
||||
items.pop(field, None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue