Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

fix:multi-fps bug. For multi-fps training, when extracting frames according to a certain frame_interval, the fps of the extracted frames actually changes. (#444)

Jianshu Guo17cce908b222
diff --git a/opensora/datasets/datasets.py b/opensora/datasets/datasets.py
index 7229bb5..34a5dcf 100644
--- a/opensora/datasets/datasets.py
+++ b/opensora/datasets/datasets.py
@@ -152,6 +152,8 @@ class VariableVideoTextDataset(VideoTextDataset):
# Sampling video frames
video = temporal_random_crop(vframes, num_frames, self.frame_interval)
+ video_fps = video_fps // self.frame_interval
+
# transform
transform = get_transforms_video(self.transform_name, (height, width))
video = transform(video) # T C H W