From 8287164e9fed628afdbf149a60097088cfaa8445 Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Mon, 21 Apr 2025 17:12:55 -0600 Subject: [PATCH] Fixed issue with partial denoising of latents. --- __init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index 15e7bc7..655063b 100644 --- a/__init__.py +++ b/__init__.py @@ -381,14 +381,17 @@ class Flex2Conditioner: device='cpu', dtype=torch.float32 ) - - out_latent = { - "samples": torch.zeros( - (batch_size, 16, latent_height, latent_width), - device='cpu', - dtype=torch.float32 - ) - } + + if latent is not None: + out_latent = latent + else: + out_latent = { + "samples": torch.zeros( + (batch_size, 16, latent_height, latent_width), + device='cpu', + dtype=torch.float32 + ) + } # inpaint if inpaint_image is not None: