A variance schedule beta_t controls how quickly noise accumulates across DDPM timesteps
In DDPM, each forward step adds Gaussian noise scaled by a variance schedule beta_1 < beta_2 < … < beta_T. The schedule determines the noise level at each timestep. The original paper used a linear schedule from beta=0.0001 to beta=0.02. Later work (Nichol et al., 2021) showed a cosine schedule achieves better sample quality because the linear schedule adds too little noise early and too much late relative to image content. The schedule is analogous to a learning rate schedule — a design choice that significantly affects results. Precomputing alpha_t = 1 - beta_t and its cumulative product alpha_bar_t allows sampling any noise level directly without applying the forward process step-by-step.
Examples
Linear: torch.linspace(0.0001, 0.02, T). Cosine: uses cos(...)^2 formula. The ‘nice property’ lets you compute a noisy image at any timestep t directly as a weighted sum of the original image and sampled noise.
Assessment
Explain why the variance schedule matters and describe one difference between linear and cosine schedules. Implement cosine_beta_schedule in pseudocode.