summaryrefslogtreecommitdiffstats
path: root/training/functional.py
diff options
context:
space:
mode:
Diffstat (limited to 'training/functional.py')
-rw-r--r--training/functional.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/training/functional.py b/training/functional.py
index 8f47734..ccbb4ad 100644
--- a/training/functional.py
+++ b/training/functional.py
@@ -261,8 +261,8 @@ def loss_step(
261 eval: bool = False 261 eval: bool = False
262): 262):
263 # Convert images to latent space 263 # Convert images to latent space
264 latents = vae.encode(batch["pixel_values"]).latent_dist.sample().detach() 264 latents = vae.encode(batch["pixel_values"]).latent_dist.sample()
265 latents = latents * 0.18215 265 latents = latents * vae.config.scaling_factor
266 266
267 generator = torch.Generator(device=latents.device).manual_seed(seed + step) if eval else None 267 generator = torch.Generator(device=latents.device).manual_seed(seed + step) if eval else None
268 268