Unverified Commit 855f83f9 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge pull request #10041 from AUTOMATIC1111/print-exception-#9219

print PIL.UnidentifiedImageError
parents d1d7dd2a 14e55a33
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)