smoothieAI commited on
Commit
774e71b
·
verified ·
1 Parent(s): e37cd62

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +4 -1
pipeline.py CHANGED
@@ -573,7 +573,10 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
573
  weight = (smooth_steps - abs(s)) / smooth_steps
574
  blended_latent += latents[:, :, frame_index] * weight
575
  latents[:, :, i] = blended_latent / (2 * smooth_steps)
576
-
 
 
 
577
  else:
578
  latents = latents.to(device)
579
 
 
573
  weight = (smooth_steps - abs(s)) / smooth_steps
574
  blended_latent += latents[:, :, frame_index] * weight
575
  latents[:, :, i] = blended_latent / (2 * smooth_steps)
576
+ # just for testing make all frames have the same latent noise as frame 1
577
+ single_latent = randn_tensor((batch_size, num_channels_latents, 1, height // self.vae_scale_factor, width // self.vae_scale_factor), generator=generator, device=device, dtype=dtype)
578
+ latents = single_latent.repeat(1, 1, num_frames, 1, 1)
579
+
580
  else:
581
  latents = latents.to(device)
582