fix upcsast

This commit is contained in:
Vladimir Mandic
2024-09-27 08:54:45 -04:00
parent 27afd84240
commit 199371314b
+2 -1
View File
@@ -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)