zsyOAOA / ResShift

ResShift: Efficient Diffusion Model for Image Super-resolution by Residual Shifting (NeurIPS@2023 Spotlight, TPAMI@2024)
Other
955 stars 50 forks source link

One code error perhaps #83

Open Hiilay opened 4 months ago

Hiilay commented 4 months ago

Thanks for your excellent work! It seems there is an error in https://github.com/zsyOAOA/ResShift/blob/989803abe8315c7e8c17d7d4b2c6541dc6e763f9/models/gaussian_diffusion.py#L186 variance = _extract_into_tensor(self.etas, t, x_start.shape) * self.kappa**2 should be variance = _extract_into_tensor(self.alphas, t, x_start.shape) * self.kappa**2 according to the paper. Is my understanding incorrect? Please reply :)

zsyOAOA commented 4 months ago

No, it's corrected. It corresponds to the marginal distribution q(x_t|x_0,y_0). @Hiilay

Hiilay commented 4 months ago

No, it's corrected. It corresponds to the marginal distribution q(x_t|x_0,y_0). @Hiilay

thanks! It's my misunderstanding.

Hiilay commented 4 months ago

Excuse me, one more question. What's the difference between and DDPM? e.g. GaussianDiffusion and GaussianDiffusionDDPM in models/gaussian_diffusion.py, SpacedDiffusion and SpacedDiffusionDDPM in models/respace.py Please reply! Thanks :)

zsyOAOA commented 4 months ago

I reimplemented DDPM, e.g., ***DDPM. @Hiilay

Hiilay commented 4 months ago

Thx for reply :) And which one scored higher and used in practice? (sry I haven't read the code throughly so far.)

Hiilay commented 4 months ago

Excuse me, may I ask the meaning of param 'denoise_fn' of 'p_sample_loop' in models/gaussian_diffusion.py/GaussianDiffusion? It seems to be 'None' in whole-code-wide, and the 'p_sample_loop' seems not to have been referred too. Looking forward to your reply :)