Skip to content

Commit bb21a4c

Browse files
Merge pull request #3715 from shwang95/master
Fix error caused by EXIF transpose when using custom scripts
2 parents e6060a7 + 5c864be commit bb21a4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/img2img.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ def img2img(mode: int, prompt: str, negative_prompt: str, prompt_style: str, pro
8181
mask = None
8282

8383
# Use the EXIF orientation of photos taken by smartphones.
84-
image = ImageOps.exif_transpose(image)
84+
if image is not None:
85+
image = ImageOps.exif_transpose(image)
8586

8687
assert 0. <= denoising_strength <= 1., 'can only work with strength in [0.0, 1.0]'
8788

0 commit comments

Comments
 (0)