aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index c61bbfbd..96f56b0d 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -768,7 +768,11 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
# Create another latent image, this time with a masked version of the original input.
conditioning_mask = conditioning_mask.to(image.device)
- conditioning_image = image * (1.0 - conditioning_mask)
+
+ conditioning_image = image
+ if shared.opts.inpainting_mask_image:
+ conditioning_image = conditioning_image * (1.0 - conditioning_mask)
+
conditioning_image = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(conditioning_image))
# Create the concatenated conditioning tensor to be fed to `c_concat`