mirror of
https://github.com/Laurent2916/Diffusers.jl.git
synced 2024-09-18 18:45:28 +00:00
📝 (Schedulers) fix non matching docstrings
This commit is contained in:
parent
4dfa3c92dc
commit
708e082874
|
@ -3,16 +3,14 @@ abstract type Scheduler end
|
|||
"""
|
||||
Add noise to clean data using the forward diffusion process.
|
||||
|
||||
cf. [[2006.11239] Denoising Diffusion Probabilistic Models](https://arxiv.org/abs/2006.11239) (Eq. 4)
|
||||
|
||||
## Input
|
||||
* `scheduler::Scheduler`: scheduler to use
|
||||
* `clean_data::AbstractArray`: clean data to add noise to
|
||||
* `noise::AbstractArray`: noise to add to clean data
|
||||
* `timesteps::AbstractArray`: timesteps used to weight the noise
|
||||
* `x₀::AbstractArray`: clean data to add noise to
|
||||
* `ϵ::AbstractArray`: noise to add to clean data
|
||||
* `t::AbstractArray`: timesteps used to weight the noise
|
||||
|
||||
## Output
|
||||
* `noisy_data::AbstractArray`: noisy data at the given timesteps
|
||||
* `xₜ::AbstractArray`: noisy data at the given timesteps
|
||||
"""
|
||||
function add_noise(
|
||||
scheduler::Scheduler,
|
||||
|
@ -23,6 +21,8 @@ function add_noise(
|
|||
⎷α̅ₜ = scheduler.⎷α̅[t]
|
||||
⎷β̅ₜ = scheduler.⎷β̅[t]
|
||||
|
||||
# noisify clean data
|
||||
# arxiv:2006.11239 Eq. 4
|
||||
xₜ = ⎷α̅ₜ' .* x₀ + ⎷β̅ₜ' .* ϵ
|
||||
|
||||
return xₜ
|
||||
|
|
Loading…
Reference in a new issue