Update pipeline.py
Browse files- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -1015,7 +1015,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1015 |
context_group = []
|
1016 |
for i in range(context_size):
|
1017 |
# calculate the frame index
|
1018 |
-
frame_index = ((t+1) * context_group_index * (context_size-overlap)) + i
|
1019 |
# wrap around at the end
|
1020 |
if frame_index >= num_frames:frame_index = frame_index % num_frames
|
1021 |
context_group.append(frame_index)
|
@@ -1023,7 +1023,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1023 |
context_indexes.append(context_groups)
|
1024 |
return context_indexes
|
1025 |
|
1026 |
-
context_indexes = context_scheduler(context_size, overlap, num_frames, len(timesteps))
|
1027 |
|
1028 |
print(f"Context indexes: {context_indexes}")
|
1029 |
|
|
|
1015 |
context_group = []
|
1016 |
for i in range(context_size):
|
1017 |
# calculate the frame index
|
1018 |
+
frame_index = ((t+1) * context_group_index * (context_size-overlap)) + (offset * t) + i
|
1019 |
# wrap around at the end
|
1020 |
if frame_index >= num_frames:frame_index = frame_index % num_frames
|
1021 |
context_group.append(frame_index)
|
|
|
1023 |
context_indexes.append(context_groups)
|
1024 |
return context_indexes
|
1025 |
|
1026 |
+
context_indexes = context_scheduler(context_size, overlap, step, num_frames, len(timesteps))
|
1027 |
|
1028 |
print(f"Context indexes: {context_indexes}")
|
1029 |
|