tqch / ddpm-torch

Unofficial PyTorch Implementation of Denoising Diffusion Probabilistic Models (DDPM)
MIT License
200 stars 35 forks source link

Comment in code is wrong. Upsample supports align_corners=True #4

Closed Skylion007 closed 1 year ago

Skylion007 commented 1 year ago

Comment is wrong: https://github.com/tqch/ddpm-torch/blob/1bf0e5d178fa374d21f1a0a622bf61fbf3413d29/ddpm_torch/models/unet.py#L184

Align_corners=true is now supported by PyTorch. Perhaps the code should be updated?

tqch commented 1 year ago

Thanks for reviewing the code! I have double-checked the latest documentation. For the align_corners option in nn.Upsample, it clearly states that

This only has effect when mode is 'linear', 'bilinear', 'bicubic', or 'trilinear'. Default: False

However, here the interpolation mode is 'nearest'.

Skylion007 commented 1 year ago

Ah you are right. 💯