SalesforceAIResearch / DiffusionDPO

Code for "Diffusion Model Alignment Using Direct Preference Optimization"
https://arxiv.org/abs/2311.12908
Apache License 2.0
213 stars 19 forks source link

Significant Issue with Hugging Face Accelerate Version #8

Open YangYongJin opened 3 months ago

YangYongJin commented 3 months ago

Hi, I believe there is a significant issue with the Hugging Face Accelerate version. This code is using version 4.20, according to the requirements.txt, but that version has a serious bug in the accelerator.accumulate function. After the first epoch, gradients are not accumulated at all, rendering the performance after the first epoch meaningless (approximately 400 steps in this case). I suggest upgrading the Accelerate version as the recent version does not have this issue.

zengziru commented 2 months ago

How do you find this problem? Can you tell me the right accelerate version? Thank you very much!

Mowenyii commented 2 months ago

Can updating the accelerator to the latest version resolve this issue?

YangYongJin commented 2 months ago

Yes, in my case, just updating the accelerator to the latest version resolve this issue!