[BUG] sample_videos are pure Gaussian noise while eval_videos are normal
Description: Hi there, thank you for this amazing repository! I’ve been experimenting with it and it's very impressive. However, I encountered a small issue regarding the video logs.
I am running the training with the default configuration (config/default.yaml). I noticed that the videos saved in the sample_videos directory are entirely Gaussian noise, whereas the videos in eval_videos from the same run are generated correctly.
Steps to Reproduce:
Use the default config/default.yaml.
Run training: accelerate launch train.py --config config/default.yaml
Check the output videos in the log directory.
Observed Behavior:
eval_videos: Normal and recognizable content.
sample_videos: Static/pure Gaussian noise.
Since the evaluation works, the VAE and model weights seem fine. Is there a potential bug in the sampling rollout logic (e.g., in genrl/trainer/sampling.py) that prevents proper denoising during the training phase?
I'd appreciate any guidance or suggestions you might have. Thank you for your time and help!
Hi, may I ask whether the training curves are correct?
Hi @Harahan,
Thank you for the quick response!
To provide more context: I found that this issue seems specifically related to the sde_type setting in the configuration:
When I use sde_type: flow_cps, the sample_videos are generated normally.
When I use sde_type: flow_sde, the sample_videos consistently show pure Gaussian noise.
Regarding the training curves: since the rollout videos were abnormal from the very beginning, I haven't proceeded with large-scale training yet to observe the long-term convergence.
Given that everything works as expected with flow_cps but fails with flow_sde under identical settings, I suspect there might be a bug in the flow_sde implementation during the sampling/rollout phase. Could you please look into this?
Thank you for your help!
Hi, I checked the code and found that the differences are:
https://github.com/ModelTC/GenRL/blob/82a867ed24f6095a7d931ec76319aae20d9a01c4/genrl/diffusers_patch/wan_pipeline_with_logprob.py#L66
https://github.com/yifan123/flow_grpo/blob/9745241cf1101407e9b518dd4f10498092150522/flow_grpo/diffusers_patch/wan_pipeline_with_logprob.py#L51
You can modify the code to flow_grpo's original implementation. However, I have not observed such results on H100. Could you upload some failure examples and initial curves?
Hi @Harahan,
Thank you for the feedback!
To clarify, I am actually using H100 GPUs as well. The command I used is exactly the default one: accelerate launch train.py --config config/default.yaml
I have uploaded the following examples for your reference:
Video A https://github.com/user-attachments/assets/24e07c75-e74f-4fb2-9f02-ac844df7ecfe (from eval_videos): This is generated correctly and looks normal.
Video B https://github.com/user-attachments/assets/2f4f5ff0-280c-471b-afc5-48c04fbe4217 (from sample_videos): This consists entirely of Gaussian noise.
As noted earlier, this issue specifically happens when sde_type is set to flow_sde.
Could you please provide more specific instructions or a code snippet on how to modify it? Also, I was wondering if your sample_videos look normal when running the default flow_sde configuration on your H100?
I uploaded the screenshot at the first step, and some sampled videos also contain lots of noise. The loss curve is actually the one in README.md.
In addition, this could not be a bug. Since the sampling phase adopts fewer denoising steps, the generation quality is worse than that in the evaluation phase. I believe you can train the model for 100 or 200 steps to see if there's a bug.
If you want to modify the code, just replace std_dev_t in
https://github.com/ModelTC/GenRL/blob/82a867ed24f6095a7d931ec76319aae20d9a01c4/genrl/diffusers_patch/wan_pipeline_with_logprob.py#L66
by
https://github.com/yifan123/flow_grpo/blob/9745241cf1101407e9b518dd4f10498092150522/flow_grpo/diffusers_patch/wan_pipeline_with_logprob.py#L51
P.S. I haven't tried flow_cps before.
Thank you for sharing the screenshot and the explanation.
I noticed a clear difference between our results: in your screenshot, the sample_video still retains some recognizable information or structure. However, in my case, the videos saved to WandB and the sample_videos directory are entirely pure Gaussian noise without any visible content at all.
For this run, I am using videoalign_mq: 1.0 as the reward. Here are the training curves I obtained:
Do these curves look correct to you? Given that my rollout videos are significantly worse (complete noise) than the ones in your screenshot, I am still concerned there might be an issue with how flow_sde is behaving in my setup.
Looking forward to your thoughts. Thank you!
May I ask whether the samples in sample_video at the first step look good? videoalign_mq alone is easy to incur reward hacking.
Thanks for the reply.
The sample_videos are completely Gaussian noise from the very first step. It doesn't improve with training.
I tried both videoalign_mq and ocr, but the result is the same—pure noise from the start. I have double-checked my setup and I am using the exact default configuration provided in the repository with no modifications at all.
It's very wired. Maybe some packages are in different versions. But I suggest you to modify the code to have a try first.
Thank you for the explanation. I noticed that longcat.yaml enables multiple rewards (HPSv3, MQ, and TA) together. Is this combination necessary to prevent reward hacking? If I only enable one of them (like videoalign_mq), the model might make it easy to "hack"—where the reward score increases but the actual video quality doesn't improve. Is it correct?
Yes, especially MQ will hugely impact video quality compared with others, since not all videos need high motion dynamics.
Thank you very much for the confirmation and the detailed explanation! I am really looking forward to your future updates and improvements on this repository!