mirror of
https://github.com/THUDM/CogVideo.git
synced 2025-04-05 19:41:59 +08:00
Merge pull request #261 from KihongK/fix-division-zero
fix: division by zero error at create video indices
This commit is contained in:
commit
b27284a8de
@ -408,7 +408,7 @@ class SFTDataset(Dataset):
|
||||
num_frames = self.max_num_frames
|
||||
start = int(self.skip_frms_num)
|
||||
end = int(ori_vlen - self.skip_frms_num)
|
||||
indices = np.arange(start, end, (end - start) // num_frames).astype(int)
|
||||
indices = np.arange(start, end, max((end - start) // num_frames), 1).astype(int)
|
||||
temp_frms = vr.get_batch(np.arange(start, end))
|
||||
assert temp_frms is not None
|
||||
tensor_frms = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user