smoothieAI commited on
Commit
d5e969e
·
verified ·
1 Parent(s): cc02a27

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +9 -9
pipeline.py CHANGED
@@ -1000,15 +1000,15 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
1000
  noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
1001
  noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
1002
 
1003
- # remove the appended frames from the end of the current_context_latents
1004
- if wrap_count > 0:
1005
- # remove the ending frames from current_context_latents
1006
- current_context_latents = current_context_latents[:, :, :-wrap_count, :, :]
1007
- # remove the ending frames from noise_pred
1008
- noise_pred = noise_pred[:, :, :-wrap_count, :, :]
1009
- # print the shape of the current_context_latents and noise_pred
1010
- print(f"current_context_latents shape: {current_context_latents.shape}")
1011
- print(f"noise_pred shape: {noise_pred.shape}")
1012
 
1013
  # compute the previous noisy sample x_t -> x_t-1
1014
  current_context_latents = self.scheduler.step(noise_pred, t, current_context_latents, **extra_step_kwargs).prev_sample
 
1000
  noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
1001
  noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
1002
 
1003
+ # # remove the appended frames from the end of the current_context_latents
1004
+ # if wrap_count > 0:
1005
+ # # remove the ending frames from current_context_latents
1006
+ # current_context_latents = current_context_latents[:, :, :-wrap_count, :, :]
1007
+ # # remove the ending frames from noise_pred
1008
+ # noise_pred = noise_pred[:, :, :-wrap_count, :, :]
1009
+ # # print the shape of the current_context_latents and noise_pred
1010
+ # print(f"current_context_latents shape: {current_context_latents.shape}")
1011
+ # print(f"noise_pred shape: {noise_pred.shape}")
1012
 
1013
  # compute the previous noisy sample x_t -> x_t-1
1014
  current_context_latents = self.scheduler.step(noise_pred, t, current_context_latents, **extra_step_kwargs).prev_sample