tianweiy / DMD2

(NeurIPS 2024 Oral 🔥) Improved Distribution Matching Distillation for Fast Image Synthesis
Other
526 stars 28 forks source link

why divide by the mean of torch.abs(p_real) #46

Closed PeiqinSun closed 3 months ago

PeiqinSun commented 3 months ago

Hi, DMD2 is another awesome work after DMD.

https://github.com/tianweiy/DMD2/blob/main/main/sd_guidance.py#L237C1-L239C42

But, in your implement code, why divide by the mean of torch.abs(p_real)? in my opinion, should multi by (alpha_t / sigma_t^2)

Have any detail in your paper?

tianweiy commented 3 months ago

this is followed from the original dmd paper (equation 8). we found it to work comparably or slightly better than a few other alternatives (see Table 2)

PeiqinSun commented 3 months ago

Thanks for your reply.