import{S as vn,i as Zn,s as Un,e as t,k as c,w as f,t as o,M as jn,c as r,d as l,m as u,a as i,x as d,h as p,b as h,N as Ql,G as s,g as n,y as m,q as M,o as y,B as b,v as Jn}from"../../chunks/vendor-hf-doc-builder.js";import{T as _n}from"../../chunks/Tip-hf-doc-builder.js";import{I as zl}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as U}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as gn}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function En(bs){let w,le,j,g,Q,E,T,G,z,se,k,C,J,Me;return{c(){w=t("p"),le=o("The following Flax schedulers are "),j=t("em"),g=o("not yet compatible"),Q=o(" with the Flax Stable Diffusion Pipeline:"),E=c(),T=t("ul"),G=t("li"),z=t("code"),se=o("FlaxLMSDiscreteScheduler"),k=c(),C=t("li"),J=t("code"),Me=o("FlaxDDPMScheduler")},l(v){w=r(v,"P",{});var S=i(w);le=p(S,"The following Flax schedulers are "),j=r(S,"EM",{});var Ye=i(j);g=p(Ye,"not yet compatible"),Ye.forEach(l),Q=p(S," with the Flax Stable Diffusion Pipeline:"),S.forEach(l),E=u(v),T=r(v,"UL",{});var P=i(T);G=r(P,"LI",{});var $=i(G);z=r($,"CODE",{});var Qe=i(z);se=p(Qe,"FlaxLMSDiscreteScheduler"),Qe.forEach(l),$.forEach(l),k=u(P),C=r(P,"LI",{});var te=i(C);J=r(te,"CODE",{});var ze=i(J);Me=p(ze,"FlaxDDPMScheduler"),ze.forEach(l),te.forEach(l),P.forEach(l)},m(v,S){n(v,w,S),s(w,le),s(w,j),s(j,g),s(w,Q),n(v,E,S),n(v,T,S),s(T,G),s(G,z),s(z,se),s(T,k),s(T,C),s(C,J),s(J,Me)},d(v){v&&l(w),v&&l(E),v&&l(T)}}}function Tn(bs){let w,le,j,g,Q,E,T,G,z,se,k,C,J,Me,v,S,Ye,P,$,Qe,te,ze,It,ws,A,Pl,Wt,Bt,Hl,Nt,Xt,ql,Ct,vs,R,At,Ll,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:"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"}]}}),ye=new zl({}),we=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxvZ2luJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFsb2dpbigpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> login
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-keyword">import</span> torch

login()

pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16)`}}),ve=new U({props:{code:"cGlwZWxpbmUudG8oJTIyY3VkYSUyMik=",highlighted:'pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)'}}),Ze=new zl({}),Ue=new U({props:{code:"cGlwZWxpbmUuc2NoZWR1bGVy",highlighted:"pipeline.scheduler"}}),Je=new U({props:{code:"UE5ETVNjaGVkdWxlciUyMCU3QiUwQSUyMCUyMCUyMl9jbGFzc19uYW1lJTIyJTNBJTIwJTIyUE5ETVNjaGVkdWxlciUyMiUyQyUwQSUyMCUyMCUyMl9kaWZmdXNlcnNfdmVyc2lvbiUyMiUzQSUyMCUyMjAuOC4wLmRldjAlMjIlMkMlMEElMjAlMjAlMjJiZXRhX2VuZCUyMiUzQSUyMDAuMDEyJTJDJTBBJTIwJTIwJTIyYmV0YV9zY2hlZHVsZSUyMiUzQSUyMCUyMnNjYWxlZF9saW5lYXIlMjIlMkMlMEElMjAlMjAlMjJiZXRhX3N0YXJ0JTIyJTNBJTIwMC4wMDA4NSUyQyUwQSUyMCUyMCUyMmNsaXBfc2FtcGxlJTIyJTNBJTIwZmFsc2UlMkMlMEElMjAlMjAlMjJudW1fdHJhaW5fdGltZXN0ZXBzJTIyJTNBJTIwMTAwMCUyQyUwQSUyMCUyMCUyMnNldF9hbHBoYV90b19vbmUlMjIlM0ElMjBmYWxzZSUyQyUwQSUyMCUyMCUyMnNraXBfcHJrX3N0ZXBzJTIyJTNBJTIwdHJ1ZSUyQyUwQSUyMCUyMCUyMnN0ZXBzX29mZnNldCUyMiUzQSUyMDElMkMlMEElMjAlMjAlMjJ0cmFpbmVkX2JldGFzJTIyJTNBJTIwbnVsbCUwQSU3RA==",highlighted:`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.8.0.dev0&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>: <span class="hljs-literal">false</span>,
  <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>: <span class="hljs-literal">false</span>,
  <span class="hljs-string">&quot;skip_prk_steps&quot;</span>: <span class="hljs-literal">true</span>,
  <span class="hljs-string">&quot;steps_offset&quot;</span>: <span class="hljs-number">1</span>,
  <span class="hljs-string">&quot;trained_betas&quot;</span>: <span class="hljs-literal">null</span>
}`}}),_e=new U({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyQSUyMHBob3RvZ3JhcGglMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBNYXJzJTJDJTIwaGlnaCUyMHJlc29sdXRpb24lMkMlMjBoaWdoJTIwZGVmaW5pdGlvbi4lMjI=",highlighted:'prompt = <span class="hljs-string">&quot;A photograph of an astronaut riding a horse on Mars, high resolution, high definition.&quot;</span>'}}),ge=new U({props:{code:"Z2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`}}),Ee=new zl({}),Te=new U({props:{code:"cGlwZWxpbmUuc2NoZWR1bGVyLmNvbXBhdGlibGVz",highlighted:"pipeline.scheduler.compatibles"}}),Ge=new U({props:{code:"JTVCZGlmZnVzZXJzLnNjaGVkdWxlcnMuc2NoZWR1bGluZ19sbXNfZGlzY3JldGUuTE1TRGlzY3JldGVTY2hlZHVsZXIlMkMlMEElMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX2RkaW0uRERJTVNjaGVkdWxlciUyQyUwQSUyMGRpZmZ1c2Vycy5zY2hlZHVsZXJzLnNjaGVkdWxpbmdfZHBtc29sdmVyX211bHRpc3RlcC5EUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIlMkMlMEElMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX2V1bGVyX2Rpc2NyZXRlLkV1bGVyRGlzY3JldGVTY2hlZHVsZXIlMkMlMEElMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX3BuZG0uUE5ETVNjaGVkdWxlciUyQyUwQSUyMGRpZmZ1c2Vycy5zY2hlZHVsZXJzLnNjaGVkdWxpbmdfZGRwbS5ERFBNU2NoZWR1bGVyJTJDJTBBJTIwZGlmZnVzZXJzLnNjaGVkdWxlcnMuc2NoZWR1bGluZ19ldWxlcl9hbmNlc3RyYWxfZGlzY3JldGUuRXVsZXJBbmNlc3RyYWxEaXNjcmV0ZVNjaGVkdWxlciU1RA==",highlighted:`[<span class="hljs-keyword">diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler,
</span> <span class="hljs-keyword">diffusers.schedulers.scheduling_ddim.DDIMScheduler,
</span> <span class="hljs-keyword">diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler,
</span> <span class="hljs-keyword">diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteScheduler,
</span> <span class="hljs-keyword">diffusers.schedulers.scheduling_pndm.PNDMScheduler,
</span> <span class="hljs-keyword">diffusers.schedulers.scheduling_ddpm.DDPMScheduler,
</span> <span class="hljs-keyword">diffusers.schedulers.scheduling_euler_ancestral_discrete.EulerAncestralDiscreteScheduler]</span>`}}),ke=new U({props:{code:"cGlwZWxpbmUuc2NoZWR1bGVyLmNvbmZpZw==",highlighted:"pipeline.scheduler.config"}}),Ve=new U({props:{code:"Rn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timesteps&#x27;, <span class="hljs-number">1000</span>),
            (&#x27;beta_start&#x27;, <span class="hljs-number">0.00085</span>),
            (&#x27;beta_end&#x27;, <span class="hljs-number">0.012</span>),
            (&#x27;beta_schedule&#x27;, &#x27;scaled_linear&#x27;),
            (&#x27;trained_betas&#x27;, None),
            (&#x27;skip_prk_steps&#x27;, True),
            (&#x27;set_alpha_to_one&#x27;, False),
            (&#x27;steps_offset&#x27;, <span class="hljs-number">1</span>),
            (&#x27;_class_name&#x27;, &#x27;PNDMScheduler&#x27;),
            (&#x27;_diffusers_version&#x27;, &#x27;<span class="hljs-number">0.8</span>.<span class="hljs-number">0</span>.dev0&#x27;),
            (&#x27;clip_sample&#x27;, False)])`}}),Ie=new U({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERESU1TY2hlZHVsZXIlMEElMEFwaXBlbGluZS5zY2hlZHVsZXIlMjAlM0QlMjBERElNU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGVsaW5lLnNjaGVkdWxlci5jb25maWcp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMScheduler

pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)`}}),We=new U({props:{code:"Z2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`}}),Be=new zl({}),Xe=new U({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMExNU0Rpc2NyZXRlU2NoZWR1bGVyJTBBJTBBcGlwZWxpbmUuc2NoZWR1bGVyJTIwJTNEJTIwTE1TRGlzY3JldGVTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZWxpbmUuc2NoZWR1bGVyLmNvbmZpZyklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3VkYSUyMikubWFudWFsX3NlZWQoOCklMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvcikuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LMSDiscreteScheduler

pipeline.scheduler = LMSDiscreteScheduler.from_config(pipeline.scheduler.config)

generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`}}),Ce=new U({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEV1bGVyRGlzY3JldGVTY2hlZHVsZXIlMEElMEFwaXBlbGluZS5zY2hlZHVsZXIlMjAlM0QlMjBFdWxlckRpc2NyZXRlU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGVsaW5lLnNjaGVkdWxlci5jb25maWcpJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> EulerDiscreteScheduler

pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)

generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)
image = pipeline(prompt, generator=generator, num_inference_steps=<span class="hljs-number">30</span>).images[<span class="hljs-number">0</span>]
image`}}),Ae=new U({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEV1bGVyQW5jZXN0cmFsRGlzY3JldGVTY2hlZHVsZXIlMEElMEFwaXBlbGluZS5zY2hlZHVsZXIlMjAlM0QlMjBFdWxlckFuY2VzdHJhbERpc2NyZXRlU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGVsaW5lLnNjaGVkdWxlci5jb25maWcpJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> EulerAncestralDiscreteScheduler

pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(pipeline.scheduler.config)

generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)
image = pipeline(prompt, generator=generator, num_inference_steps=<span class="hljs-number">30</span>).images[<span class="hljs-number">0</span>]
image`}}),Re=new U({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlciUwQSUwQXBpcGVsaW5lLnNjaGVkdWxlciUyMCUzRCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlbGluZS5zY2hlZHVsZXIuY29uZmlnKSUwQSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjdWRhJTIyKS5tYW51YWxfc2VlZCg4KSUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DPMSolverMultistepScheduler

pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)

generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">8</span>)
image = pipeline(prompt, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),xe=new zl({}),De=new U({props:{code:"aW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBZnJvbSUyMGZsYXguamF4X3V0aWxzJTIwaW1wb3J0JTIwcmVwbGljYXRlJTBBZnJvbSUyMGZsYXgudHJhaW5pbmcuY29tbW9uX3V0aWxzJTIwaW1wb3J0JTIwc2hhcmQlMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRmxheFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTJDJTIwRmxheERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlciUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMEFzY2hlZHVsZXIlMkMlMjBzY2hlZHVsZXJfc3RhdGUlMjAlM0QlMjBGbGF4RFBNU29sdmVyTXVsdGlzdGVwU2NoZWR1bGVyLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjA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19zZWVkJTIwJTNEJTIwamF4LnJhbmRvbS5zcGxpdChwcm5nX3NlZWQlMkMlMjBqYXguZGV2aWNlX2NvdW50KCkpJTBBcHJvbXB0X2lkcyUyMCUzRCUyMHNoYXJkKHByb21wdF9pZHMpJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0X2lkcyUyQyUyMHBhcmFtcyUyQyUyMHBybmdfc2VlZCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlMkMlMjBqaXQlM0RUcnVlKS5pbWFnZXMlMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZS5udW1weV90b19waWwobnAuYXNhcnJheShpbWFnZXMucmVzaGFwZSgobnVtX3NhbXBsZXMlMkMpJTIwJTJCJTIwaW1hZ2VzLnNoYXBlJTVCLTMlM0ElNUQpKSk=",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

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
scheduler, scheduler_state = FlaxDPMSolverMultistepScheduler.from_pretrained(
    model_id,
    subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>
)
pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(
    model_id,
    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

<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 photo of an astronaut riding a horse on mars&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>:])))`}}),me=new _n({props:{warning:!0,$$slots:{default:[En]},$$scope:{ctx:bs}}}),{c(){w=t("meta"),le=c(),j=t("h1"),g=t("a"),Q=t("span"),f(E.$$.fragment),T=c(),G=t("span"),z=o("Schedulers"),se=c(),f(k.$$.fragment),C=c(),J=t("p"),Me=o(`Diffusion pipelines are inherently a collection of diffusion models and schedulers that are partly independent from each other. This means that one is able to switch out parts of the pipeline to better customize
a pipeline to one\u2019s use case. The best example of this is the `),v=t("a"),S=o("Schedulers"),Ye=o("."),P=c(),$=t("p"),Qe=o(`Whereas diffusion models usually simply define the forward pass from noise to a less noisy sample,
schedulers define the whole denoising process, `),te=t("em"),ze=o("i.e."),It=o(":"),ws=c(),A=t("ul"),Pl=t("li"),Wt=o("How many denoising steps?"),Bt=c(),Hl=t("li"),Nt=o("Stochastic or deterministic?"),Xt=c(),ql=t("li"),Ct=o("What algorithm to use to find the denoised sample"),vs=c(),R=t("p"),At=o("They can be quite complex and often define a trade-off between "),Ll=t("strong"),Rt=o("denoising speed"),xt=o(" and "),Kl=t("strong"),Dt=o("denoising quality"),Ft=o(`.
It is extremely difficult to measure quantitatively which scheduler works best for a given diffusion pipeline, so it is often recommended to simply try out which works best.`),Zs=c(),Pe=t("p"),Yt=o("The following paragraphs show how to do so with the \u{1F9E8} Diffusers library."),Us=c(),H=t("h2"),re=t("a"),Ol=t("span"),f(ye.$$.fragment),Qt=c(),es=t("span"),zt=o("Load pipeline"),js=c(),x=t("p"),Pt=o("Let\u2019s start by loading the "),be=t("a"),ls=t("code"),Ht=o("runwayml/stable-diffusion-v1-5"),qt=o(" model in the "),He=t("a"),Lt=o("DiffusionPipeline"),Kt=o(":"),Js=c(),f(we.$$.fragment),_s=c(),qe=t("p"),Ot=o("Next, we move it to GPU:"),gs=c(),f(ve.$$.fragment),Es=c(),q=t("h2"),ae=t("a"),ss=t("span"),f(Ze.$$.fragment),er=c(),ts=t("span"),lr=o("Access the scheduler"),Ts=c(),D=t("p"),sr=o("The scheduler is always one of the components of the pipeline and is usually called "),rs=t("code"),tr=o('"scheduler"'),rr=o(`.
So it can be accessed via the `),as=t("code"),ar=o('"scheduler"'),ir=o(" property."),Ss=c(),f(Ue.$$.fragment),Gs=c(),je=t("p"),is=t("strong"),nr=o("Output"),or=o(":"),ks=c(),f(Je.$$.fragment),$s=c(),ie=t("p"),pr=o("We can see that the scheduler is of type "),Le=t("a"),cr=o("PNDMScheduler"),ur=o(`.
Cool, now let\u2019s compare the scheduler in its performance to other schedulers.
First we define a prompt on which we will test all the different schedulers:`),Vs=c(),f(_e.$$.fragment),Is=c(),Ke=t("p"),hr=o("Next, we create a generator from a random seed that will ensure that we can generate similar images as well as run the pipeline:"),Ws=c(),f(ge.$$.fragment),Bs=c(),V=t("p"),fr=t("br"),dr=c(),Oe=t("img"),mr=c(),Mr=t("br"),Ns=c(),L=t("h2"),ne=t("a"),ns=t("span"),f(Ee.$$.fragment),yr=c(),os=t("span"),br=o("Changing the scheduler"),Xs=c(),oe=t("p"),wr=o("Now we show how easy it is to change the scheduler of a pipeline. Every scheduler has a property "),ps=t("code"),vr=o("SchedulerMixin.compatibles"),Zr=o(`
which defines all compatible schedulers. You can take a look at all available, compatible schedulers for the Stable Diffusion pipeline as follows.`),Cs=c(),f(Te.$$.fragment),As=c(),Se=t("p"),cs=t("strong"),Ur=o("Output"),jr=o(":"),Rs=c(),f(Ge.$$.fragment),xs=c(),el=t("p"),Jr=o("Cool, lots of schedulers to look at. Feel free to have a look at their respective class definitions:"),Ds=c(),Z=t("ul"),ll=t("li"),sl=t("a"),_r=o("LMSDiscreteScheduler"),gr=o(","),Er=c(),tl=t("li"),rl=t("a"),Tr=o("DDIMScheduler"),Sr=o(","),Gr=c(),al=t("li"),il=t("a"),kr=o("DPMSolverMultistepScheduler"),$r=o(","),Vr=c(),nl=t("li"),ol=t("a"),Ir=o("EulerDiscreteScheduler"),Wr=o(","),Br=c(),pl=t("li"),cl=t("a"),Nr=o("PNDMScheduler"),Xr=o(","),Cr=c(),ul=t("li"),hl=t("a"),Ar=o("DDPMScheduler"),Rr=o(","),xr=c(),fl=t("li"),dl=t("a"),Dr=o("EulerAncestralDiscreteScheduler"),Fr=o("."),Fs=c(),F=t("p"),Yr=o(`We will now compare the input prompt with all other schedulers. To change the scheduler of the pipeline you can make use of the
convenient `),us=t("code"),Qr=o("ConfigMixin.config"),zr=o(" property in combination with the "),ml=t("a"),Pr=o("ConfigMixin.from_config()"),Hr=o(" function."),Ys=c(),f(ke.$$.fragment),Qs=c(),Ml=t("p"),qr=o("returns a dictionary of the configuration of the scheduler:"),zs=c(),$e=t("p"),hs=t("strong"),Lr=o("Output"),Kr=o(":"),Ps=c(),f(Ve.$$.fragment),Hs=c(),pe=t("p"),Or=o(`This configuration can then be used to instantiate a scheduler
of a different class that is compatible with the pipeline. Here,
we change the scheduler to the `),yl=t("a"),ea=o("DDIMScheduler"),la=o("."),qs=c(),f(Ie.$$.fragment),Ls=c(),bl=t("p"),sa=o("Cool, now we can run the pipeline again to compare the generation quality."),Ks=c(),f(We.$$.fragment),Os=c(),I=t("p"),ta=t("br"),ra=c(),wl=t("img"),aa=c(),ia=t("br"),et=c(),ce=t("p"),na=o("If you are a JAX/Flax user, please check "),vl=t("a"),oa=o("this section"),pa=o(" instead."),lt=c(),K=t("h2"),ue=t("a"),fs=t("span"),f(Be.$$.fragment),ca=c(),ds=t("span"),ua=o("Compare schedulers"),st=c(),Y=t("p"),ha=o("So far we have tried running the stable diffusion pipeline with two schedulers: "),Zl=t("a"),fa=o("PNDMScheduler"),da=o(" and "),Ul=t("a"),ma=o("DDIMScheduler"),Ma=o(`.
A number of better schedulers have been released that can be run with much fewer steps, let\u2019s compare them here:`),tt=c(),Ne=t("p"),jl=t("a"),ya=o("LMSDiscreteScheduler"),ba=o(" usually leads to better results:"),rt=c(),f(Xe.$$.fragment),at=c(),W=t("p"),wa=t("br"),va=c(),Jl=t("img"),Za=c(),Ua=t("br"),it=c(),O=t("p"),_l=t("a"),ja=o("EulerDiscreteScheduler"),Ja=o(" and "),gl=t("a"),_a=o("EulerAncestralDiscreteScheduler"),ga=o(" can generate high quality results with as little as 30 steps."),nt=c(),f(Ce.$$.fragment),ot=c(),B=t("p"),Ea=t("br"),Ta=c(),El=t("img"),Sa=c(),Ga=t("br"),pt=c(),Tl=t("p"),ka=o("and:"),ct=c(),f(Ae.$$.fragment),ut=c(),N=t("p"),$a=t("br"),Va=c(),Sl=t("img"),Ia=c(),Wa=t("br"),ht=c(),he=t("p"),Ba=o("At the time of writing this doc "),Gl=t("a"),Na=o("DPMSolverMultistepScheduler"),Xa=o(` gives arguably the best speed/quality trade-off and can be run with as little
as 20 steps.`),ft=c(),f(Re.$$.fragment),dt=c(),X=t("p"),Ca=t("br"),Aa=c(),kl=t("img"),Ra=c(),xa=t("br"),mt=c(),$l=t("p"),Da=o(`As you can see most images look very similar and are arguably of very similar quality. It often really depends on the specific use case which scheduler to choose. A good approach is always to run multiple different
schedulers to compare results.`),Mt=c(),ee=t("h2"),fe=t("a"),ms=t("span"),f(xe.$$.fragment),Fa=c(),Ms=t("span"),Ya=o("Changing the Scheduler in Flax"),yt=c(),de=t("p"),Qa=o("If you are a JAX/Flax user, you can also change the default pipeline scheduler. This is a complete example of how to run inference using the Flax Stable Diffusion pipeline and the super-fast "),Vl=t("a"),za=o("DDPM-Solver++ scheduler"),Pa=o(":"),bt=c(),f(De.$$.fragment),wt=c(),f(me.$$.fragment),this.h()},l(e){const a=jn('[data-svelte="svelte-1phssyn"]',document.head);w=r(a,"META",{name:!0,content:!0}),a.forEach(l),le=u(e),j=r(e,"H1",{class:!0});var Fe=i(j);g=r(Fe,"A",{id:!0,class:!0,href:!0});var hi=i(g);Q=r(hi,"SPAN",{});var fi=i(Q);d(E.$$.fragment,fi),fi.forEach(l),hi.forEach(l),T=u(Fe),G=r(Fe,"SPAN",{});var di=i(G);z=p(di,"Schedulers"),di.forEach(l),Fe.forEach(l),se=u(e),d(k.$$.fragment,e),C=u(e),J=r(e,"P",{});var Zt=i(J);Me=p(Zt,`Diffusion pipelines are inherently a collection of diffusion models and schedulers that are partly independent from each other. This means that one is able to switch out parts of the pipeline to better customize
a pipeline to one\u2019s use case. The best example of this is the `),v=r(Zt,"A",{href:!0});var mi=i(v);S=p(mi,"Schedulers"),mi.forEach(l),Ye=p(Zt,"."),Zt.forEach(l),P=u(e),$=r(e,"P",{});var Ut=i($);Qe=p(Ut,`Whereas diffusion models usually simply define the forward pass from noise to a less noisy sample,
schedulers define the whole denoising process, `),te=r(Ut,"EM",{});var Mi=i(te);ze=p(Mi,"i.e."),Mi.forEach(l),It=p(Ut,":"),Ut.forEach(l),ws=u(e),A=r(e,"UL",{});var Il=i(A);Pl=r(Il,"LI",{});var yi=i(Pl);Wt=p(yi,"How many denoising steps?"),yi.forEach(l),Bt=u(Il),Hl=r(Il,"LI",{});var bi=i(Hl);Nt=p(bi,"Stochastic or deterministic?"),bi.forEach(l),Xt=u(Il),ql=r(Il,"LI",{});var wi=i(ql);Ct=p(wi,"What algorithm to use to find the denoised sample"),wi.forEach(l),Il.forEach(l),vs=u(e),R=r(e,"P",{});var Wl=i(R);At=p(Wl,"They can be quite complex and often define a trade-off between "),Ll=r(Wl,"STRONG",{});var vi=i(Ll);Rt=p(vi,"denoising speed"),vi.forEach(l),xt=p(Wl," and "),Kl=r(Wl,"STRONG",{});var Zi=i(Kl);Dt=p(Zi,"denoising quality"),Zi.forEach(l),Ft=p(Wl,`.
It is extremely difficult to measure quantitatively which scheduler works best for a given diffusion pipeline, so it is often recommended to simply try out which works best.`),Wl.forEach(l),Zs=u(e),Pe=r(e,"P",{});var Ui=i(Pe);Yt=p(Ui,"The following paragraphs show how to do so with the \u{1F9E8} Diffusers library."),Ui.forEach(l),Us=u(e),H=r(e,"H2",{class:!0});var jt=i(H);re=r(jt,"A",{id:!0,class:!0,href:!0});var ji=i(re);Ol=r(ji,"SPAN",{});var Ji=i(Ol);d(ye.$$.fragment,Ji),Ji.forEach(l),ji.forEach(l),Qt=u(jt),es=r(jt,"SPAN",{});var _i=i(es);zt=p(_i,"Load pipeline"),_i.forEach(l),jt.forEach(l),js=u(e),x=r(e,"P",{});var Bl=i(x);Pt=p(Bl,"Let\u2019s start by loading the "),be=r(Bl,"A",{href:!0,rel:!0});var gi=i(be);ls=r(gi,"CODE",{});var Ei=i(ls);Ht=p(Ei,"runwayml/stable-diffusion-v1-5"),Ei.forEach(l),gi.forEach(l),qt=p(Bl," model in the "),He=r(Bl,"A",{href:!0});var Ti=i(He);Lt=p(Ti,"DiffusionPipeline"),Ti.forEach(l),Kt=p(Bl,":"),Bl.forEach(l),Js=u(e),d(we.$$.fragment,e),_s=u(e),qe=r(e,"P",{});var Si=i(qe);Ot=p(Si,"Next, we move it to GPU:"),Si.forEach(l),gs=u(e),d(ve.$$.fragment,e),Es=u(e),q=r(e,"H2",{class:!0});var Jt=i(q);ae=r(Jt,"A",{id:!0,class:!0,href:!0});var Gi=i(ae);ss=r(Gi,"SPAN",{});var ki=i(ss);d(Ze.$$.fragment,ki),ki.forEach(l),Gi.forEach(l),er=u(Jt),ts=r(Jt,"SPAN",{});var $i=i(ts);lr=p($i,"Access the scheduler"),$i.forEach(l),Jt.forEach(l),Ts=u(e),D=r(e,"P",{});var Nl=i(D);sr=p(Nl,"The scheduler is always one of the components of the pipeline and is usually called "),rs=r(Nl,"CODE",{});var Vi=i(rs);tr=p(Vi,'"scheduler"'),Vi.forEach(l),rr=p(Nl,`.
So it can be accessed via the `),as=r(Nl,"CODE",{});var Ii=i(as);ar=p(Ii,'"scheduler"'),Ii.forEach(l),ir=p(Nl," property."),Nl.forEach(l),Ss=u(e),d(Ue.$$.fragment,e),Gs=u(e),je=r(e,"P",{});var Ha=i(je);is=r(Ha,"STRONG",{});var Wi=i(is);nr=p(Wi,"Output"),Wi.forEach(l),or=p(Ha,":"),Ha.forEach(l),ks=u(e),d(Je.$$.fragment,e),$s=u(e),ie=r(e,"P",{});var _t=i(ie);pr=p(_t,"We can see that the scheduler is of type "),Le=r(_t,"A",{href:!0});var Bi=i(Le);cr=p(Bi,"PNDMScheduler"),Bi.forEach(l),ur=p(_t,`.
Cool, now let\u2019s compare the scheduler in its performance to other schedulers.
First we define a prompt on which we will test all the different schedulers:`),_t.forEach(l),Vs=u(e),d(_e.$$.fragment,e),Is=u(e),Ke=r(e,"P",{});var Ni=i(Ke);hr=p(Ni,"Next, we create a generator from a random seed that will ensure that we can generate similar images as well as run the pipeline:"),Ni.forEach(l),Ws=u(e),d(ge.$$.fragment,e),Bs=u(e),V=r(e,"P",{align:!0});var Xl=i(V);fr=r(Xl,"BR",{}),dr=u(Xl),Oe=r(Xl,"IMG",{src:!0,width:!0}),mr=u(Xl),Mr=r(Xl,"BR",{}),Xl.forEach(l),Ns=u(e),L=r(e,"H2",{class:!0});var gt=i(L);ne=r(gt,"A",{id:!0,class:!0,href:!0});var Xi=i(ne);ns=r(Xi,"SPAN",{});var Ci=i(ns);d(Ee.$$.fragment,Ci),Ci.forEach(l),Xi.forEach(l),yr=u(gt),os=r(gt,"SPAN",{});var Ai=i(os);br=p(Ai,"Changing the scheduler"),Ai.forEach(l),gt.forEach(l),Xs=u(e),oe=r(e,"P",{});var Et=i(oe);wr=p(Et,"Now we show how easy it is to change the scheduler of a pipeline. Every scheduler has a property "),ps=r(Et,"CODE",{});var Ri=i(ps);vr=p(Ri,"SchedulerMixin.compatibles"),Ri.forEach(l),Zr=p(Et,`
which defines all compatible schedulers. You can take a look at all available, compatible schedulers for the Stable Diffusion pipeline as follows.`),Et.forEach(l),Cs=u(e),d(Te.$$.fragment,e),As=u(e),Se=r(e,"P",{});var qa=i(Se);cs=r(qa,"STRONG",{});var xi=i(cs);Ur=p(xi,"Output"),xi.forEach(l),jr=p(qa,":"),qa.forEach(l),Rs=u(e),d(Ge.$$.fragment,e),xs=u(e),el=r(e,"P",{});var Di=i(el);Jr=p(Di,"Cool, lots of schedulers to look at. Feel free to have a look at their respective class definitions:"),Di.forEach(l),Ds=u(e),Z=r(e,"UL",{});var _=i(Z);ll=r(_,"LI",{});var La=i(ll);sl=r(La,"A",{href:!0});var Fi=i(sl);_r=p(Fi,"LMSDiscreteScheduler"),Fi.forEach(l),gr=p(La,","),La.forEach(l),Er=u(_),tl=r(_,"LI",{});var Ka=i(tl);rl=r(Ka,"A",{href:!0});var Yi=i(rl);Tr=p(Yi,"DDIMScheduler"),Yi.forEach(l),Sr=p(Ka,","),Ka.forEach(l),Gr=u(_),al=r(_,"LI",{});var Oa=i(al);il=r(Oa,"A",{href:!0});var Qi=i(il);kr=p(Qi,"DPMSolverMultistepScheduler"),Qi.forEach(l),$r=p(Oa,","),Oa.forEach(l),Vr=u(_),nl=r(_,"LI",{});var ei=i(nl);ol=r(ei,"A",{href:!0});var zi=i(ol);Ir=p(zi,"EulerDiscreteScheduler"),zi.forEach(l),Wr=p(ei,","),ei.forEach(l),Br=u(_),pl=r(_,"LI",{});var li=i(pl);cl=r(li,"A",{href:!0});var Pi=i(cl);Nr=p(Pi,"PNDMScheduler"),Pi.forEach(l),Xr=p(li,","),li.forEach(l),Cr=u(_),ul=r(_,"LI",{});var si=i(ul);hl=r(si,"A",{href:!0});var Hi=i(hl);Ar=p(Hi,"DDPMScheduler"),Hi.forEach(l),Rr=p(si,","),si.forEach(l),xr=u(_),fl=r(_,"LI",{});var ti=i(fl);dl=r(ti,"A",{href:!0});var qi=i(dl);Dr=p(qi,"EulerAncestralDiscreteScheduler"),qi.forEach(l),Fr=p(ti,"."),ti.forEach(l),_.forEach(l),Fs=u(e),F=r(e,"P",{});var Cl=i(F);Yr=p(Cl,`We will now compare the input prompt with all other schedulers. To change the scheduler of the pipeline you can make use of the
convenient `),us=r(Cl,"CODE",{});var Li=i(us);Qr=p(Li,"ConfigMixin.config"),Li.forEach(l),zr=p(Cl," property in combination with the "),ml=r(Cl,"A",{href:!0});var Ki=i(ml);Pr=p(Ki,"ConfigMixin.from_config()"),Ki.forEach(l),Hr=p(Cl," function."),Cl.forEach(l),Ys=u(e),d(ke.$$.fragment,e),Qs=u(e),Ml=r(e,"P",{});var Oi=i(Ml);qr=p(Oi,"returns a dictionary of the configuration of the scheduler:"),Oi.forEach(l),zs=u(e),$e=r(e,"P",{});var ri=i($e);hs=r(ri,"STRONG",{});var en=i(hs);Lr=p(en,"Output"),en.forEach(l),Kr=p(ri,":"),ri.forEach(l),Ps=u(e),d(Ve.$$.fragment,e),Hs=u(e),pe=r(e,"P",{});var Tt=i(pe);Or=p(Tt,`This configuration can then be used to instantiate a scheduler
of a different class that is compatible with the pipeline. Here,
we change the scheduler to the `),yl=r(Tt,"A",{href:!0});var ln=i(yl);ea=p(ln,"DDIMScheduler"),ln.forEach(l),la=p(Tt,"."),Tt.forEach(l),qs=u(e),d(Ie.$$.fragment,e),Ls=u(e),bl=r(e,"P",{});var sn=i(bl);sa=p(sn,"Cool, now we can run the pipeline again to compare the generation quality."),sn.forEach(l),Ks=u(e),d(We.$$.fragment,e),Os=u(e),I=r(e,"P",{align:!0});var Al=i(I);ta=r(Al,"BR",{}),ra=u(Al),wl=r(Al,"IMG",{src:!0,width:!0}),aa=u(Al),ia=r(Al,"BR",{}),Al.forEach(l),et=u(e),ce=r(e,"P",{});var St=i(ce);na=p(St,"If you are a JAX/Flax user, please check "),vl=r(St,"A",{href:!0});var tn=i(vl);oa=p(tn,"this section"),tn.forEach(l),pa=p(St," instead."),St.forEach(l),lt=u(e),K=r(e,"H2",{class:!0});var Gt=i(K);ue=r(Gt,"A",{id:!0,class:!0,href:!0});var rn=i(ue);fs=r(rn,"SPAN",{});var an=i(fs);d(Be.$$.fragment,an),an.forEach(l),rn.forEach(l),ca=u(Gt),ds=r(Gt,"SPAN",{});var nn=i(ds);ua=p(nn,"Compare schedulers"),nn.forEach(l),Gt.forEach(l),st=u(e),Y=r(e,"P",{});var Rl=i(Y);ha=p(Rl,"So far we have tried running the stable diffusion pipeline with two schedulers: "),Zl=r(Rl,"A",{href:!0});var on=i(Zl);fa=p(on,"PNDMScheduler"),on.forEach(l),da=p(Rl," and "),Ul=r(Rl,"A",{href:!0});var pn=i(Ul);ma=p(pn,"DDIMScheduler"),pn.forEach(l),Ma=p(Rl,`.
A number of better schedulers have been released that can be run with much fewer steps, let\u2019s compare them here:`),Rl.forEach(l),tt=u(e),Ne=r(e,"P",{});var ai=i(Ne);jl=r(ai,"A",{href:!0});var cn=i(jl);ya=p(cn,"LMSDiscreteScheduler"),cn.forEach(l),ba=p(ai," usually leads to better results:"),ai.forEach(l),rt=u(e),d(Xe.$$.fragment,e),at=u(e),W=r(e,"P",{align:!0});var xl=i(W);wa=r(xl,"BR",{}),va=u(xl),Jl=r(xl,"IMG",{src:!0,width:!0}),Za=u(xl),Ua=r(xl,"BR",{}),xl.forEach(l),it=u(e),O=r(e,"P",{});var ys=i(O);_l=r(ys,"A",{href:!0});var un=i(_l);ja=p(un,"EulerDiscreteScheduler"),un.forEach(l),Ja=p(ys," and "),gl=r(ys,"A",{href:!0});var hn=i(gl);_a=p(hn,"EulerAncestralDiscreteScheduler"),hn.forEach(l),ga=p(ys," can generate high quality results with as little as 30 steps."),ys.forEach(l),nt=u(e),d(Ce.$$.fragment,e),ot=u(e),B=r(e,"P",{align:!0});var Dl=i(B);Ea=r(Dl,"BR",{}),Ta=u(Dl),El=r(Dl,"IMG",{src:!0,width:!0}),Sa=u(Dl),Ga=r(Dl,"BR",{}),Dl.forEach(l),pt=u(e),Tl=r(e,"P",{});var fn=i(Tl);ka=p(fn,"and:"),fn.forEach(l),ct=u(e),d(Ae.$$.fragment,e),ut=u(e),N=r(e,"P",{align:!0});var Fl=i(N);$a=r(Fl,"BR",{}),Va=u(Fl),Sl=r(Fl,"IMG",{src:!0,width:!0}),Ia=u(Fl),Wa=r(Fl,"BR",{}),Fl.forEach(l),ht=u(e),he=r(e,"P",{});var kt=i(he);Ba=p(kt,"At the time of writing this doc "),Gl=r(kt,"A",{href:!0});var dn=i(Gl);Na=p(dn,"DPMSolverMultistepScheduler"),dn.forEach(l),Xa=p(kt,` gives arguably the best speed/quality trade-off and can be run with as little
as 20 steps.`),kt.forEach(l),ft=u(e),d(Re.$$.fragment,e),dt=u(e),X=r(e,"P",{align:!0});var Yl=i(X);Ca=r(Yl,"BR",{}),Aa=u(Yl),kl=r(Yl,"IMG",{src:!0,width:!0}),Ra=u(Yl),xa=r(Yl,"BR",{}),Yl.forEach(l),mt=u(e),$l=r(e,"P",{});var mn=i($l);Da=p(mn,`As you can see most images look very similar and are arguably of very similar quality. It often really depends on the specific use case which scheduler to choose. A good approach is always to run multiple different
schedulers to compare results.`),mn.forEach(l),Mt=u(e),ee=r(e,"H2",{class:!0});var $t=i(ee);fe=r($t,"A",{id:!0,class:!0,href:!0});var Mn=i(fe);ms=r(Mn,"SPAN",{});var yn=i(ms);d(xe.$$.fragment,yn),yn.forEach(l),Mn.forEach(l),Fa=u($t),Ms=r($t,"SPAN",{});var bn=i(Ms);Ya=p(bn,"Changing the Scheduler in Flax"),bn.forEach(l),$t.forEach(l),yt=u(e),de=r(e,"P",{});var Vt=i(de);Qa=p(Vt,"If you are a JAX/Flax user, you can also change the default pipeline scheduler. This is a complete example of how to run inference using the Flax Stable Diffusion pipeline and the super-fast "),Vl=r(Vt,"A",{href:!0});var wn=i(Vl);za=p(wn,"DDPM-Solver++ scheduler"),wn.forEach(l),Pa=p(Vt,":"),Vt.forEach(l),bt=u(e),d(De.$$.fragment,e),wt=u(e),d(me.$$.fragment,e),this.h()},h(){h(w,"name","hf:doc:metadata"),h(w,"content",JSON.stringify(Sn)),h(g,"id","schedulers"),h(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(g,"href","#schedulers"),h(j,"class","relative group"),h(v,"href","../api/schedulers/overview.md"),h(re,"id","load-pipeline"),h(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(re,"href","#load-pipeline"),h(H,"class","relative group"),h(be,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),h(be,"rel","nofollow"),h(He,"href","/docs/diffusers/v0.19.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),h(ae,"id","access-the-scheduler"),h(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ae,"href","#access-the-scheduler"),h(q,"class","relative group"),h(Le,"href","/docs/diffusers/v0.19.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),Ql(Oe.src,ii="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_pndm.png")||h(Oe,"src",ii),h(Oe,"width","400"),h(V,"align","center"),h(ne,"id","changing-the-scheduler"),h(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ne,"href","#changing-the-scheduler"),h(L,"class","relative group"),h(sl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler"),h(rl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/ddim#diffusers.DDIMScheduler"),h(il,"href","/docs/diffusers/v0.19.0/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler"),h(ol,"href","/docs/diffusers/v0.19.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),h(cl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),h(hl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/ddpm#diffusers.DDPMScheduler"),h(dl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler"),h(ml,"href","/docs/diffusers/v0.19.0/en/api/configuration#diffusers.ConfigMixin.from_config"),h(yl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/ddim#diffusers.DDIMScheduler"),Ql(wl.src,ni="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_ddim.png")||h(wl,"src",ni),h(wl,"width","400"),h(I,"align","center"),h(vl,"href","#changing-the-scheduler-in-flax"),h(ue,"id","compare-schedulers"),h(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ue,"href","#compare-schedulers"),h(K,"class","relative group"),h(Zl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),h(Ul,"href","/docs/diffusers/v0.19.0/en/api/schedulers/ddim#diffusers.DDIMScheduler"),h(jl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler"),Ql(Jl.src,oi="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_lms.png")||h(Jl,"src",oi),h(Jl,"width","400"),h(W,"align","center"),h(_l,"href","/docs/diffusers/v0.19.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),h(gl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler"),Ql(El.src,pi="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_euler_discrete.png")||h(El,"src",pi),h(El,"width","400"),h(B,"align","center"),Ql(Sl.src,ci="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_euler_ancestral.png")||h(Sl,"src",ci),h(Sl,"width","400"),h(N,"align","center"),h(Gl,"href","/docs/diffusers/v0.19.0/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler"),Ql(kl.src,ui="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/diffusers_docs/astronaut_dpm.png")||h(kl,"src",ui),h(kl,"width","400"),h(X,"align","center"),h(fe,"id","changing-the-scheduler-in-flax"),h(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(fe,"href","#changing-the-scheduler-in-flax"),h(ee,"class","relative group"),h(Vl,"href","../api/schedulers/multistep_dpm_solver")},m(e,a){s(document.head,w),n(e,le,a),n(e,j,a),s(j,g),s(g,Q),m(E,Q,null),s(j,T),s(j,G),s(G,z),n(e,se,a),m(k,e,a),n(e,C,a),n(e,J,a),s(J,Me),s(J,v),s(v,S),s(J,Ye),n(e,P,a),n(e,$,a),s($,Qe),s($,te),s(te,ze),s($,It),n(e,ws,a),n(e,A,a),s(A,Pl),s(Pl,Wt),s(A,Bt),s(A,Hl),s(Hl,Nt),s(A,Xt),s(A,ql),s(ql,Ct),n(e,vs,a),n(e,R,a),s(R,At),s(R,Ll),s(Ll,Rt),s(R,xt),s(R,Kl),s(Kl,Dt),s(R,Ft),n(e,Zs,a),n(e,Pe,a),s(Pe,Yt),n(e,Us,a),n(e,H,a),s(H,re),s(re,Ol),m(ye,Ol,null),s(H,Qt),s(H,es),s(es,zt),n(e,js,a),n(e,x,a),s(x,Pt),s(x,be),s(be,ls),s(ls,Ht),s(x,qt),s(x,He),s(He,Lt),s(x,Kt),n(e,Js,a),m(we,e,a),n(e,_s,a),n(e,qe,a),s(qe,Ot),n(e,gs,a),m(ve,e,a),n(e,Es,a),n(e,q,a),s(q,ae),s(ae,ss),m(Ze,ss,null),s(q,er),s(q,ts),s(ts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s,a),n(e,pe,a),s(pe,Or),s(pe,yl),s(yl,ea),s(pe,la),n(e,qs,a),m(Ie,e,a),n(e,Ls,a),n(e,bl,a),s(bl,sa),n(e,Ks,a),m(We,e,a),n(e,Os,a),n(e,I,a),s(I,ta),s(I,ra),s(I,wl),s(I,aa),s(I,ia),n(e,et,a),n(e,ce,a),s(ce,na),s(ce,vl),s(vl,oa),s(ce,pa),n(e,lt,a),n(e,K,a),s(K,ue),s(ue,fs),m(Be,fs,null),s(K,ca),s(K,ds),s(ds,ua),n(e,st,a),n(e,Y,a),s(Y,ha),s(Y,Zl),s(Zl,fa),s(Y,da),s(Y,Ul),s(Ul,ma),s(Y,Ma),n(e,tt,a),n(e,Ne,a),s(Ne,jl),s(jl,ya),s(Ne,ba),n(e,rt,a),m(Xe,e,a),n(e,at,a),n(e,W,a),s(W,wa),s(W,va),s(W,Jl),s(W,Za),s(W,Ua),n(e,it,a),n(e,O,a),s(O,_l),s(_l,ja),s(O,Ja),s(O,gl),s(gl,_a),s(O,ga),n(e,nt,a),m(Ce,e,a),n(e,ot,a),n(e,B,a),s(B,Ea),s(B,Ta),s(B,El),s(B,Sa),s(B,Ga),n(e,pt,a),n(e,Tl,a),s(Tl,ka),n(e,ct,a),m(Ae,e,a),n(e,ut,a),n(e,N,a),s(N,$a),s(N,Va),s(N,Sl),s(N,Ia),s(N,Wa),n(e,ht,a),n(e,he,a),s(he,Ba),s(he,Gl),s(Gl,Na),s(he,Xa),n(e,ft,a),m(Re,e,a),n(e,dt,a),n(e,X,a),s(X,Ca),s(X,Aa),s(X,kl),s(X,Ra),s(X,xa),n(e,mt,a),n(e,$l,a),s($l,Da),n(e,Mt,a),n(e,ee,a),s(ee,fe),s(fe,ms),m(xe,ms,null),s(ee,Fa),s(ee,Ms),s(Ms,Ya),n(e,yt,a),n(e,de,a),s(de,Qa),s(de,Vl),s(Vl,za),s(de,Pa),n(e,bt,a),m(De,e,a),n(e,wt,a),m(me,e,a),vt=!0},p(e,[a]){const Fe={};a&2&&(Fe.$$scope={dirty:a,ctx:e}),me.$set(Fe)},i(e){vt||(M(E.$$.fragment,e),M(k.$$.fragment,e),M(ye.$$.fragment,e),M(we.$$.fragment,e),M(ve.$$.fragment,e),M(Ze.$$.fragment,e),M(Ue.$$.fragment,e),M(Je.$$.fragment,e),M(_e.$$.fragment,e),M(ge.$$.fragment,e),M(Ee.$$.fragment,e),M(Te.$$.fragment,e),M(Ge.$$.fragment,e),M(ke.$$.fragment,e),M(Ve.$$.fragment,e),M(Ie.$$.fragment,e),M(We.$$.fragment,e),M(Be.$$.fragment,e),M(Xe.$$.fragment,e),M(Ce.$$.fragment,e),M(Ae.$$.fragment,e),M(Re.$$.fragment,e),M(xe.$$.fragment,e),M(De.$$.fragment,e),M(me.$$.fragment,e),vt=!0)},o(e){y(E.$$.fragment,e),y(k.$$.fragment,e),y(ye.$$.fragment,e),y(we.$$.fragment,e),y(ve.$$.fragment,e),y(Ze.$$.fragment,e),y(Ue.$$.fragment,e),y(Je.$$.fragment,e),y(_e.$$.fragment,e),y(ge.$$.fragment,e),y(Ee.$$.fragment,e),y(Te.$$.fragment,e),y(Ge.$$.fragment,e),y(ke.$$.fragment,e),y(Ve.$$.fragment,e),y(Ie.$$.fragment,e),y(We.$$.fragment,e),y(Be.$$.fragment,e),y(Xe.$$.fragment,e),y(Ce.$$.fragment,e),y(Ae.$$.fragment,e),y(Re.$$.fragment,e),y(xe.$$.fragment,e),y(De.$$.fragment,e),y(me.$$.fragment,e),vt=!1},d(e){l(w),e&&l(le),e&&l(j),b(E),e&&l(se),b(k,e),e&&l(C),e&&l(J),e&&l(P),e&&l($),e&&l(ws),e&&l(A),e&&l(vs),e&&l(R),e&&l(Zs),e&&l(Pe),e&&l(Us),e&&l(H),b(ye),e&&l(js),e&&l(x),e&&l(Js),b(we,e),e&&l(_s),e&&l(qe),e&&l(gs),b(ve,e),e&&l(Es),e&&l(q),b(Ze),e&&l(Ts),e&&l(D),e&&l(Ss),b(Ue,e),e&&l(Gs),e&&l(je),e&&l(ks),b(Je,e),e&&l($s),e&&l(ie),e&&l(Vs),b(_e,e),e&&l(Is),e&&l(Ke),e&&l(Ws),b(ge,e),e&&l(Bs),e&&l(V),e&&l(Ns),e&&l(L),b(Ee),e&&l(Xs),e&&l(oe),e&&l(Cs),b(Te,e),e&&l(As),e&&l(Se),e&&l(Rs),b(Ge,e),e&&l(xs),e&&l(el),e&&l(Ds),e&&l(Z),e&&l(Fs),e&&l(F),e&&l(Ys),b(ke,e),e&&l(Qs),e&&l(Ml),e&&l(zs),e&&l($e),e&&l(Ps),b(Ve,e),e&&l(Hs),e&&l(pe),e&&l(qs),b(Ie,e),e&&l(Ls),e&&l(bl),e&&l(Ks),b(We,e),e&&l(Os),e&&l(I),e&&l(et),e&&l(ce),e&&l(lt),e&&l(K),b(Be),e&&l(st),e&&l(Y),e&&l(tt),e&&l(Ne),e&&l(rt),b(Xe,e),e&&l(at),e&&l(W),e&&l(it),e&&l(O),e&&l(nt),b(Ce,e),e&&l(ot),e&&l(B),e&&l(pt),e&&l(Tl),e&&l(ct),b(Ae,e),e&&l(ut),e&&l(N),e&&l(ht),e&&l(he),e&&l(ft),b(Re,e),e&&l(dt),e&&l(X),e&&l(mt),e&&l($l),e&&l(Mt),e&&l(ee),b(xe),e&&l(yt),e&&l(de),e&&l(bt),b(De,e),e&&l(wt),b(me,e)}}}const Sn={local:"schedulers",sections:[{local:"load-pipeline",title:"Load pipeline"},{local:"access-the-scheduler",title:"Access the scheduler"},{local:"changing-the-scheduler",title:"Changing the scheduler"},{local:"compare-schedulers",title:"Compare schedulers"},{local:"changing-the-scheduler-in-flax",title:"Changing the Scheduler in Flax"}],title:"Schedulers"};function Gn(bs){return Jn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bn extends vn{constructor(w){super();Zn(this,w,Gn,Tn,Un,{})}}export{Bn as default,Sn as metadata};
