Skip to content

Commit 622f35b

Browse files
authored
fixed vae scaling (huggingface#5213)
1 parent 39baf0b commit 622f35b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/diffusers/pipelines/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ def __call__(
114114
# compute the previous noisy sample x_t -> x_t-1
115115
latents = self.scheduler.step(noise_prediction, t, latents, **extra_kwargs).prev_sample
116116

117+
# adjust latents with inverse of vae scale
118+
latents = latents / self.vqvae.config.scaling_factor
117119
# decode the image latents with the VAE
118120
image = self.vqvae.decode(latents).sample
119121

0 commit comments

Comments
 (0)