aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-02 13:41:35 +0300
committerGitHub <noreply@github.com>2022-11-02 13:41:35 +0300
commitbb21a4cb35986d95ec63ace48ce13b75a776f5a5 (patch)
treef5f8e0b45eff327fd8c2a69a8a2e2b9cf85a2fcc /modules
parente6060a7e6b6ec543511b1aa7fcf05f9789484695 (diff)
parent5c864be010b42373e51eac4c6869d561adca4202 (diff)
Merge pull request #3715 from shwang95/master
Fix error caused by EXIF transpose when using custom scripts
Diffstat (limited to 'modules')
-rw-r--r--modules/img2img.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/img2img.py b/modules/img2img.py
index fac010aa..be9f3653 100644
--- a/modules/img2img.py
+++ b/modules/img2img.py
@@ -81,7 +81,8 @@ def img2img(mode: int, prompt: str, negative_prompt: str, prompt_style: str, pro
mask = None
# Use the EXIF orientation of photos taken by smartphones.
- image = ImageOps.exif_transpose(image)
+ if image is not None:
+ image = ImageOps.exif_transpose(image)
assert 0. <= denoising_strength <= 1., 'can only work with strength in [0.0, 1.0]'