Re-introduce latent blending step from the vanilla inpainting procedure.

This commit is contained in:
CodeHatchling 2023-12-04 17:41:18 -07:00
parent 1455159cf4
commit 57f29bd61d

View File

@ -1597,6 +1597,9 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
samples = self.sampler.sample_img2img(self, self.init_latent, x, conditioning, unconditional_conditioning, image_conditioning=self.image_conditioning)
if self.mask is not None and self.soft_inpainting is None:
samples = samples * self.nmask + self.init_latent * self.mask
del x
devices.torch_gc()