smoothieAI
commited on
Update pipeline.py
Browse files- pipeline.py +3 -3
pipeline.py
CHANGED
@@ -1022,9 +1022,9 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1022 |
# Iterate over each index in the context group
|
1023 |
for index in range(context_size):
|
1024 |
# if its the first timestep, spread the indexes out evenly over the full frame range, offset by the group index
|
1025 |
-
if timestep
|
1026 |
-
step_size = (total_frames // context_size)+
|
1027 |
-
frame_index = (index * step_size
|
1028 |
else:
|
1029 |
# Calculate the frame index
|
1030 |
frame_index = (group_index * (context_size - overlap)) + (offset * timestep) + index
|
|
|
1022 |
# Iterate over each index in the context group
|
1023 |
for index in range(context_size):
|
1024 |
# if its the first timestep, spread the indexes out evenly over the full frame range, offset by the group index
|
1025 |
+
if timestep <= 1:
|
1026 |
+
step_size = (total_frames // context_size)+2
|
1027 |
+
frame_index = ((index * step_size)+group_index)+timestep
|
1028 |
else:
|
1029 |
# Calculate the frame index
|
1030 |
frame_index = (group_index * (context_size - overlap)) + (offset * timestep) + index
|