import{s as Rs,o as Xs,n as ge}from"../chunks/scheduler.182ea377.js";import{S as Ns,i as Es,g,s as i,r as m,A as Hs,h as w,f as t,c as r,j as Bs,u as f,x as U,k as Je,y as Ys,a as l,v as h,d as M,t as y,w as b}from"../chunks/index.abf12888.js";import{T as Is}from"../chunks/Tip.230e2334.js";import{C as $}from"../chunks/CodeBlock.57fe6e13.js";import{D as Qs}from"../chunks/DocNotebookDropdown.5fa27ace.js";import{H as be,E as Fs}from"../chunks/EditOnGithub.9b8e78e4.js";import{H as qs,a as ds}from"../chunks/HfOption.fc88c804.js";function Ds(Z){let n,J='<a href="/docs/diffusers/v0.28.2/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a> typically generates higher quality images than the default scheduler.',p,o,u;return o=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMExNU0Rpc2NyZXRlU2NoZWR1bGVyJTBBJTBBcGlwZWxpbmUuc2NoZWR1bGVyJTIwJTNEJTIwTE1TRGlzY3JldGVTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZWxpbmUuc2NoZWR1bGVyLmNvbmZpZyklMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvcikuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LMSDiscreteScheduler

pipeline.scheduler = LMSDiscreteScheduler.from_config(pipeline.scheduler.config)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){n=g("p"),n.innerHTML=J,p=i(),m(o.$$.fragment)},l(a){n=w(a,"P",{"data-svelte-h":!0}),U(n)!=="svelte-1wcuk74"&&(n.innerHTML=J),p=r(a),f(o.$$.fragment,a)},m(a,d){l(a,n,d),l(a,p,d),h(o,a,d),u=!0},p:ge,i(a){u||(M(o.$$.fragment,a),u=!0)},o(a){y(o.$$.fragment,a),u=!1},d(a){a&&(t(n),t(p)),b(o,a)}}}function zs(Z){let n,J='<a href="/docs/diffusers/v0.28.2/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler">EulerDiscreteScheduler</a> can generate higher quality images in just 30 steps.',p,o,u;return o=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEV1bGVyRGlzY3JldGVTY2hlZHVsZXIlMEElMEFwaXBlbGluZS5zY2hlZHVsZXIlMjAlM0QlMjBFdWxlckRpc2NyZXRlU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGVsaW5lLnNjaGVkdWxlci5jb25maWcpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> EulerDiscreteScheduler

pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){n=g("p"),n.innerHTML=J,p=i(),m(o.$$.fragment)},l(a){n=w(a,"P",{"data-svelte-h":!0}),U(n)!=="svelte-kp9m12"&&(n.innerHTML=J),p=r(a),f(o.$$.fragment,a)},m(a,d){l(a,n,d),l(a,p,d),h(o,a,d),u=!0},p:ge,i(a){u||(M(o.$$.fragment,a),u=!0)},o(a){y(o.$$.fragment,a),u=!1},d(a){a&&(t(n),t(p)),b(o,a)}}}function Ls(Z){let n,J='<a href="/docs/diffusers/v0.28.2/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler">EulerAncestralDiscreteScheduler</a> can generate higher quality images in just 30 steps.',p,o,u;return o=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEV1bGVyQW5jZXN0cmFsRGlzY3JldGVTY2hlZHVsZXIlMEElMEFwaXBlbGluZS5zY2hlZHVsZXIlMjAlM0QlMjBFdWxlckFuY2VzdHJhbERpc2NyZXRlU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGVsaW5lLnNjaGVkdWxlci5jb25maWcpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> EulerAncestralDiscreteScheduler

pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(pipeline.scheduler.config)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){n=g("p"),n.innerHTML=J,p=i(),m(o.$$.fragment)},l(a){n=w(a,"P",{"data-svelte-h":!0}),U(n)!=="svelte-pq7kec"&&(n.innerHTML=J),p=r(a),f(o.$$.fragment,a)},m(a,d){l(a,n,d),l(a,p,d),h(o,a,d),u=!0},p:ge,i(a){u||(M(o.$$.fragment,a),u=!0)},o(a){y(o.$$.fragment,a),u=!1},d(a){a&&(t(n),t(p)),b(o,a)}}}function As(Z){let n,J='<a href="/docs/diffusers/v0.28.2/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler">DPMSolverMultistepScheduler</a> provides a balance between speed and quality and can generate higher quality images in just 20 steps.',p,o,u;return o=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlciUwQSUwQXBpcGVsaW5lLnNjaGVkdWxlciUyMCUzRCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlbGluZS5zY2hlZHVsZXIuY29uZmlnKSUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DPMSolverMultistepScheduler

pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){n=g("p"),n.innerHTML=J,p=i(),m(o.$$.fragment)},l(a){n=w(a,"P",{"data-svelte-h":!0}),U(n)!=="svelte-1gfkmga"&&(n.innerHTML=J),p=r(a),f(o.$$.fragment,a)},m(a,d){l(a,n,d),l(a,p,d),h(o,a,d),u=!0},p:ge,i(a){u||(M(o.$$.fragment,a),u=!0)},o(a){y(o.$$.fragment,a),u=!1},d(a){a&&(t(n),t(p)),b(o,a)}}}function Ps(Z){let n,J,p,o,u,a,d,v;return n=new ds({props:{id:"schedulers",option:"LMSDiscreteScheduler",$$slots:{default:[Ds]},$$scope:{ctx:Z}}}),p=new ds({props:{id:"schedulers",option:"EulerDiscreteScheduler",$$slots:{default:[zs]},$$scope:{ctx:Z}}}),u=new ds({props:{id:"schedulers",option:"EulerAncestralDiscreteScheduler",$$slots:{default:[Ls]},$$scope:{ctx:Z}}}),d=new ds({props:{id:"schedulers",option:"DPMSolverMultistepScheduler",$$slots:{default:[As]},$$scope:{ctx:Z}}}),{c(){m(n.$$.fragment),J=i(),m(p.$$.fragment),o=i(),m(u.$$.fragment),a=i(),m(d.$$.fragment)},l(c){f(n.$$.fragment,c),J=r(c),f(p.$$.fragment,c),o=r(c),f(u.$$.fragment,c),a=r(c),f(d.$$.fragment,c)},m(c,T){h(n,c,T),l(c,J,T),h(p,c,T),l(c,o,T),h(u,c,T),l(c,a,T),h(d,c,T),v=!0},p(c,T){const _={};T&2&&(_.$$scope={dirty:T,ctx:c}),n.$set(_);const j={};T&2&&(j.$$scope={dirty:T,ctx:c}),p.$set(j);const we={};T&2&&(we.$$scope={dirty:T,ctx:c}),u.$set(we);const x={};T&2&&(x.$$scope={dirty:T,ctx:c}),d.$set(x)},i(c){v||(M(n.$$.fragment,c),M(p.$$.fragment,c),M(u.$$.fragment,c),M(d.$$.fragment,c),v=!0)},o(c){y(n.$$.fragment,c),y(p.$$.fragment,c),y(u.$$.fragment,c),y(d.$$.fragment,c),v=!1},d(c){c&&(t(J),t(o),t(a)),b(n,c),b(p,c),b(u,c),b(d,c)}}}function Ks(Z){let n,J='The <code>FlaxLMSDiscreteScheduler</code> and <code>FlaxDDPMScheduler</code> are not compatible with the <a href="/docs/diffusers/v0.28.2/en/api/pipelines/stable_diffusion/text2img#diffusers.FlaxStableDiffusionPipeline">FlaxStableDiffusionPipeline</a> yet.';return{c(){n=g("p"),n.innerHTML=J},l(p){n=w(p,"P",{"data-svelte-h":!0}),U(n)!=="svelte-qebp24"&&(n.innerHTML=J)},m(p,o){l(p,n,o)},p:ge,d(p){p&&t(n)}}}function Os(Z){let n,J='🤗 Diffusers currently only supports <code>timesteps</code> and <code>sigmas</code> for a selected list of schedulers and pipelines, but feel free to open a <a href="https://github.com/huggingface/diffusers/issues/new/choose" rel="nofollow">feature request</a> if you want to extend feature to a scheduler and pipeline that does not currently support it!';return{c(){n=g("p"),n.innerHTML=J},l(p){n=w(p,"P",{"data-svelte-h":!0}),U(n)!=="svelte-1cr3u6h"&&(n.innerHTML=J)},m(p,o){l(p,n,o)},p:ge,d(p){p&&t(n)}}}function et(Z){let n,J,p,o,u,a,d,v,c,T="Diffusion pipelines are a collection of interchangeable schedulers and models that can be mixed and matched to tailor a pipeline to a specific use case. The scheduler encapsulates the entire denoising process such as the number of denoising steps and the algorithm for finding the denoised sample. A scheduler is not parameterized or trained so they don’t take very much memory. The model is usually only concerned with the forward pass of going from a noisy input to a less noisy sample.",_,j,we='This guide will show you how to load schedulers and models to customize a pipeline. You’ll use the <a href="https://hf.co/runwayml/stable-diffusion-v1-5" rel="nofollow">runwayml/stable-diffusion-v1-5</a> checkpoint throughout this guide, so let’s load it first.',x,B,Te,I,ms="You can see what scheduler this pipeline uses with the <code>pipeline.scheduler</code> attribute.",$e,R,Ze,X,je,N,fs='Schedulers are defined by a configuration file that can be used by a variety of schedulers. Load a scheduler with the <a href="/docs/diffusers/v0.28.2/en/api/schedulers/overview#diffusers.SchedulerMixin.from_pretrained">SchedulerMixin.from_pretrained()</a> method, and specify the <code>subfolder</code> parameter to load the configuration file into the correct subfolder of the pipeline repository.',ve,E,hs='For example, to load the <a href="/docs/diffusers/v0.28.2/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>:',Ge,H,We,Y,Ms="Then you can pass the newly loaded scheduler to the pipeline.",Ce,Q,Ve,F,ke,q,ys="Schedulers have their own unique strengths and weaknesses, making it difficult to quantitatively compare which scheduler works best for a pipeline. You typically have to make a trade-off between denoising speed and denoising quality. We recommend trying out different schedulers to find one that works best for your use case. Call the <code>pipeline.scheduler.compatibles</code> attribute to see what schedulers are compatible with a pipeline.",Se,D,bs='Let’s compare the <a href="/docs/diffusers/v0.28.2/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, <a href="/docs/diffusers/v0.28.2/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler">EulerDiscreteScheduler</a>, <a href="/docs/diffusers/v0.28.2/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler">EulerAncestralDiscreteScheduler</a>, and the <a href="/docs/diffusers/v0.28.2/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler">DPMSolverMultistepScheduler</a> on the following prompt and seed.',_e,z,xe,L,gs='To change the pipelines scheduler, use the <a href="/docs/diffusers/v0.28.2/en/api/configuration#diffusers.ConfigMixin.from_config">from_config()</a> method to load a different scheduler’s <code>pipeline.scheduler.config</code> into the pipeline.',Be,G,Ie,W,ws='<div><img class="rounded-xl" src="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_lms.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">LMSDiscreteScheduler</figcaption></div> <div><img class="rounded-xl" src="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_euler_discrete.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">EulerDiscreteScheduler</figcaption></div>',Re,C,Us='<div><img class="rounded-xl" src="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_euler_ancestral.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">EulerAncestralDiscreteScheduler</figcaption></div> <div><img class="rounded-xl" src="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_dpm.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">DPMSolverMultistepScheduler</figcaption></div>',Xe,A,Js="Most images look very similar and are comparable in quality. Again, it often comes down to your specific use case so a good approach is to run multiple different schedulers and compare the results.",Ne,P,Ee,K,Ts='To compare Flax schedulers, you need to additionally load the scheduler state into the model parameters. For example, let’s change the default scheduler in <a href="/docs/diffusers/v0.28.2/en/api/pipelines/stable_diffusion/text2img#diffusers.FlaxStableDiffusionPipeline">FlaxStableDiffusionPipeline</a> to use the super fast <code>FlaxDPMSolverMultistepScheduler</code>.',He,V,Ye,O,Qe,ee,$s="Then you can take advantage of Flax’s compatibility with TPUs to generate a number of images in parallel. You’ll need to make a copy of the model parameters for each available device and then split the inputs across them to generate your desired number of images.",Fe,se,qe,te,De,le,Zs='With all our schedulers, you can choose one of the popular timestep schedules using configurations such as <code>timestep_spacing</code>, <code>interpolation_type</code>, and <code>use_karras_sigmas</code>. Some schedulers also provide the flexibility to use a custom timestep schedule. You can use any list of arbitrary timesteps, we will use the AYS timestep schedule here as example. It is a set of 10-step optimized timestep schedules released by researchers from Nvidia that can achieve significantly better quality compared to the preset timestep schedules. You can read more about their research <a href="https://research.nvidia.com/labs/toronto-ai/AlignYourSteps/" rel="nofollow">here</a>.',ze,ae,Le,ne,Ae,ie,js="You can then create a pipeline and pass this custom timestep schedule to it as <code>timesteps</code>.",Pe,re,Ke,pe,vs="The generated image has better quality than the default linear timestep schedule for the same number of steps, and it is similar to the default timestep scheduler when running for 25 steps.",Oe,k,Gs='<div><img class="rounded-xl" src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ays.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">AYS timestep schedule 10 steps</figcaption></div> <div><img class="rounded-xl" src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/10.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">Linearly-spaced timestep schedule 10 steps</figcaption></div> <div><img class="rounded-xl" src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/25.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">Linearly-spaced timestep schedule 25 steps</figcaption></div>',es,S,ss,oe,ts,ce,Ws='Models are loaded from the <a href="/docs/diffusers/v0.28.2/en/api/models/overview#diffusers.ModelMixin.from_pretrained">ModelMixin.from_pretrained()</a> method, which downloads and caches the latest version of the model weights and configurations. If the latest files are available in the local cache, <a href="/docs/diffusers/v0.28.2/en/api/models/overview#diffusers.ModelMixin.from_pretrained">from_pretrained()</a> reuses files in the cache instead of re-downloading them.',ls,ue,Cs='Models can be loaded from a subfolder with the <code>subfolder</code> argument. For example, the model weights for <a href="https://hf.co/runwayml/stable-diffusion-v1-5" rel="nofollow">runwayml/stable-diffusion-v1-5</a> are stored in the <a href="https://hf.co/runwayml/stable-diffusion-v1-5/tree/main/unet" rel="nofollow">unet</a> subfolder.',as,de,ns,me,Vs='They can also be directly loaded from a <a href="https://huggingface.co/google/ddpm-cifar10-32/tree/main" rel="nofollow">repository</a>.',is,fe,rs,he,ks='To load and save model variants, specify the <code>variant</code> argument in <a href="/docs/diffusers/v0.28.2/en/api/models/overview#diffusers.ModelMixin.from_pretrained">ModelMixin.from_pretrained()</a> and <a href="/docs/diffusers/v0.28.2/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.',ps,Me,os,ye,cs,Ue,us;return u=new be({props:{title:"Load schedulers and models",local:"load-schedulers-and-models",headingTag:"h1"}}),d=new Qs({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/schedulers.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/schedulers.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/schedulers.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/schedulers.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/schedulers.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/schedulers.ipynb"}]}}),B=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMEEpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>
).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),R=new $({props:{code:"cGlwZWxpbmUuc2NoZWR1bGVyJTBBUE5ETVNjaGVkdWxlciUyMCU3QiUwQSUyMCUyMCUyMl9jbGFzc19uYW1lJTIyJTNBJTIwJTIyUE5ETVNjaGVkdWxlciUyMiUyQyUwQSUyMCUyMCUyMl9kaWZmdXNlcnNfdmVyc2lvbiUyMiUzQSUyMCUyMjAuMjEuNCUyMiUyQyUwQSUyMCUyMCUyMmJldGFfZW5kJTIyJTNBJTIwMC4wMTIlMkMlMEElMjAlMjAlMjJiZXRhX3NjaGVkdWxlJTIyJTNBJTIwJTIyc2NhbGVkX2xpbmVhciUyMiUyQyUwQSUyMCUyMCUyMmJldGFfc3RhcnQlMjIlM0ElMjAwLjAwMDg1JTJDJTBBJTIwJTIwJTIyY2xpcF9zYW1wbGUlMjIlM0ElMjBmYWxzZSUyQyUwQSUyMCUyMCUyMm51bV90cmFpbl90aW1lc3RlcHMlMjIlM0ElMjAxMDAwJTJDJTBBJTIwJTIwJTIyc2V0X2FscGhhX3RvX29uZSUyMiUzQSUyMGZhbHNlJTJDJTBBJTIwJTIwJTIyc2tpcF9wcmtfc3RlcHMlMjIlM0ElMjB0cnVlJTJDJTBBJTIwJTIwJTIyc3RlcHNfb2Zmc2V0JTIyJTNBJTIwMSUyQyUwQSUyMCUyMCUyMnRpbWVzdGVwX3NwYWNpbmclMjIlM0ElMjAlMjJsZWFkaW5nJTIyJTJDJTBBJTIwJTIwJTIydHJhaW5lZF9iZXRhcyUyMiUzQSUyMG51bGwlMEElN0Q=",highlighted:`pipeline.scheduler
PNDMScheduler {
  <span class="hljs-string">&quot;_class_name&quot;</span>: <span class="hljs-string">&quot;PNDMScheduler&quot;</span>,
  <span class="hljs-string">&quot;_diffusers_version&quot;</span>: <span class="hljs-string">&quot;0.21.4&quot;</span>,
  <span class="hljs-string">&quot;beta_end&quot;</span>: <span class="hljs-number">0.012</span>,
  <span class="hljs-string">&quot;beta_schedule&quot;</span>: <span class="hljs-string">&quot;scaled_linear&quot;</span>,
  <span class="hljs-string">&quot;beta_start&quot;</span>: <span class="hljs-number">0.00085</span>,
  <span class="hljs-string">&quot;clip_sample&quot;</span>: false,
  <span class="hljs-string">&quot;num_train_timesteps&quot;</span>: <span class="hljs-number">1000</span>,
  <span class="hljs-string">&quot;set_alpha_to_one&quot;</span>: false,
  <span class="hljs-string">&quot;skip_prk_steps&quot;</span>: true,
  <span class="hljs-string">&quot;steps_offset&quot;</span>: <span class="hljs-number">1</span>,
  <span class="hljs-string">&quot;timestep_spacing&quot;</span>: <span class="hljs-string">&quot;leading&quot;</span>,
  <span class="hljs-string">&quot;trained_betas&quot;</span>: null
}`,wrap:!1}}),X=new be({props:{title:"Load a scheduler",local:"load-a-scheduler",headingTag:"h2"}}),H=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERESU1TY2hlZHVsZXIlMkMlMjBEaWZmdXNpb25QaXBlbGluZSUwQSUwQWRkaW0lMjAlM0QlMjBERElNU2NoZWR1bGVyLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnNjaGVkdWxlciUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMScheduler, DiffusionPipeline

ddim = DDIMScheduler.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)`,wrap:!1}}),Q=new $({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjBzY2hlZHVsZXIlM0RkZGltJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUwQSkudG8oJTIyY3VkYSUyMik=",highlighted:`pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, scheduler=ddim, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>
).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),F=new be({props:{title:"Compare schedulers",local:"compare-schedulers",headingTag:"h2"}}),z=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMHBob3RvZ3JhcGglMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBNYXJzJTJDJTIwaGlnaCUyMHJlc29sdXRpb24lMkMlMjBoaWdoJTIwZGVmaW5pdGlvbi4lMjIlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3VkYSUyMikubWFudWFsX3NlZWQoOCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;A photograph of an astronaut riding a horse on Mars, high resolution, high definition.&quot;</span>
generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)`,wrap:!1}}),G=new qs({props:{id:"schedulers",options:["LMSDiscreteScheduler","EulerDiscreteScheduler","EulerAncestralDiscreteScheduler","DPMSolverMultistepScheduler"],$$slots:{default:[Ps]},$$scope:{ctx:Z}}}),P=new be({props:{title:"Flax schedulers",local:"flax-schedulers",headingTag:"h3"}}),V=new Is({props:{warning:!0,$$slots:{default:[Ks]},$$scope:{ctx:Z}}}),O=new $({props:{code:"aW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBZnJvbSUyMGZsYXguamF4X3V0aWxzJTIwaW1wb3J0JTIwcmVwbGljYXRlJTBBZnJvbSUyMGZsYXgudHJhaW5pbmcuY29tbW9uX3V0aWxzJTIwaW1wb3J0JTIwc2hhcmQlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRmxheFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTJDJTIwRmxheERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlciUwQSUwQXNjaGVkdWxlciUyQyUyMHNjaGVkdWxlcl9zdGF0ZSUyMCUzRCUyMEZsYXhEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIyc2NoZWR1bGVyJTIyJTBBKSUwQXBpcGVsaW5lJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMHNjaGVkdWxlciUzRHNjaGVkdWxlciUyQyUwQSUyMCUyMCUyMCUyMHJldmlzaW9uJTNEJTIyYmYxNiUyMiUyQyUwQSUyMCUyMCUyMCUyMGR0eXBlJTNEamF4Lm51bXB5LmJmbG9hdDE2JTJDJTBBKSUwQXBhcmFtcyU1QiUyMnNjaGVkdWxlciUyMiU1RCUyMCUzRCUyMHNjaGVkdWxlcl9zdGF0ZQ==",highlighted:`<span class="hljs-keyword">import</span> jax
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">from</span> flax.jax_utils <span class="hljs-keyword">import</span> replicate
<span class="hljs-keyword">from</span> flax.training.common_utils <span class="hljs-keyword">import</span> shard
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxStableDiffusionPipeline, FlaxDPMSolverMultistepScheduler

