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

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -1
pipeline.py CHANGED
@@ -1024,7 +1024,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
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
@@ -1035,6 +1035,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
1035
  context_group_indexes.append(frame_index)
1036
  # Add the group's indexes to the timestep's list
1037
  timestep_context_groups.append(context_group_indexes)
 
1038
  # Add the timestep's context groups to the overall list
1039
  all_context_indexes.append(timestep_context_groups)
1040
  return all_context_indexes
 
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
 
1035
  context_group_indexes.append(frame_index)
1036
  # Add the group's indexes to the timestep's list
1037
  timestep_context_groups.append(context_group_indexes)
1038
+ print("context_group_indexes", context_group_indexes)
1039
  # Add the timestep's context groups to the overall list
1040
  all_context_indexes.append(timestep_context_groups)
1041
  return all_context_indexes