SalesforceAIResearch / DiffusionDPO

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

Why add same noise to pairwise images? #3

Open ChenDRAG opened 8 months ago

ChenDRAG commented 8 months ago

Hi, thank you for the efforts in open-source the paper code. When looking into the code, I found it manually modified the noise added to the pairwise images to be the same. https://github.com/SalesforceAIResearch/DiffusionDPO/blob/f3ca6f24ac03661c442638296d173fdd7eae1ad5/train.py#L1053

I'm wondering why this needs to be done. If this is necessary by theory?

LeonNerd commented 5 months ago

From my understanding of the paper, the formula in the paper has reflected this point. From the point of view of training, at tempstep n, how should we judge which picture is good, that is, adding the same noise to the pair of pictures at time t