print PIL.UnidentifiedImageError
This commit is contained in:
AUTOMATIC1111 2023-05-08 09:12:56 +03:00 committed by GitHub
commit 855f83f92c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):
try:
img = Image.open(image)
except UnidentifiedImageError:
except UnidentifiedImageError as e:
print(e)
continue
# Use the EXIF orientation of photos taken by smartphones.
img = ImageOps.exif_transpose(img)