Skip to content

Commit

Permalink
Fix TAESD preview to only decode first latent, instead of all
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosinkadink committed Oct 29, 2023
1 parent a12cc05 commit 41b07ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion latent_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 41b07ff

Please sign in to comment.