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