prompt-to-prompt icon indicating copy to clipboard operation
prompt-to-prompt copied to clipboard

DDS_zeroshot.ipynb - sds loss derivation

Open zoharbarzelay opened this issue 1 year ago • 2 comments

i liked your DDS paper a lot, thanks for sharing your code!

It would be really great if you could explain the math/derivation of the SDS loss you're using; specifically, the following two lines:

grad_z = alpha_t * sigma_t * (e_t - eps) sds_loss = grad_z.clone() * z

or link any relevant references.

Thx a lot!

zoharbarzelay avatar Feb 06 '24 07:02 zoharbarzelay

I have the same question grad_z = (alpha_t ** self.alpha_exp) * (sigma_t ** self.sigma_exp) * (e_t - eps) sds_loss = grad_z.clone() * z

RainbowZhuu avatar Mar 26 '24 09:03 RainbowZhuu

you can refer to this: https://github.com/threestudio-project/threestudio/issues/266. \delta sds_loss / \delta z will direcly be the grad_z (e_t - eps), which can avoid Unet backward required for Chain Rule.

Sutongtong233 avatar Apr 15 '24 02:04 Sutongtong233