smoothieAI commited on
Commit
d0480b5
·
verified ·
1 Parent(s): 6092549

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -2
pipeline.py CHANGED
@@ -1070,7 +1070,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
1070
  noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
1071
 
1072
  # compute the previous noisy sample x_t -> x_t-1
1073
- current_context_latents = self.scheduler.step(noise_pred, t, current_context_latents, **extra_step_kwargs).prev_sample
1074
 
1075
  # call the callback, if provided
1076
  if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
@@ -1079,7 +1079,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
1079
  callback(i, t, None)
1080
 
1081
  # shuffle rotate latent images by step places, wrapping around the last 2 to the start
1082
- latents = torch.cat([current_context_latents[:, :, -step:, :, :], current_context_latents[:, :, :-step, :, :]], dim=2)
1083
 
1084
  if output_type == "latent":
1085
  return AnimateDiffPipelineOutput(frames=latents)
 
1070
  noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
1071
 
1072
  # compute the previous noisy sample x_t -> x_t-1
1073
+ latents = self.scheduler.step(noise_pred, t, latents, **extra_step_kwargs).prev_sample
1074
 
1075
  # call the callback, if provided
1076
  if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
 
1079
  callback(i, t, None)
1080
 
1081
  # shuffle rotate latent images by step places, wrapping around the last 2 to the start
1082
+ latents = torch.cat([latents[:, :, -step:, :, :], latents[:, :, :-step, :, :]], dim=2)
1083
 
1084
  if output_type == "latent":
1085
  return AnimateDiffPipelineOutput(frames=latents)