From 631e78919518d3a2f87982d4d0df15bb488eba5e Mon Sep 17 00:00:00 2001 From: dunkeroni Date: Thu, 7 Mar 2024 23:39:45 -0500 Subject: [PATCH] fix(canvas): create masked latents when None --- invokeai/app/invocations/latent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/invocations/latent.py b/invokeai/app/invocations/latent.py index 94cd5a75f0..4bd6303ea9 100644 --- a/invokeai/app/invocations/latent.py +++ b/invokeai/app/invocations/latent.py @@ -684,7 +684,7 @@ class DenoiseLatentsInvocation(BaseInvocation): if self.denoise_mask.masked_latents_name is not None: masked_latents = context.tensors.load(self.denoise_mask.masked_latents_name) else: - masked_latents = None + masked_latents = torch.where(mask < 0.5, 0.0, latents) return 1 - mask, masked_latents, self.denoise_mask.gradient