yuanzhi-zhu / DiffPIR

"Denoising Diffusion Models for Plug-and-Play Image Restoration", Yuanzhi Zhu, Kai Zhang, Jingyun Liang, Jiezhang Cao, Bihan Wen, Radu Timofte, Luc Van Gool.
https://yuanzhi-zhu.github.io/DiffPIR/
MIT License
388 stars 31 forks source link

Paper says that DiffPIR starts from the Gaussian noise, but the codes don't. #41

Open smhongok opened 3 months ago

smhongok commented 3 months ago

Hi,

Thank you for your great work.

I was wondering why the paper says that DiffPIR starts from the Gaussian noise, but the codes don't.

For example, in main_ddpir_deblur.py Line 230,

            x = sqrt_alpha_effective * (2*y-1) + torch.sqrt(sqrt_1m_alphas_cumprod[t_start]**2 - \
                    sqrt_alpha_effective**2 * sqrt_1m_alphas_cumprod[t_y]**2) * torch.randn_like(y)

but according to the paper, it looks like x should be just torch.randn_like(y)

Can you explain this, please?

Best regards smhongok

yuanzhi-zhu commented 3 months ago

Hey @smhongok thank you for your interest.

In our paper, we did not require the t_start to be T=999, and we have ablation exprs on this in Sec. 4.4. We also provide related observations (and explanation) in the appendix Figure 9.

Hope this address your question