w86763777 / pytorch-ddpm

Unofficial PyTorch implementation of Denoising Diffusion Probabilistic Models
Do What The F*ck You Want To Public License
477 stars 60 forks source link

About function: predict_xstart_from_eps #8

Closed liubochong closed 1 year ago

liubochong commented 1 year ago

Hello, it's a nice work! I have some questions and would like to ask you. According to equation below: image we can get: image I would like to know why the implementation of this function is in this form: image where the correspond parameters are defined as follow: image

w86763777 commented 1 year ago

$$ x_0=\frac{1}{\sqrt{\bar\alpha_t}}(x_t-\sqrt{1-\bar\alpha_t}\epsilon)=\frac{1}{\sqrt{\bar\alpha_t}}x_t-\sqrt{\frac{1-\bar\alpha_t}{\bar\alpha_t}}\epsilon=\frac{1}{\sqrt{\bar\alpha_t}}x_t-\sqrt{\frac{1}{\bar\alpha_t}-1}\epsilon $$

liubochong commented 1 year ago

I realised I had misread the brackets, thank you very much for your patience.