CVMay 15, 2023

Common Diffusion Noise Schedules and Sample Steps are Flawed

arXiv:2305.08891v4349 citations
Originality Incremental advance
AI Analysis

This addresses a critical issue in diffusion models for image generation, particularly affecting users of Stable Diffusion, by fixing implementation flaws that restrict output diversity, though it is incremental as it builds on existing methods.

The paper identifies flaws in common diffusion noise schedules and sampler implementations that cause a training-inference discrepancy, limiting Stable Diffusion to generate only medium-brightness images. It proposes simple fixes, such as rescaling noise schedules and adjusting samplers, to enable generation of brighter and darker samples, improving fidelity to the original data distribution.

We discover that common diffusion noise schedules do not enforce the last timestep to have zero signal-to-noise ratio (SNR), and some implementations of diffusion samplers do not start from the last timestep. Such designs are flawed and do not reflect the fact that the model is given pure Gaussian noise at inference, creating a discrepancy between training and inference. We show that the flawed design causes real problems in existing implementations. In Stable Diffusion, it severely limits the model to only generate images with medium brightness and prevents it from generating very bright and dark samples. We propose a few simple fixes: (1) rescale the noise schedule to enforce zero terminal SNR; (2) train the model with v prediction; (3) change the sampler to always start from the last timestep; (4) rescale classifier-free guidance to prevent over-exposure. These simple changes ensure the diffusion process is congruent between training and inference and allow the model to generate samples more faithful to the original data distribution.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes