dome272 / Diffusion-Models-pytorch

Pytorch implementation of Diffusion Models (https://arxiv.org/pdf/2006.11239.pdf)
Apache License 2.0
1.11k stars 256 forks source link

CFG is right? #22

Open Edward0Liu opened 1 year ago

Edward0Liu commented 1 year ago

In the paper, CLASSIFIER-FREE DIFFUSION GUIDANCE, epsilont = (1 + w)epsilonθ(zt, c) - wepsilonθ(zt). But, codes's epsilont = lerp(epsilonθ(zt), epsilonθ(zt, c), w) = (1 - w)*epsilonθ(zt) + epsilonθ(zt, c)? Am I right? Are those two the same? Just a issue.

dome272 commented 1 year ago

Yea they should be the same