Update pipeline.py
Browse files- pipeline.py +4 -3
pipeline.py
CHANGED
@@ -1000,10 +1000,13 @@ 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 |
# compute the previous noisy sample x_t -> x_t-1
|
1004 |
current_context_latents = self.scheduler.step(noise_pred, t, current_context_latents, **extra_step_kwargs).prev_sample
|
1005 |
|
1006 |
-
|
1007 |
# remove the appended frames from the end of the current_context_latents
|
1008 |
if wrap_count > 0:
|
1009 |
# remove the ending frames from current_context_latents
|
@@ -1011,8 +1014,6 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1011 |
# remove the ending frames from noise_pred
|
1012 |
noise_pred = noise_pred[:, :, :-wrap_count, :, :]
|
1013 |
# print the shape of the current_context_latents and noise_pred
|
1014 |
-
print(f"current_context_latents shape: {current_context_latents.shape}")
|
1015 |
-
print(f"noise_pred shape: {noise_pred.shape}")
|
1016 |
|
1017 |
# # if context_start + context_size > num_frames: remove the appended frames from the end of the current_context_latents
|
1018 |
# if wrap_count > 0:
|
|
|
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 |
+
|
1004 |
+
print(f"current_context_latents shape: {current_context_latents.shape}")
|
1005 |
+
print(f"noise_pred shape: {noise_pred.shape}")
|
1006 |
+
|
1007 |
# compute the previous noisy sample x_t -> x_t-1
|
1008 |
current_context_latents = self.scheduler.step(noise_pred, t, current_context_latents, **extra_step_kwargs).prev_sample
|
1009 |
|
|
|
1010 |
# remove the appended frames from the end of the current_context_latents
|
1011 |
if wrap_count > 0:
|
1012 |
# remove the ending frames from current_context_latents
|
|
|
1014 |
# remove the ending frames from noise_pred
|
1015 |
noise_pred = noise_pred[:, :, :-wrap_count, :, :]
|
1016 |
# print the shape of the current_context_latents and noise_pred
|
|
|
|
|
1017 |
|
1018 |
# # if context_start + context_size > num_frames: remove the appended frames from the end of the current_context_latents
|
1019 |
# if wrap_count > 0:
|