DDPM normalizes pixel values from [0,255] to [-1,1] so the network operates on a fixed input range matching the Gaussian prior
The DDPM paper specifies that image data should be normalized from the integer range {0,…,255} to [-1,1] before being passed to the network. This ensures the starting distribution of the forward process is compatible with the standard normal prior p(x_T). In PyTorch, this is done via a Lambda transform: (t * 2) - 1. The reverse transform goes back: (t + 1) / 2 * 255. Without this normalization, the noise schedule parameters would need to be re-tuned, and the final timestep distribution would not approximate a standard Gaussian.
Examples
Transform: Compose([ToTensor(), Lambda(lambda t: (t * 2) - 1)]). Reverse: Lambda(lambda t: (t + 1) / 2) then scale to 255.
Assessment
Explain why [-1,1] normalization is necessary for DDPM to work correctly. What happens at t=T if the images are not normalized?