smoothieAI commited on
Commit
375de5c
·
verified ·
1 Parent(s): 07bba55

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -1
pipeline.py CHANGED
@@ -1023,7 +1023,8 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
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 == 0:
1026
- frame_index = (group_index * (context_size - overlap)) + index
 
1027
  else:
1028
  # Calculate the frame index
1029
  frame_index = (group_index * (context_size - overlap)) + (offset * timestep) + index
 
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 == 0:
1026
+ step_size = total_frames // context_size
1027
+ frame_index = index * (step_size + group_index)
1028
  else:
1029
  # Calculate the frame index
1030
  frame_index = (group_index * (context_size - overlap)) + (offset * timestep) + index