Diffusers.BetaSchedules.cosine_beta_schedule
— FunctionCosine beta schedule.
\[\overline{\alpha}_t = \cos \left( \frac{t / T + \epsilon}{1 + \epsilon} \frac{\pi}{2} \right)\]
Input
T::Int
: number of timestepsβₘₐₓ::Real=0.999f0
: maximum value of βϵ::Real=1.0f-3
: small value used to avoid division by zero
Output
β::Vector{Real}
: βₜ values at each timestep t
References
Diffusers.BetaSchedules.exponential_beta_schedule
— FunctionExponential beta schedule.
\[\overline{\alpha}_t = \exp \left( \frac{-12 t}{T} \right)\]
Input
T::Int
: number of timestepsβₘₐₓ::Real=0.999f0
: maximum value of β
Output
β::Vector{Real}
: βₜ values at each timestep t
Diffusers.BetaSchedules.linear_beta_schedule
— FunctionLinear beta schedule.
\[\beta_t = \beta_1 + \frac{t - 1}{T - 1} (\beta_{-1} - \beta_1)\]
Input
T::Integer
: number of timestepsβ₁::Real=1.0f-4
: initial (t=1) value of ββ₋₁::Real=2.0f-2
: final (t=T) value of β
Output
β::Vector{Real}
: βₜ values at each timestep t
References
Diffusers.BetaSchedules.rescale_zero_terminal_snr
— MethodRescale β to have zero terminal Signal to Noise Ratio (SNR).
Input
β::AbstractArray
: βₜ values at each timestep t
Output
β::Vector{Real}
: rescaled βₜ values at each timestep t
References
Diffusers.BetaSchedules.scaled_linear_beta_schedule
— FunctionScaled linear beta schedule.
\[\beta_t = \left( \sqrt{\beta_1} + \frac{t - 1}{T - 1} \left( \sqrt{\beta_{-1}} - \sqrt{\beta_1} \right) \right)^2\]
Input
T::Int
: number of timestepsβ₁::Real=1.0f-4
: initial value of ββ₋₁::Real=2.0f-2
: final value of β
Output
β::Vector{Real}
: βₜ values at each timestep t
References
Diffusers.BetaSchedules.sigmoid_beta_schedule
— FunctionSigmoid beta schedule.
\[\beta_t = \sigma \left( 12 \frac{t - 1}{T - 1} - 6 \right) ( \beta_{-1} - \beta_1 ) + \beta_1\]
Input
T::Int
: number of timestepsβ₁::Real=1.0f-4
: initial value of ββ₋₁::Real=2.0f-2
: final value of β
Output
β::Vector{Real}
: βₜ values at each timestep t
References