Open-Sora
Open-Sora copied to clipboard
为什么bucket_config里的一些keep_prob有两个值?具体含义是什么?
https://github.com/hpcaitech/Open-Sora/blob/main/docs/config.md#training-bucket-configs
The two number defined in the bucket config is (keep_prob, batch_size). Since the memory and speed of samples from different buckets may be different, we use batch_size to balance the processing speed. Since our computation is limited, we cannot process videos with their original resolution as stated in OpenAI's sora's report. Thus, we give a keep_prob to control the number of samples in each bucket. The keep_prob is the probability to keep a sample in the bucket. Let's take the following config as an example:
bucket_config = {
"480p": {16: (1.0, 8),},
"720p": {16: (0.5, 4),},
"1080p": {16: (0.2, 2)},
"4K", {16: (0.1, 1)},
}
Given a 2K video with more than 16 frames, the program will first try to put it into bucket "1080p" since it has a larger resolution than 1080p but less than 4K. Since the keep_prob for 1080p is 20%, a random number is generated, and if it is less than 0.2, the video will be put into the bucket. If the video is not put into the bucket, the program will try to put it into the "720p" bucket. Since the keep_prob for 720p is 50%, the video has a 50% chance to be put into the bucket. If the video is not put into the bucket, the program will try to put it into the "480p" bucket directly as it is the smallest resolution.
The two number defined in the bucket config is (keep_prob, batch_size). Since the memory and speed of samples from different buckets may be different, we use batch_size to balance the processing speed. Since our computation is limited, we cannot process videos with their original resolution as stated in OpenAI's sora's report. Thus, we give a keep_prob to control the number of samples in each bucket. The keep_prob is the probability to keep a sample in the bucket. Let's take the following config as an example: bucket_config = { "480p": {16: (1.0, 8),}, "720p": {16: (0.5, 4),}, "1080p": {16: (0.2, 2)}, "4K", {16: (0.1, 1)}, } Given a 2K video with more than 16 frames, the program will first try to put it into bucket "1080p" since it has a larger resolution than 1080p but less than 4K. Since the keep_prob for 1080p is 20%, a random number is generated, and if it is less than 0.2, the video will be put into the bucket. If the video is not put into the bucket, the program will try to put it into the "720p" bucket. Since the keep_prob for 720p is 50%, the video has a 50% chance to be put into the bucket. If the video is not put into the bucket, the program will try to put it into the "480p" bucket directly as it is the smallest resolution.
But the keep_prob here has two values.
102: ((1.0, 0.33), 27), 204: ((1.0, 0.1), 13), 408: ((1.0, 0.1), 6)
And I think keep_prob is used at get_bucket_id function. Could you explain this code please?
This issue is stale because it has been open for 7 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.