fix(canvas): create masked latents when None

This commit is contained in:
dunkeroni 2024-03-07 23:39:45 -05:00 committed by psychedelicious
parent 133c90e116
commit 631e789195

View File

@ -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