diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py index b3269714cdf7..bc416f57d3e0 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py @@ -632,6 +632,9 @@ def __call__( # 4. Preprocess mask and image if isinstance(image, PIL.Image.Image) and isinstance(mask_image, PIL.Image.Image): mask, masked_image = prepare_mask_and_masked_image(image, mask_image) + else: + mask = mask_image + masked_image = image * (mask < 0.5) # 5. set timesteps self.scheduler.set_timesteps(num_inference_steps, device=device)