FlashVideo icon indicating copy to clipboard operation
FlashVideo copied to clipboard

A few questions about stage2 2B model training

Open frozoul opened this issue 1 year ago • 6 comments

Hello, I would like to ask a few questions about stage2 2B model training:

  1. What is the sampling interval during training? That is, what the num_noise_interval parameter setting in the code?
  2. How to set some parameters during training, such as the learning rate scheduler and cfg scale?
  3. Are the sampler and denoiser in the code useful? As far as I understand, if flow matching is used for training, these two modules should not be used?
  4. In the code, when solving the integral, inference uses rk4 instead of euler. Do these two have a big impact on the result video?
  5. In the pre-training 1 and 2 stages, is the add noise range for training images and training videos 600-900? Because I saw that the noise range for images and videos in the code uses two different parameters img_ref_noise_step_range and ref_noise_step_range, so I want to confirm.

frozoul avatar Mar 04 '25 03:03 frozoul

We appreciate your interest in our work.

  1. The parameter num_noise_interval was ultimately not used. It was originally intended to encode a latent input once and sample multiple noise timesteps $t$ to accelerate training. Because the encoding process proved to be slow in practice.

  2. Model training does not use the classifier-free guidance (CFG) scale. The learning rate scheduler is kept constant throughout training.

  3. Both the sampler and denoiser components are not used in the implementation.

  4. There was a misunderstanding regarding the numerical method employed. The actual method passed and used is Euler, not default rk4, you can check this in the inference code.

  5. The range of img_ref_noise_step_range is set to [100, 300] in the implementation, based on empirical observations. However, we are not certain if this range is optimal, as ablation studies could not be conducted due to computational limitations and time constraints.

If you have any questions or require adaptations of our algorithm to suit your specific problem, I am more than happy to share insights and experiences from this project with you :)

jshilong avatar Mar 04 '25 10:03 jshilong

Thank you for your reply. I am trying to train from scratch the second stage model in your paper, and your answer is very helpful. So in the second stage of pre-training, when images and videos are mixed at a 1:2 ratio, the image noise range is 100-300, and the video noise range is 600-900? In addition, the paper mentioned adjusting the latent degradation strength based on the Signal-to-Noise Ratio (SNR). How does this part work specifically?

frozoul avatar Mar 04 '25 12:03 frozoul

  1. So in the second stage of pre-training, when images and videos are mixed at a 1:2 ratio, the image noise range is 100-300, and the video noise range is 600-900?
  • yes
  1. the paper mentioned adjusting the latent degradation strength based on the Signal-to-Noise Ratio (SNR)
  • This is the key insight we aim to share with other researchers: For larger resolutions and a higher number of frames, the degradation strength needs to be increased.

jshilong avatar Mar 04 '25 14:03 jshilong

I understand, but what is the specific indicator used to calculate this SNR? Is there a quantitative relationship between the SNR indicator and the noise range?

In addition, is SD3's t_transform used during training (if so, what is the corresponding shift_t parameter)? If not, what kind of t_transform is used?

frozoul avatar Mar 05 '25 06:03 frozoul

  1. As discussed in the paper, higher frame counts and larger resolutions require greater noise strength. However, directly calculating the optimal value is challenging. Therefore, we use a wide range of noise strengths during the initial training phase to search for the optimal setting.

  2. We do not utilize logit_norm in SD3 because, in our setting—where the starting point is a low-resolution video—the most challenging $t$ interval may differ from starting with pure noise. When starting from pure noise(SD3), the most challenging part is typically in the middle of the $t$ interval. However, in our setting, where we start with a low-resolution video, I believe the most challenging part should be near $t = 0$. While I have not conducted specific ablation studies to confirm this, I consider this assumption to be reasonable. So I only apply a $t$ shift, setting it to 3 during training.

jshilong avatar Mar 05 '25 12:03 jshilong

Thanks very much for your reply!

frozoul avatar Mar 05 '25 13:03 frozoul