Skip to content

Commit

Permalink
Merge pull request #1215 from bghira/bugfix/sana-vae-cache
Browse files Browse the repository at this point in the history
vaecache: sana should grab .latent object
  • Loading branch information
bghira authored Dec 13, 2024
2 parents 749ae60 + 4042365 commit b323d1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/caching/vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,9 @@ def encode_images(self, images, filepaths, load_from_cache=True):
latents_uncached - self.vae.config.shift_factor
) * self.vae.config.scaling_factor
else:
latents_uncached = latents_uncached * self.vae.config.scaling_factor
latents_uncached = (
latents_uncached.latent * self.vae.config.scaling_factor
)
logger.debug(f"Latents shape: {latents_uncached.shape}")

# Prepare final latents list by combining cached and newly computed latents
Expand Down

0 comments on commit b323d1b

Please sign in to comment.