Fix model initialization bugs

This commit is contained in:
Gadersd
2023-08-05 16:20:49 -04:00
parent 10ce5ac89d
commit ce91c8838f
4 changed files with 2 additions and 4 deletions

View File

@@ -114,7 +114,6 @@ impl<B: Backend> StableDiffusion<B> {
let timestep = Tensor::from_ints([t as i32]).to_device(&device);
let pred_noise = self.forward_diffuser(latent.clone(), timestep, context.clone(), unconditional_context.clone(), unconditional_guidance_scale);
let predx0 = (latent - pred_noise.clone() * sqrt_noise) / current_alpha.sqrt();
let dir_latent = pred_noise * (1.0 - prev_alpha - sigma * sigma).sqrt();