scheduler, scheduler_state = FlaxDPMSolverMultistepScheduler.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>
)
pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    scheduler=scheduler,
    revision=<span class="hljs-string">&quot;bf16&quot;</span>,
    dtype=jax.numpy.bfloat16,
)
params[<span class="hljs-string">&quot;scheduler&quot;</span>] = scheduler_state`,wrap:!1}}),se=new $({props:{code:"JTIzJTIwR2VuZXJhdGUlMjAxJTIwaW1hZ2UlMjBwZXIlMjBwYXJhbGxlbCUyMGRldmljZSUyMCg4JTIwb24lMjBUUFV2Mi04JTIwb3IlMjBUUFV2My04KSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBwaG90b2dyYXBoJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwTWFycyUyQyUyMGhpZ2glMjByZXNvbHV0aW9uJTJDJTIwaGlnaCUyMGRlZmluaXRpb24uJTIyJTBBbnVtX3NhbXBsZXMlMjAlM0QlMjBqYXguZGV2aWNlX2NvdW50KCklMEFwcm9tcHRfaWRzJTIwJTNEJTIwcGlwZWxpbmUucHJlcGFyZV9pbnB1dHMoJTVCcHJvbXB0JTVEJTIwKiUyMG51bV9zYW1wbGVzKSUwQSUwQXBybmdfc2VlZCUyMCUzRCUyMGpheC5yYW5kb20uUFJOR0tleSgwKSUwQW51bV9pbmZlcmVuY2Vfc3RlcHMlMjAlM0QlMjAyNSUwQSUwQSUyMyUyMHNoYXJkJTIwaW5wdXRzJTIwYW5kJTIwcm5nJTBBcGFyYW1zJTIwJTNEJTIwcmVwbGljYXRlKHBhcmFtcyklMEFwcm5nX3NlZWQlMjAlM0QlMjBqYXgucmFuZG9tLnNwbGl0KHBybmdfc2VlZCUyQyUyMGpheC5kZXZpY2VfY291bnQoKSklMEFwcm9tcHRfaWRzJTIwJTNEJTIwc2hhcmQocHJvbXB0X2lkcyklMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZShwcm9tcHRfaWRzJTJDJTIwcGFyYW1zJTJDJTIwcHJuZ19zZWVkJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUyQyUyMGppdCUzRFRydWUpLmltYWdlcyUwQWltYWdlcyUyMCUzRCUyMHBpcGVsaW5lLm51bXB5X3RvX3BpbChucC5hc2FycmF5KGltYWdlcy5yZXNoYXBlKChudW1fc2FtcGxlcyUyQyklMjAlMkIlMjBpbWFnZXMuc2hhcGUlNUItMyUzQSU1RCkpKQ==",highlighted:`<span class="hljs-comment"># Generate 1 image per parallel device (8 on TPUv2-8 or TPUv3-8)</span>
prompt = <span class="hljs-string">&quot;A photograph of an astronaut riding a horse on Mars, high resolution, high definition.&quot;</span>
num_samples = jax.device_count()
prompt_ids = pipeline.prepare_inputs([prompt] * num_samples)

