fix upcast

This commit is contained in:
Vladimir Mandic
2024-09-27 08:41:36 -04:00
parent 157f581506
commit 1a37215a3d
+1 -1
View File
@@ -56,7 +56,7 @@ 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)
# model.vae = model.vae.to(dtype=torch.float32)
latents = latents.to(torch.float32)
else:
latents = latents.to(devices.device)