Update pipeline.py
Browse files- pipeline.py +3 -1
pipeline.py
CHANGED
@@ -1536,9 +1536,11 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1536 |
|
1537 |
# if we had more then one prompt, we need to offset the video frames back by number of inference steps
|
1538 |
if len(prompt_embeds_list) > 1:
|
|
|
1539 |
# wrap the first n number of frames to the end of the video to fix the offseting from the context scheduler
|
1540 |
offset_frames = num_inference_steps
|
1541 |
-
|
|
|
1542 |
|
1543 |
for batch in range((num_frames + output_batch_size - 1) // output_batch_size):
|
1544 |
start_id = batch * output_batch_size
|
|
|
1536 |
|
1537 |
# if we had more then one prompt, we need to offset the video frames back by number of inference steps
|
1538 |
if len(prompt_embeds_list) > 1:
|
1539 |
+
|
1540 |
# wrap the first n number of frames to the end of the video to fix the offseting from the context scheduler
|
1541 |
offset_frames = num_inference_steps
|
1542 |
+
print("Offsetting video frames by ", offset_frames)
|
1543 |
+
latents = torch.cat((latents[:, :, offset_frames:, :, :], latents[:, :, :offset_frames, :, :]), dim=2)
|
1544 |
|
1545 |
for batch in range((num_frames + output_batch_size - 1) // output_batch_size):
|
1546 |
start_id = batch * output_batch_size
|