From 199371314bd27b76e0e20ed78bea88d72a795313 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 27 Sep 2024 08:54:45 -0400 Subject: [PATCH] fix upcsast --- modules/processing_vae.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/processing_vae.py b/modules/processing_vae.py index 341e0e7e9..018c6f000 100644 --- a/modules/processing_vae.py +++ b/modules/processing_vae.py @@ -56,7 +56,8 @@ def full_vae_decode(latents, model): if upcast: if hasattr(model, 'upcast_vae'): # this is done by diffusers automatically if output_type != 'latent' model.upcast_vae() - # model.vae = model.vae.to(dtype=torch.float32) + else: + model.vae = model.vae.to(dtype=torch.float32) latents = latents.to(torch.float32) else: latents = latents.to(devices.device)