Fixed mask+masked_image in sd inpaint pipeline (#1516)
* Fixed mask+masked_image in sd inpaint pipeline Those were left unset when inputs are not PIL images * Fixed formatting
This commit is contained in:
parent
769f0be8fb
commit
3ad49eeedd
|
@ -632,6 +632,9 @@ class StableDiffusionInpaintPipeline(DiffusionPipeline):
|
|||
# 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)
|
||||
|
|
Loading…
Reference in New Issue