Noise Schedule
In Diffusion Models, the noise schedule dictates how much noise is added to the data at each time step. The noise schedule is typically defined as a function that maps a time step into a value . Modular Diffusion comes with a growing set of prebuilt noise schedules.
Constant schedule
Constant noise schedule given by .
Parameters
steps
-> Number of time steps .value
-> Constant value .
Example
from diffusion.schedule import Constant
schedule = Constant(1000, 0.995)
Visualization
Applying Gaussian
noise to an image using the Constant
schedule with and in equally spaced snapshots:
Linear schedule
Linear noise schedule introduced in Ho et al. (2020) computed by linearly interpolating from to .
Parameters
steps
-> Number of time steps .start
-> Start value .end
-> End value .
Example
from diffusion.schedule import Linear
schedule = Linear(1000, 0.9999, 0.98)
Visualization
Applying Gaussian
noise to an image using the Linear
schedule with , and in equally spaced snapshots:
Cosine schedule
Cosine noise schedule introduced in Nichol et al. (2021) which offers a more gradual noising process relative to the linear schedule. It is defined as , where:
Parameters
steps
-> Number of time steps .offset
(default:8e-3
) -> Offset .exponent
(default:2
) -> Exponent .
Example
from diffusion.schedule import Cosine
schedule = Cosine(1000)
Visualization
Applying Gaussian
noise to an image using the Cosine
schedule with , and in equally spaced snapshots:
Square root schedule
Square root noise schedule introduced in Li et al. (2022). It is defined as , where .
Parameters
steps
-> Number of time steps .offset
(default:8e-3
) -> Offset .
Example
from diffusion.schedule import Sqrt
schedule = Sqrt(1000)
Visualization
Applying Gaussian
noise to an image using the Sqrt
schedule with and in equally spaced snapshots:
If you spot any typo or technical imprecision, please submit an issue or pull request to the library's GitHub repository .