prng_seed = jax.random.PRNGKey(<span class="hljs-number">0</span>)
num_inference_steps = <span class="hljs-number">25</span>

<span class="hljs-comment"># shard inputs and rng</span>
params = replicate(params)
prng_seed = jax.random.split(prng_seed, jax.device_count())
prompt_ids = shard(prompt_ids)

images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=<span class="hljs-literal">True</span>).images
images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-<span class="hljs-number">3</span>:])))`,wrap:!1}}),te=new be({props:{title:"Custom Timestep Schedules",local:"custom-timestep-schedules",headingTag:"h2"}}),ae=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy5zY2hlZHVsZXJzJTIwaW1wb3J0JTIwQXlzU2NoZWR1bGVzJTBBc2FtcGxpbmdfc2NoZWR1bGUlMjAlM0QlMjBBeXNTY2hlZHVsZXMlNUIlMjJTdGFibGVEaWZmdXNpb25YTFRpbWVzdGVwcyUyMiU1RCUwQXByaW50KHNhbXBsaW5nX3NjaGVkdWxlKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers.schedulers <span class="hljs-keyword">import</span> AysSchedules
sampling_schedule = AysSchedules[<span class="hljs-string">&quot;StableDiffusionXLTimesteps&quot;</span>]
<span class="hljs-built_in">print</span>(sampling_schedule)`,wrap:!1}}),ne=new $({props:{code:"JTVCOTk5JTJDJTIwODQ1JTJDJTIwNzMwJTJDJTIwNTg3JTJDJTIwNDQzJTJDJTIwMzEwJTJDJTIwMTkzJTJDJTIwMTE2JTJDJTIwNTMlMkMlMjAxMyU1RA==",highlighted:'<span class="hljs-string">[999, 845, 730, 587, 443, 310, 193, 116, 53, 13]</span>',wrap:!1}}),re=new $({props:{code:"cGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMlNHMTYxMjIyJTJGUmVhbFZpc1hMX1Y0LjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLnNjaGVkdWxlciUyMCUzRCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWclMkMlMjBhbGdvcml0aG1fdHlwZSUzRCUyMnNkZS1kcG1zb2x2ZXIlMkIlMkIlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGNpbmVtYXRpYyUyMHNob3QlMjBvZiUyMGElMjBjdXRlJTIwbGl0dGxlJTIwcmFiYml0JTIwd2VhcmluZyUyMGElMjBqYWNrZXQlMjBhbmQlMjBkb2luZyUyMGElMjB0aHVtYnMlMjB1cCUyMiUwQSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjcHUlMjIpLm1hbnVhbF9zZWVkKDI0ODc4NTQ0NDYpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMG5lZ2F0aXZlX3Byb21wdCUzRCUyMiUyMiUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSUyMCUyMCUyMCUyMHRpbWVzdGVwcyUzRHNhbXBsaW5nX3NjaGVkdWxlJTJDJTBBKS5pbWFnZXMlNUIwJTVE",highlighted:`pipe = StableDiffusionXLPipeline.from_pretrained(
    <span class="hljs-string">&quot;SG161222/RealVisXL_V4.0&quot;</span>,
    torch_dtype=torch.float16,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, algorithm_type=<span class="hljs-string">&quot;sde-dpmsolver++&quot;</span>)

prompt = <span class="hljs-string">&quot;A cinematic shot of a cute little rabbit wearing a jacket and doing a thumbs up&quot;</span>

generator = torch.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">2487854446</span>)

image = pipe(
    prompt=prompt,
    negative_prompt=<span class="hljs-string">&quot;&quot;</span>,
    generator=generator,
    timesteps=sampling_schedule,
).images[<span class="hljs-number">0</span>]`,wrap:!1}}),S=new Is({props:{warning:!1,$$slots:{default:[Os]},$$scope:{ctx:Z}}}),oe=new be({props:{title:"Models",local:"models",headingTag:"h2"}}),de=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, use_safetensors=<span class="hljs-literal">True</span>)`,wrap:!1}}),fe=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRE1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZkZHBtLWNpZmFyMTAtMzIlMjIlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DModel

unet = UNet2DModel.from_pretrained(<span class="hljs-string">&quot;google/ddpm-cifar10-32&quot;</span>, use_safetensors=<span class="hljs-literal">True</span>)`,wrap:!1}}),Me=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIlMkMlMjB2YXJpYW50JTNEJTIybm9uX2VtYSUyMiUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMEEpJTBBdW5ldC5zYXZlX3ByZXRyYWluZWQoJTIyLiUyRmxvY2FsLXVuZXQlMjIlMkMlMjB2YXJpYW50JTNEJTIybm9uX2VtYSUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

