InfinityStar icon indicating copy to clipboard operation
InfinityStar copied to clipboard

Training bug and question about batch size

Open MingjieWe opened this issue 1 year ago • 4 comments

亲爱的InfinityStar团队:

非常感谢你们的卓越工作。在复现过程中,存在训练推理不一致的问题。希望贵团队能帮助和指导,非常感谢!

我在koala36m随机抽取了1000条样本作为训练数据进行fineture。 1.在wandb的train loss有正常的下降,准确率提升,不论在原权重上微调或者随机初始化。 但是对于训练以后的权重,在推理时生成完全随机的噪声。 这可以说明训练的infinityStar部分对于token学习是有效的,但是整体训练流程存在问题。 2.ckpt可以正常进行推理,在lr=0时的微调权重输出是正常的。这可以排除推理和模型权重加载的问题。

目前定位到的问题可能是制作token的‘extract_video_features’步骤,tools/save_dataset_features过程存在问题。

3.除此之外,还有一个bug,现在的代码似乎不支持batchsize的调整。因为调整arg_util.py的video_batch_size是没有作用的,代码中这个传入参数并没有被使用。

如果有任何需要提供的信息,欢迎继续讨论~希望可以更好的复现工作和微调支持。再一次感谢贵团队的卓越工作!希望越来越好~


Dear InfinityStar team,

Thank you very much for your outstanding work. During the reproduction process, there is an issue of inconsistency between training and inference. I hope your team can assist and provide guidance. Thank you very much!

I randomly selected 1000 samples from koala36m as training data for fine-tuning.

The training loss on Wandb shows a normal decrease, and accuracy improves, whether fine-tuning on the original weights or with random initialization. However, for the trained weights, the generated output during inference is completely random noise. This suggests that the training of the InfinityStar part is effective for token learning, but there is an issue with the overall training process.

The checkpoint can perform inference normally, and the output from fine-tuned weights with lr=0 is normal. This rules out issues with inference and model weight loading.

The currently identified issue may lie in the extract_video_features step for token creation, specifically in the tools/save_dataset_features process.

Additionally, there is another bug: the current code does not seem to support batch size adjustments. Modifying video_batch_size in arg_util.py has no effect, as this parameter is not utilized in the code.

If any additional information is required, please feel free to discuss further. I hope to better reproduce the work and support fine-tuning. Once again, thank you for your exceptional work! Wishing you continued success and improvement!

MingjieWe avatar Dec 01 '25 11:12 MingjieWe

@MingjieWe Thank you for your interest! We will check if we can reproduce your issue locally. Please stay tuned for updates.

happylicio avatar Dec 02 '25 16:12 happylicio

Thank you very much for your help! I'm very sorry to disturb you again :( Maybe this information will be effective for fixing the bug.

Error sample (value range:0-255):

Image

or

Image

To eliminate the Tokenizer issue, I reconstructed the sample and training data from the saved .pt files: (It clearly shows strong video reconstruction capability. Great work!)

Image Image

Train loss (blue: fine-tuning, red: training without resume):

Image

I can normally use hugging face weights for T2V and I2V. InfinityStar is really fast compared to other work!

Image Image

Thank you sincerely for your support of the open source~

MingjieWe avatar Dec 03 '25 02:12 MingjieWe

@MingjieWe Can you post your inference log here?

HelloJianHan avatar Dec 09 '25 03:12 HelloJianHan

Thanks for your help. I have fixed the previous bug, which was caused by data issues. I have resolved it by changing the data.

The fundamental reason is that the reading of OpenCV on some ffmpeg slice videos is more complex than that of Decord. It does not report errors, but it will show a black screen after learning tokens. (I found that InfinityStar has implemented Decord reading, but I didn't import this variable for debugging.)

MingjieWe avatar Dec 09 '25 07:12 MingjieWe