mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-18 22:08:13 +00:00
as numframe limit is impled in reader, add that
This commit is contained in:
@@ -294,6 +294,13 @@ class VideoDataset(torch.utils.data.Dataset):
|
||||
last_match = idx + last_match
|
||||
break
|
||||
frames = _frames
|
||||
num_frames = len(frames)
|
||||
if num_frames > self.num_frames:
|
||||
num_frames = self.num_frames
|
||||
else:
|
||||
while num_frames > 1 and num_frames % self.time_division_factor != self.time_division_remainder:
|
||||
num_frames -= 1
|
||||
frames = frames[:num_frames]
|
||||
return frames
|
||||
|
||||
def load_video(self, file_path):
|
||||
|
||||
Reference in New Issue
Block a user