unet = UNet2DConditionModel.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, variant=<span class="hljs-string">&quot;non_ema&quot;</span>, use_safetensors=<span class="hljs-literal">True</span>
)
unet.save_pretrained(<span class="hljs-string">&quot;./local-unet&quot;</span>, variant=<span class="hljs-string">&quot;non_ema&quot;</span>)`,wrap:!1}}),ye=new Fs({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/schedulers.md"}}),{c(){n=g("meta"),J=i(),p=g("p"),o=i(),m(u.$$.fragment),a=i(),m(d.$$.fragment),v=i(),c=g("p"),c.textContent=T,_=i(),j=g("p"),j.innerHTML=we,x=i(),m(B.$$.fragment),Te=i(),I=g("p"),I.innerHTML=ms,$e=i(),m(R.$$.fragment),Ze=i(),m(X.$$.fragment),je=i(),N=g("p"),N.innerHTML=fs,ve=i(),E=g("p"),E.innerHTML=hs,Ge=i(),m(H.$$.fragment),We=i(),Y=g("p"),Y.textContent=Ms,Ce=i(),m(Q.$$.fragment),Ve=i(),m(F.$$.fragment),ke=i(),q=g("p"),q.innerHTML=ys,Se=i(),D=g("p"),D.innerHTML=bs,_e=i(),m(z.$$.fragment),xe=i(),L=g("p"),L.innerHTML=gs,Be=i(),m(G.$$.fragment),Ie=i(),W=g("div"),W.innerHTML=ws,Re=i(),C=g("div"),C.innerHTML=Us,Xe=i(),A=g("p"),A.textContent=Js,Ne=i(),m(P.$$.fragment),Ee=i(),K=g("p"),K.innerHTML=Ts,He=i(),m(V.$$.fragment),Ye=i(),m(O.$$.fragment),Qe=i(),ee=g("p"),ee.textContent=$s,Fe=i(),m(se.$$.fragment),qe=i(),m(te.$$.fragment),De=i(),le=g("p"),le.innerHTML=Zs,ze=i(),m(ae.$$.fragment),Le=i(),m(ne.$$.fragment),Ae=i(),ie=g("p"),ie.innerHTML=js,Pe=i(),m(re.$$.fragment),Ke=i(),pe=g("p"),pe.textContent=vs,Oe=i(),k=g("div"),k.innerHTML=Gs,es=i(),m(S.$$.fragment),ss=i(),m(oe.$$.fragment),ts=i(),ce=g("p"),ce.innerHTML=Ws,ls=i(),ue=g("p"),ue.innerHTML=Cs,as=i(),m(de.$$.fragment),ns=i(),me=g("p"),me.innerHTML=Vs,is=i(),m(fe.$$.fragment),rs=i(),he=g("p"),he.innerHTML=ks,ps=i(),m(Me.$$.fragment),os=i(),m(ye.$$.fragment),cs=i(),Ue=g("p"),this.h()},l(e){const s=Hs("svelte-u9bgzb",document.head);n=w(s,"META",{name:!0,content:!0}),s.forEach(t),J=r(e),p=w(e,"P",{}),Bs(p).forEach(t),o=r(e),f(u.$$.fragment,e),a=r(e),f(d.$$.fragment,e),v=r(e),c=w(e,"P",{"data-svelte-h":!0}),U(c)!=="svelte-147f8qd"&&(c.textContent=T),_=r(e),j=w(e,"P",{"data-svelte-h":!0}),U(j)!=="svelte-yswnun"&&(j.innerHTML=we),x=r(e),f(B.$$.fragment,e),Te=r(e),I=w(e,"P",{"data-svelte-h":!0}),U(I)!=="svelte-bntjs"&&(I.innerHTML=ms),$e=r(e),f(R.$$.fragment,e),Ze=r(e),f(X.$$.fragment,e),je=r(e),N=w(e,"P",{"data-svelte-h":!0}),U(N)!=="svelte-1w4qviy"&&(N.innerHTML=fs),ve=r(e),E=w(e,"P",{"data-svelte-h":!0}),U(E)!=="svelte-1c0hx9k"&&(E.innerHTML=hs),Ge=r(e),f(H.$$.fragment,e),We=r(e),Y=w(e,"P",{"data-svelte-h":!0}),U(Y)!=="svelte-1gk96nj"&&(Y.textContent=Ms),Ce=r(e),f(Q.$$.fragment,e),Ve=r(e),f(F.$$.fragment,e),ke=r(e),q=w(e,"P",{"data-svelte-h":!0}),U(q)!=="svelte-gbqn3x"&&(q.innerHTML=ys),Se=r(e),D=w(e,"P",{"data-svelte-h":!0}),U(D)!=="svelte-4odhn7"&&(D.innerHTML=bs),_e=r(e),f(z.$$.fragment,e),xe=r(e),L=w(e,"P",{"data-svelte-h":!0}),U(L)!=="svelte-1wm8aeg"&&(L.innerHTML=gs),Be=r(e),f(G.$$.fragment,e),Ie=r(e),W=w(e,"DIV",{class:!0,"data-svelte-h":!0}),U(W)!=="svelte-k6zsrl"&&(W.innerHTML=ws),Re=r(e),C=w(e,"DIV",{class:!0,"data-svelte-h":!0}),U(C)!=="svelte-8ii4fv"&&(C.innerHTML=Us),Xe=r(e),A=w(e,"P",{"data-svelte-h":!0}),U(A)!=="svelte-95mtrv"&&(A.textContent=Js),Ne=r(e),f(P.$$.fragment,e),Ee=r(e),K=w(e,"P",{"data-svelte-h":!0}),U(K)!=="svelte-1gqd1na"&&(K.innerHTML=Ts),He=r(e),f(V.$$.fragment,e),Ye=r(e),f(O.$$.fragment,e),Qe=r(e),ee=w(e,"P",{"data-svelte-h":!0}),U(ee)!=="svelte-cu42wu"&&(ee.textContent=$s),Fe=r(e),f(se.$$.fragment,e),qe=r(e),f(te.$$.fragment,e),De=r(e),le=w(e,"P",{"data-svelte-h":!0}),U(le)!=="svelte-izhaa7"&&(le.innerHTML=Zs),ze=r(e),f(ae.$$.fragment,e),Le=r(e),f(ne.$$.fragment,e),Ae=r(e),ie=w(e,"P",{"data-svelte-h":!0}),U(ie)!=="svelte-s90cd7"&&(ie.innerHTML=js),Pe=r(e),f(re.$$.fragment,e),Ke=r(e),pe=w(e,"P",{"data-svelte-h":!0}),U(pe)!=="svelte-16ow1zj"&&(pe.textContent=vs),Oe=r(e),k=w(e,"DIV",{class:!0,"data-svelte-h":!0}),U(k)!=="svelte-1wwk2vr"&&(k.innerHTML=Gs),es=r(e),f(S.$$.fragment,e),ss=r(e),f(oe.$$.fragment,e),ts=r(e),ce=w(e,"P",{"data-svelte-h":!0}),U(ce)!=="svelte-drwtrg"&&(ce.innerHTML=Ws),ls=r(e),ue=w(e,"P",{"data-svelte-h":!0}),U(ue)!=="svelte-12b8wvr"&&(ue.innerHTML=Cs),as=r(e),f(de.$$.fragment,e),ns=r(e),me=w(e,"P",{"data-svelte-h":!0}),U(me)!=="svelte-1r8gmv0"&&(me.innerHTML=Vs),is=r(e),f(fe.$$.fragment,e),rs=r(e),he=w(e,"P",{"data-svelte-h":!0}),U(he)!=="svelte-yon89r"&&(he.innerHTML=ks),ps=r(e),f(Me.$$.fragment,e),os=r(e),f(ye.$$.fragment,e),cs=r(e),Ue=w(e,"P",{}),Bs(Ue).forEach(t),this.h()},h(){Je(n,"name","hf:doc:metadata"),Je(n,"content",st),Je(W,"class","flex gap-4"),Je(C,"class","flex gap-4"),Je(k,"class","flex gap-4")},m(e,s){Ys(document.head,n),l(e,J,s),l(e,p,s),l(e,o,s),h(u,e,s),l(e,a,s),h(d,e,s),l(e,v,s),l(e,c,s),l(e,_,s),l(e,j,s),l(e,x,s),h(B,e,s),l(e,Te,s),l(e,I,s),l(e,$e,s),h(R,e,s),l(e,Ze,s),h(X,e,s),l(e,je,s),l(e,N,s),l(e,ve,s),l(e,E,s),l(e,Ge,s),h(H,e,s),l(e,We,s),l(e,Y,s),l(e,Ce,s),h(Q,e,s),l(e,Ve,s),h(F,e,s),l(e,ke,s),l(e,q,s),l(e,Se,s),l(e,D,s),l(e,_e,s),h(z,e,s),l(e,xe,s),l(e,L,s),l(e,Be,s),h(G,e,s),l(e,Ie,s),l(e,W,s),l(e,Re,s),l(e,C,s),l(e,Xe,s),l(e,A,s),l(e,Ne,s),h(P,e,s),l(e,Ee,s),l(e,K,s),l(e,He,s),h(V,e,s),l(e,Ye,s),h(O,e,s),l(e,Qe,s),l(e,ee,s),l(e,Fe,s),h(se,e,s),l(e,qe,s),h(te,e,s),l(e,De,s),l(e,le,s),l(e,ze,s),h(ae,e,s),l(e,Le,s),h(ne,e,s),l(e,Ae,s),l(e,ie,s),l(e,Pe,s),h(re,e,s),l(e,Ke,s),l(e,pe,s),l(e,Oe,s),l(e,k,s),l(e,es,s),h(S,e,s),l(e,ss,s),h(oe,e,s),l(e,ts,s),l(e,ce,s),l(e,ls,s),l(e,ue,s),l(e,as,s),h(de,e,s),l(e,ns,s),l(e,me,s),l(e,is,s),h(fe,e,s),l(e,rs,s),l(e,he,s),l(e,ps,s),h(Me,e,s),l(e,os,s),h(ye,e,s),l(e,cs,s),l(e,Ue,s),us=!0},p(e,[s]){const Ss={};s&2&&(Ss.$$scope={dirty:s,ctx:e}),G.$set(Ss);const _s={};s&2&&(_s.$$scope={dirty:s,ctx:e}),V.$set(_s);const xs={};s&2&&(xs.$$scope={dirty:s,ctx:e}),S.$set(xs)},i(e){us||(M(u.$$.fragment,e),M(d.$$.fragment,e),M(B.$$.fragment,e),M(R.$$.fragment,e),M(X.$$.fragment,e),M(H.$$.fragment,e),M(Q.$$.fragment,e),M(F.$$.fragment,e),M(z.$$.fragment,e),M(G.$$.fragment,e),M(P.$$.fragment,e),M(V.$$.fragment,e),M(O.$$.fragment,e),M(se.$$.fragment,e),M(te.$$.fragment,e),M(ae.$$.fragment,e),M(ne.$$.fragment,e),M(re.$$.fragment,e),M(S.$$.fragment,e),M(oe.$$.fragment,e),M(de.$$.fragment,e),M(fe.$$.fragment,e),M(Me.$$.fragment,e),M(ye.$$.fragment,e),us=!0)},o(e){y(u.$$.fragment,e),y(d.$$.fragment,e),y(B.$$.fragment,e),y(R.$$.fragment,e),y(X.$$.fragment,e),y(H.$$.fragment,e),y(Q.$$.fragment,e),y(F.$$.fragment,e),y(z.$$.fragment,e),y(G.$$.fragment,e),y(P.$$.fragment,e),y(V.$$.fragment,e),y(O.$$.fragment,e),y(se.$$.fragment,e),y(te.$$.fragment,e),y(ae.$$.fragment,e),y(ne.$$.fragment,e),y(re.$$.fragment,e),y(S.$$.fragment,e),y(oe.$$.fragment,e),y(de.$$.fragment,e),y(fe.$$.fragment,e),y(Me.$$.fragment,e),y(ye.$$.fragment,e),us=!1},d(e){e&&(t(J),t(p),t(o),t(a),t(v),t(c),t(_),t(j),t(x),t(Te),t(I),t($e),t(Ze),t(je),t(N),t(ve),t(E),t(Ge),t(We),t(Y),t(Ce),t(Ve),t(ke),t(q),t(Se),t(D),t(_e),t(xe),t(L),t(Be),t(Ie),t(W),t(Re),t(C),t(Xe),t(A),t(Ne),t(Ee),t(K),t(He),t(Ye),t(Qe),t(ee),t(Fe),t(qe),t(De),t(le),t(ze),t(Le),t(Ae),t(ie),t(Pe),t(Ke),t(pe),t(Oe),t(k),t(es),t(ss),t(ts),t(ce),t(ls),t(ue),t(as),t(ns),t(me),t(is),t(rs),t(he),t(ps),t(os),t(cs),t(Ue)),t(n),b(u,e),b(d,e),b(B,e),b(R,e),b(X,e),b(H,e),b(Q,e),b(F,e),b(z,e),b(G,e),b(P,e),b(V,e),b(O,e),b(se,e),b(te,e),b(ae,e),b(ne,e),b(re,e),b(S,e),b(oe,e),b(de,e),b(fe,e),b(Me,e),b(ye,e)}}}const st='{"title":"Load schedulers and models","local":"load-schedulers-and-models","sections":[{"title":"Load a scheduler","local":"load-a-scheduler","sections":[],"depth":2},{"title":"Compare schedulers","local":"compare-schedulers","sections":[{"title":"Flax schedulers","local":"flax-schedulers","sections":[],"depth":3}],"depth":2},{"title":"Custom Timestep Schedules","local":"custom-timestep-schedules","sections":[],"depth":2},{"title":"Models","local":"models","sections":[],"depth":2}],"depth":1}';function tt(Z){return Xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ct extends Ns{constructor(n){super(),Es(this,n,tt,et,Rs,{})}}export{ct as component};
