Common Diffusion Noise Schedules and Sample Steps are Flawed

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lin, Shanchuan, Liu, Bingchen, Li, Jiashi, Yang, Xiao
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913206290612224
author Lin, Shanchuan
Liu, Bingchen
Li, Jiashi
Yang, Xiao
author_facet Lin, Shanchuan
Liu, Bingchen
Li, Jiashi
Yang, Xiao
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2305_08891
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Common Diffusion Noise Schedules and Sample Steps are Flawed
Lin, Shanchuan
Liu, Bingchen
Li, Jiashi
Yang, Xiao
Computer Vision and Pattern Recognition
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.
title Common Diffusion Noise Schedules and Sample Steps are Flawed
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2305.08891