From 41b07ff8d7807292b56147e12347ab96972c9406 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Sun, 29 Oct 2023 13:30:23 -0500 Subject: [PATCH] Fix TAESD preview to only decode first latent, instead of all --- latent_preview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latent_preview.py b/latent_preview.py index e1553c85cac..6e758a1a9d1 100644 --- a/latent_preview.py +++ b/latent_preview.py @@ -22,7 +22,7 @@ def __init__(self, taesd): self.taesd = taesd def decode_latent_to_preview(self, x0): - x_sample = self.taesd.decoder(x0)[0].detach() + x_sample = self.taesd.decoder(x0[:1])[0].detach() # x_sample = self.taesd.unscale_latents(x_sample).div(4).add(0.5) # returns value in [-2, 2] x_sample = x_sample.sub(0.5).mul(2)