Skip to content

Commit efadd91

Browse files
committed
* (mask_condition < 0.5)
1 parent 721011e commit efadd91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diffusers/pipelines/z_image/pipeline_z_image_controlnet_inpaint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ def __call__(
566566
dtype=self.vae.dtype,
567567
)
568568
height, width = init_image.shape[-2:]
569+
init_image = init_image * (mask_condition < 0.5)
569570
init_image = retrieve_latents(self.vae.encode(init_image), generator=generator, sample_mode="argmax")
570571
init_image = (init_image - self.vae.config.shift_factor) * self.vae.config.scaling_factor
571572
init_image = init_image.unsqueeze(2)

0 commit comments

Comments
 (0)