From 9ac0b53005c8a0b781928b12c8fe60ed739c2dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sat, 29 Jul 2023 17:58:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20(docs)=20split=20by=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/make.jl | 2 ++ docs/src/beta_schedules.md | 32 +++++++++++++++++++++++++++++ docs/src/index.md | 41 +------------------------------------- docs/src/schedulers.md | 3 +++ 4 files changed, 38 insertions(+), 40 deletions(-) create mode 100644 docs/src/beta_schedules.md create mode 100644 docs/src/schedulers.md diff --git a/docs/make.jl b/docs/make.jl index 4b41d9b..65c388b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -16,5 +16,7 @@ makedocs(; ), pages=[ "Home" => "index.md", + "Schedulers" => "schedulers.md", + "Beta Schedules" => "beta_schedules.md", ] ) diff --git a/docs/src/beta_schedules.md b/docs/src/beta_schedules.md new file mode 100644 index 0000000..d2c5ce6 --- /dev/null +++ b/docs/src/beta_schedules.md @@ -0,0 +1,32 @@ +```@eval +using Diffusers.BetaSchedules +using Plots +plotlyjs() + +T = 1000 +linear = linear_beta_schedule(T) +scaled_linear = scaled_linear_beta_schedule(T) +cosine = cosine_beta_schedule(T) +sigmoid = sigmoid_beta_schedule(T) + +plot( + [linear, scaled_linear, cosine, sigmoid], + label=["linear" "scaled_linear" "cosine" "sigmoid"], + xlabel="t", + ylabel="β", + title="Beta schedules", + legend=:topleft, + yscale=:log10, +) + +savefig("fig_beta_schedules.html") +nothing +``` + +```@raw html + +``` + +```@autodocs +Modules = [Diffusers.BetaSchedules] +``` diff --git a/docs/src/index.md b/docs/src/index.md index 55ff327..26a6328 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -6,46 +6,7 @@ CurrentModule = Diffusers Documentation for [Diffusers.jl](https://github.com/Laurent2916/Diffusers.jl). -```@eval -using Diffusers.BetaSchedules -using Plots -plotlyjs() - -T = 1000 -linear = linear_beta_schedule(T) -scaled_linear = scaled_linear_beta_schedule(T) -cosine = cosine_beta_schedule(T) -sigmoid = sigmoid_beta_schedule(T) - -plot( - [linear, scaled_linear, cosine, sigmoid], - label=["linear" "scaled_linear" "cosine" "sigmoid"], - xlabel="t", - ylabel="β", - title="Beta schedules", - legend=:topleft, - yscale=:log10, -) - -savefig("beta_schedules.html") -nothing -``` - -```@raw html - -``` +## Index ```@index ``` - -```@autodocs -Modules = [Diffusers] -``` - -```@autodocs -Modules = [Diffusers.BetaSchedules] -``` - -```@autodocs -Modules = [Diffusers.Schedulers] -``` diff --git a/docs/src/schedulers.md b/docs/src/schedulers.md new file mode 100644 index 0000000..64c4b38 --- /dev/null +++ b/docs/src/schedulers.md @@ -0,0 +1,3 @@ +```@autodocs +Modules = [Diffusers.Schedulers] +```