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