smoothieAI commited on
Commit
8547fc1
·
verified ·
1 Parent(s): 2b630ab

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -4
pipeline.py CHANGED
@@ -760,10 +760,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
760
  if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
761
  progress_bar.update()
762
  if callback is not None and i % callback_steps == 0:
763
- preview_latents = latent_sum / latent_counter.reshape(1, 1, num_frames, 1, 1)
764
- preview_latents = self.decode_latents(preview_latents[:, :, 0:1, :, :])
765
- preview_image = tensor2vid(preview_latents, self.image_processor, output_type="pil")
766
- callback(i, t, preview_image[0][0])
767
 
768
  latent_counter = latent_counter.reshape(1, 1, num_frames, 1, 1)
769
  latents = latent_sum / latent_counter
 
760
  if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
761
  progress_bar.update()
762
  if callback is not None and i % callback_steps == 0:
763
+ callback(i, t, None)
 
 
 
764
 
765
  latent_counter = latent_counter.reshape(1, 1, num_frames, 1, 1)
766
  latents = latent_sum / latent_counter