import{S as ac,i as lc,s as nc,e as r,k as d,w as y,t as l,M as ic,c as o,d as t,m as c,a as s,x as $,h as n,b as i,G as e,g as f,y as T,q as D,o as x,B as A,v as dc}from"../../../chunks/vendor-hf-doc-builder.js";import{T as sc}from"../../../chunks/Tip-hf-doc-builder.js";import{D as Ds}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as he}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function cc(dt){let m,M,v,b,P,_,w,N;return{c(){m=r("p"),M=l("It is required to be logged in ("),v=r("code"),b=l("huggingface-cli login"),P=l(") when you want to use private or "),_=r("a"),w=l(`gated
models`),N=l("."),this.h()},l(V){m=o(V,"P",{});var k=s(m);M=n(k,"It is required to be logged in ("),v=o(k,"CODE",{});var G=s(v);b=n(G,"huggingface-cli login"),G.forEach(t),P=n(k,") when you want to use private or "),_=o(k,"A",{href:!0,rel:!0});var ct=s(_);w=n(ct,`gated
models`),ct.forEach(t),N=n(k,"."),k.forEach(t),this.h()},h(){i(_,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),i(_,"rel","nofollow")},m(V,k){f(V,m,k),e(m,M),e(m,v),e(v,b),e(m,P),e(m,_),e(_,w),e(m,N)},d(V){V&&t(m)}}}function hc(dt){let m,M,v,b,P;return{c(){m=r("p"),M=l("Activate the special "),v=r("a"),b=l("\u201Coffline-mode\u201D"),P=l(` to
use this method in a firewalled environment.`),this.h()},l(_){m=o(_,"P",{});var w=s(m);M=n(w,"Activate the special "),v=o(w,"A",{href:!0,rel:!0});var N=s(v);b=n(N,"\u201Coffline-mode\u201D"),N.forEach(t),P=n(w,` to
use this method in a firewalled environment.`),w.forEach(t),this.h()},h(){i(v,"href","https://huggingface.co/transformers/installation.html#offline-mode"),i(v,"rel","nofollow")},m(_,w){f(_,m,w),e(m,M),e(m,v),e(v,b),e(m,P)},d(_){_&&t(m)}}}function fc(dt){let m,M,v,b,P,_,w,N,V,k,G,ct,Do,H,Q,Ct,fe,xs,Ft,As,xo,L,Ps,Wt,ks,Ms,Kt,Ns,Os,Ao,Y,ht,Rs,ue,Ut,Ls,Is,Jt,qs,Vs,C,Gs,zt,Hs,Cs,Bt,Fs,Ws,Po,F,X,jt,pe,Ks,Qt,Us,ko,g,Js,Yt,zs,Bs,ft,js,Qs,ut,Ys,Xs,Xt,Zs,ea,pt,ta,ra,Zt,oa,sa,Mo,W,Z,er,me,aa,tr,la,No,mt,na,Oo,ee,rr,ia,da,or,ca,Ro,K,te,sr,ve,ha,ar,fa,Lo,vt,ua,Io,re,lr,_e,nr,pa,ma,ir,va,_a,u,ge,dr,_t,ga,Ea,cr,Ee,hr,ba,wa,be,fr,gt,Sa,ya,ur,we,pr,$a,Ta,Se,mr,Et,Da,xa,vr,ye,_r,Aa,Pa,$e,gr,bt,ka,Ma,Er,Te,br,Na,Oa,De,wr,wt,Ra,La,Sr,xe,yr,Ia,qa,Ae,$r,St,Va,Ga,Tr,Pe,Dr,Ha,Ca,ke,xr,yt,Fa,Wa,Ar,Me,Pr,Ka,Ua,Ne,kr,$t,Ja,za,Mr,Oe,Nr,Ba,ja,Re,Or,Tt,Qa,Ya,Rr,Le,Lr,Xa,Za,Ie,Ir,Dt,el,tl,qr,qe,Vr,rl,ol,Ve,Gr,xt,sl,al,Hr,Ge,Cr,ll,nl,He,Fr,At,il,dl,Wr,Ce,Kr,cl,hl,Fe,Ur,Pt,fl,ul,Jr,We,zr,pl,ml,Ke,Br,kt,vl,_l,jr,Ue,Qr,gl,El,Je,Yr,Mt,bl,wl,Xr,ze,Zr,Sl,yl,Be,eo,Nt,$l,Tl,to,je,ro,Dl,xl,Qe,oo,Ot,Al,Pl,so,Ye,ao,kl,qo,U,oe,lo,Xe,Ml,no,Nl,Vo,Rt,Ol,Go,I,Ze,Rl,io,Ll,Il,ql,et,Vl,co,Gl,Hl,Cl,ho,Fl,Ho,se,Wl,Lt,Kl,Ul,Co,J,ae,fo,tt,Jl,uo,zl,Fo,E,rt,Bl,po,jl,Ql,mo,Yl,Xl,vo,q,_o,Zl,en,go,tn,rn,Eo,on,sn,an,O,ot,ln,bo,nn,dn,le,cn,ne,hn,ie,st,fn,z,un,wo,pn,mn,It,vn,_n,Wo,B,de,So,at,gn,yo,En,Ko,j,lt,bn,$o,wn,Uo;return _=new he({}),fe=new he({}),pe=new he({}),me=new he({}),ve=new he({}),Xe=new he({}),tt=new he({}),rt=new Ds({props:{name:"class diffusers.SchedulerMixin",anchor:"diffusers.SchedulerMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/schedulers/scheduling_utils.py#L41"}}),ot=new Ds({props:{name:"from_pretrained",anchor:"diffusers.SchedulerMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Dict[str, typing.Any] = None"},{name:"subfolder",val:": typing.Optional[str] = None"},{name:"return_unused_kwargs",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.SchedulerMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a model repo on huggingface.co. Valid model ids should have an
organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing the schedluer configurations saved using
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/overview#diffusers.SchedulerMixin.save_pretrained">save_pretrained()</a>, e.g., <code>./my_model_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.SchedulerMixin.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.SchedulerMixin.from_pretrained.return_unused_kwargs",description:`<strong>return_unused_kwargs</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether kwargs that are not consumed by the Python class should be returned or not.`,name:"return_unused_kwargs"},{anchor:"diffusers.SchedulerMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.SchedulerMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.SchedulerMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.SchedulerMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.SchedulerMixin.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.SchedulerMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.SchedulerMixin.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>transformers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.SchedulerMixin.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/schedulers/scheduling_utils.py#L55"}}),le=new sc({props:{$$slots:{default:[cc]},$$scope:{ctx:dt}}}),ne=new sc({props:{$$slots:{default:[hc]},$$scope:{ctx:dt}}}),st=new Ds({props:{name:"save_pretrained",anchor:"diffusers.SchedulerMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.SchedulerMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the configuration JSON file will be saved (will be created if it does not exist).`,name:"save_directory"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/schedulers/scheduling_utils.py#L126"}}),at=new he({}),lt=new Ds({props:{name:"class diffusers.schedulers.scheduling_utils.SchedulerOutput",anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput",parameters:[{name:"prev_sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput.prev_sample",description:`<strong>prev_sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code> for images) &#x2014;
Computed sample (x_{t-1}) of previous timestep. <code>prev_sample</code> should be used as next model input in the
denoising loop.`,name:"prev_sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/schedulers/scheduling_utils.py#L28"}}),{c(){m=r("meta"),M=d(),v=r("h1"),b=r("a"),P=r("span"),y(_.$$.fragment),w=d(),N=r("span"),V=l("Schedulers"),k=d(),G=r("p"),ct=l("Diffusers contains multiple pre-built schedule functions for the diffusion process."),Do=d(),H=r("h2"),Q=r("a"),Ct=r("span"),y(fe.$$.fragment),xs=d(),Ft=r("span"),As=l("What is a scheduler?"),xo=d(),L=r("p"),Ps=l("The schedule functions, denoted "),Wt=r("em"),ks=l("Schedulers"),Ms=l(" in the library take in the output of a trained model, a sample which the diffusion process is iterating on, and a timestep to return a denoised sample. That\u2019s why schedulers may also be called "),Kt=r("em"),Ns=l("Samplers"),Os=l(" in other diffusion models implementations."),Ao=d(),Y=r("ul"),ht=r("li"),Rs=l("Schedulers define the methodology for iteratively adding noise to an image or for updating a sample based on model outputs."),ue=r("ul"),Ut=r("li"),Ls=l("adding noise in different manners represent the algorithmic processes to train a diffusion model by adding noise to images."),Is=d(),Jt=r("li"),qs=l("for inference, the scheduler defines how to update a sample based on an output from a pretrained model."),Vs=d(),C=r("li"),Gs=l("Schedulers are often defined by a "),zt=r("em"),Hs=l("noise schedule"),Cs=l(" and an "),Bt=r("em"),Fs=l("update rule"),Ws=l(" to solve the differential equation solution."),Po=d(),F=r("h3"),X=r("a"),jt=r("span"),y(pe.$$.fragment),Ks=d(),Qt=r("span"),Us=l("Discrete versus continuous schedulers"),ko=d(),g=r("p"),Js=l(`All schedulers take in a timestep to predict the updated version of the sample being diffused.
The timesteps dictate where in the diffusion process the step is, where data is generated by iterating forward in time and inference is executed by propagating backwards through timesteps.
Different algorithms use timesteps that can be discrete (accepting `),Yt=r("code"),zs=l("int"),Bs=l(" inputs), such as the "),ft=r("a"),js=l("DDPMScheduler"),Qs=l(" or "),ut=r("a"),Ys=l("PNDMScheduler"),Xs=l(", or continuous (accepting "),Xt=r("code"),Zs=l("float"),ea=l(" inputs), such as the score-based schedulers "),pt=r("a"),ta=l("ScoreSdeVeScheduler"),ra=l(" or "),Zt=r("code"),oa=l("ScoreSdeVpScheduler"),sa=l("."),Mo=d(),W=r("h2"),Z=r("a"),er=r("span"),y(me.$$.fragment),aa=d(),tr=r("span"),la=l("Designing Re-usable schedulers"),No=d(),mt=r("p"),na=l(`The core design principle between the schedule functions is to be model, system, and framework independent.
This allows for rapid experimentation and cleaner abstractions in the code, where the model prediction is separated from the sample update.
To this end, the design of schedulers is such that:`),Oo=d(),ee=r("ul"),rr=r("li"),ia=l("Schedulers can be used interchangeably between diffusion models in inference to find the preferred trade-off between speed and generation quality."),da=d(),or=r("li"),ca=l("Schedulers are currently by default in PyTorch, but are designed to be framework independent (partial Jax support currently exists)."),Ro=d(),K=r("h2"),te=r("a"),sr=r("span"),y(ve.$$.fragment),ha=d(),ar=r("span"),fa=l("Schedulers Summary"),Lo=d(),vt=r("p"),ua=l("The following table summarizes all officially supported schedulers, their corresponding paper"),Io=d(),re=r("table"),lr=r("thead"),_e=r("tr"),nr=r("th"),pa=l("Scheduler"),ma=d(),ir=r("th"),va=l("Paper"),_a=d(),u=r("tbody"),ge=r("tr"),dr=r("td"),_t=r("a"),ga=l("ddim"),Ea=d(),cr=r("td"),Ee=r("a"),hr=r("strong"),ba=l("Denoising Diffusion Implicit Models"),wa=d(),be=r("tr"),fr=r("td"),gt=r("a"),Sa=l("ddpm"),ya=d(),ur=r("td"),we=r("a"),pr=r("strong"),$a=l("Denoising Diffusion Probabilistic Models"),Ta=d(),Se=r("tr"),mr=r("td"),Et=r("a"),Da=l("singlestep_dpm_solver"),xa=d(),vr=r("td"),ye=r("a"),_r=r("strong"),Aa=l("Singlestep DPM-Solver"),Pa=d(),$e=r("tr"),gr=r("td"),bt=r("a"),ka=l("multistep_dpm_solver"),Ma=d(),Er=r("td"),Te=r("a"),br=r("strong"),Na=l("Multistep DPM-Solver"),Oa=d(),De=r("tr"),wr=r("td"),wt=r("a"),Ra=l("heun"),La=d(),Sr=r("td"),xe=r("a"),yr=r("strong"),Ia=l("Heun scheduler inspired by Karras et. al paper"),qa=d(),Ae=r("tr"),$r=r("td"),St=r("a"),Va=l("dpm_discrete"),Ga=d(),Tr=r("td"),Pe=r("a"),Dr=r("strong"),Ha=l("DPM Discrete Scheduler inspired by Karras et. al paper"),Ca=d(),ke=r("tr"),xr=r("td"),yt=r("a"),Fa=l("dpm_discrete_ancestral"),Wa=d(),Ar=r("td"),Me=r("a"),Pr=r("strong"),Ka=l("DPM Discrete Scheduler with ancestral sampling inspired by Karras et. al paper"),Ua=d(),Ne=r("tr"),kr=r("td"),$t=r("a"),Ja=l("stochastic_karras_ve"),za=d(),Mr=r("td"),Oe=r("a"),Nr=r("strong"),Ba=l("Variance exploding, stochastic sampling from Karras et. al"),ja=d(),Re=r("tr"),Or=r("td"),Tt=r("a"),Qa=l("lms_discrete"),Ya=d(),Rr=r("td"),Le=r("a"),Lr=r("strong"),Xa=l("Linear multistep scheduler for discrete beta schedules"),Za=d(),Ie=r("tr"),Ir=r("td"),Dt=r("a"),el=l("pndm"),tl=d(),qr=r("td"),qe=r("a"),Vr=r("strong"),rl=l("Pseudo numerical methods for diffusion models (PNDM)"),ol=d(),Ve=r("tr"),Gr=r("td"),xt=r("a"),sl=l("score_sde_ve"),al=d(),Hr=r("td"),Ge=r("a"),Cr=r("strong"),ll=l("variance exploding stochastic differential equation (VE-SDE) scheduler"),nl=d(),He=r("tr"),Fr=r("td"),At=r("a"),il=l("ipndm"),dl=d(),Wr=r("td"),Ce=r("a"),Kr=r("strong"),cl=l("improved pseudo numerical methods for diffusion models (iPNDM)"),hl=d(),Fe=r("tr"),Ur=r("td"),Pt=r("a"),fl=l("score_sde_vp"),ul=d(),Jr=r("td"),We=r("a"),zr=r("strong"),pl=l("Variance preserving stochastic differential equation (VP-SDE) scheduler"),ml=d(),Ke=r("tr"),Br=r("td"),kt=r("a"),vl=l("euler"),_l=d(),jr=r("td"),Ue=r("a"),Qr=r("strong"),gl=l("Euler scheduler"),El=d(),Je=r("tr"),Yr=r("td"),Mt=r("a"),bl=l("euler_ancestral"),wl=d(),Xr=r("td"),ze=r("a"),Zr=r("strong"),Sl=l("Euler Ancestral scheduler"),yl=d(),Be=r("tr"),eo=r("td"),Nt=r("a"),$l=l("vq_diffusion"),Tl=d(),to=r("td"),je=r("a"),ro=r("strong"),Dl=l("VQDiffusionScheduler"),xl=d(),Qe=r("tr"),oo=r("td"),Ot=r("a"),Al=l("repaint"),Pl=d(),so=r("td"),Ye=r("a"),ao=r("strong"),kl=l("RePaint scheduler"),qo=d(),U=r("h2"),oe=r("a"),lo=r("span"),y(Xe.$$.fragment),Ml=d(),no=r("span"),Nl=l("API"),Vo=d(),Rt=r("p"),Ol=l("The core API for any new scheduler must follow a limited structure."),Go=d(),I=r("ul"),Ze=r("li"),Rl=l("Schedulers should provide one or more "),io=r("code"),Ll=l("def step(...)"),Il=l(" functions that should be called to update the generated sample iteratively."),ql=d(),et=r("li"),Vl=l("Schedulers should provide a "),co=r("code"),Gl=l("set_timesteps(...)"),Hl=l(" method that configures the parameters of a schedule function for a specific inference task."),Cl=d(),ho=r("li"),Fl=l("Schedulers should be framework-specific."),Ho=d(),se=r("p"),Wl=l("The base class "),Lt=r("a"),Kl=l("SchedulerMixin"),Ul=l(" implements low level utilities used by multiple schedulers."),Co=d(),J=r("h3"),ae=r("a"),fo=r("span"),y(tt.$$.fragment),Jl=d(),uo=r("span"),zl=l("SchedulerMixin"),Fo=d(),E=r("div"),y(rt.$$.fragment),Bl=d(),po=r("p"),jl=l("Mixin containing common functions for the schedulers."),Ql=d(),mo=r("p"),Yl=l("Class attributes:"),Xl=d(),vo=r("ul"),q=r("li"),_o=r("strong"),Zl=l("_compatibles"),en=l(" ("),go=r("code"),tn=l("List[str]"),rn=l(`) \u2014 A list of classes that are compatible with the parent class, so that
`),Eo=r("code"),on=l("from_config"),sn=l(` can be used from a class different than the one used to save the config (should be overridden
by parent class).`),an=d(),O=r("div"),y(ot.$$.fragment),ln=d(),bo=r("p"),nn=l("Instantiate a Scheduler class from a pre-defined JSON configuration file inside a directory or Hub repo."),dn=d(),y(le.$$.fragment),cn=d(),y(ne.$$.fragment),hn=d(),ie=r("div"),y(st.$$.fragment),fn=d(),z=r("p"),un=l("Save a scheduler configuration object to the directory "),wo=r("code"),pn=l("save_directory"),mn=l(`, so that it can be re-loaded using the
`),It=r("a"),vn=l("from_pretrained()"),_n=l(" class method."),Wo=d(),B=r("h3"),de=r("a"),So=r("span"),y(at.$$.fragment),gn=d(),yo=r("span"),En=l("SchedulerOutput"),Ko=l("\n\nThe class `SchedulerOutput` contains the outputs from any schedulers `step(...)` call.\n"),j=r("div"),y(lt.$$.fragment),bn=d(),$o=r("p"),wn=l("Base class for the scheduler\u2019s step function output."),this.h()},l(a){const h=ic('[data-svelte="svelte-1phssyn"]',document.head);m=o(h,"META",{name:!0,content:!0}),h.forEach(t),M=c(a),v=o(a,"H1",{class:!0});var nt=s(v);b=o(nt,"A",{id:!0,class:!0,href:!0});var To=s(b);P=o(To,"SPAN",{});var yn=s(P);$(_.$$.fragment,yn),yn.forEach(t),To.forEach(t),w=c(nt),N=o(nt,"SPAN",{});var $n=s(N);V=n($n,"Schedulers"),$n.forEach(t),nt.forEach(t),k=c(a),G=o(a,"P",{});var Tn=s(G);ct=n(Tn,"Diffusers contains multiple pre-built schedule functions for the diffusion process."),Tn.forEach(t),Do=c(a),H=o(a,"H2",{class:!0});var Jo=s(H);Q=o(Jo,"A",{id:!0,class:!0,href:!0});var Dn=s(Q);Ct=o(Dn,"SPAN",{});var xn=s(Ct);$(fe.$$.fragment,xn),xn.forEach(t),Dn.forEach(t),xs=c(Jo),Ft=o(Jo,"SPAN",{});var An=s(Ft);As=n(An,"What is a scheduler?"),An.forEach(t),Jo.forEach(t),xo=c(a),L=o(a,"P",{});var qt=s(L);Ps=n(qt,"The schedule functions, denoted "),Wt=o(qt,"EM",{});var Pn=s(Wt);ks=n(Pn,"Schedulers"),Pn.forEach(t),Ms=n(qt," in the library take in the output of a trained model, a sample which the diffusion process is iterating on, and a timestep to return a denoised sample. That\u2019s why schedulers may also be called "),Kt=o(qt,"EM",{});var kn=s(Kt);Ns=n(kn,"Samplers"),kn.forEach(t),Os=n(qt," in other diffusion models implementations."),qt.forEach(t),Ao=c(a),Y=o(a,"UL",{});var zo=s(Y);ht=o(zo,"LI",{});var Sn=s(ht);Rs=n(Sn,"Schedulers define the methodology for iteratively adding noise to an image or for updating a sample based on model outputs."),ue=o(Sn,"UL",{});var Bo=s(ue);Ut=o(Bo,"LI",{});var Mn=s(Ut);Ls=n(Mn,"adding noise in different manners represent the algorithmic processes to train a diffusion model by adding noise to images."),Mn.forEach(t),Is=c(Bo),Jt=o(Bo,"LI",{});var Nn=s(Jt);qs=n(Nn,"for inference, the scheduler defines how to update a sample based on an output from a pretrained model."),Nn.forEach(t),Bo.forEach(t),Sn.forEach(t),Vs=c(zo),C=o(zo,"LI",{});var Vt=s(C);Gs=n(Vt,"Schedulers are often defined by a "),zt=o(Vt,"EM",{});var On=s(zt);Hs=n(On,"noise schedule"),On.forEach(t),Cs=n(Vt," and an "),Bt=o(Vt,"EM",{});var Rn=s(Bt);Fs=n(Rn,"update rule"),Rn.forEach(t),Ws=n(Vt," to solve the differential equation solution."),Vt.forEach(t),zo.forEach(t),Po=c(a),F=o(a,"H3",{class:!0});var jo=s(F);X=o(jo,"A",{id:!0,class:!0,href:!0});var Ln=s(X);jt=o(Ln,"SPAN",{});var In=s(jt);$(pe.$$.fragment,In),In.forEach(t),Ln.forEach(t),Ks=c(jo),Qt=o(jo,"SPAN",{});var qn=s(Qt);Us=n(qn,"Discrete versus continuous schedulers"),qn.forEach(t),jo.forEach(t),ko=c(a),g=o(a,"P",{});var S=s(g);Js=n(S,`All schedulers take in a timestep to predict the updated version of the sample being diffused.
The timesteps dictate where in the diffusion process the step is, where data is generated by iterating forward in time and inference is executed by propagating backwards through timesteps.
Different algorithms use timesteps that can be discrete (accepting `),Yt=o(S,"CODE",{});var Vn=s(Yt);zs=n(Vn,"int"),Vn.forEach(t),Bs=n(S," inputs), such as the "),ft=o(S,"A",{href:!0});var Gn=s(ft);js=n(Gn,"DDPMScheduler"),Gn.forEach(t),Qs=n(S," or "),ut=o(S,"A",{href:!0});var Hn=s(ut);Ys=n(Hn,"PNDMScheduler"),Hn.forEach(t),Xs=n(S,", or continuous (accepting "),Xt=o(S,"CODE",{});var Cn=s(Xt);Zs=n(Cn,"float"),Cn.forEach(t),ea=n(S," inputs), such as the score-based schedulers "),pt=o(S,"A",{href:!0});var Fn=s(pt);ta=n(Fn,"ScoreSdeVeScheduler"),Fn.forEach(t),ra=n(S," or "),Zt=o(S,"CODE",{});var Wn=s(Zt);oa=n(Wn,"ScoreSdeVpScheduler"),Wn.forEach(t),sa=n(S,"."),S.forEach(t),Mo=c(a),W=o(a,"H2",{class:!0});var Qo=s(W);Z=o(Qo,"A",{id:!0,class:!0,href:!0});var Kn=s(Z);er=o(Kn,"SPAN",{});var Un=s(er);$(me.$$.fragment,Un),Un.forEach(t),Kn.forEach(t),aa=c(Qo),tr=o(Qo,"SPAN",{});var Jn=s(tr);la=n(Jn,"Designing Re-usable schedulers"),Jn.forEach(t),Qo.forEach(t),No=c(a),mt=o(a,"P",{});var zn=s(mt);na=n(zn,`The core design principle between the schedule functions is to be model, system, and framework independent.
This allows for rapid experimentation and cleaner abstractions in the code, where the model prediction is separated from the sample update.
To this end, the design of schedulers is such that:`),zn.forEach(t),Oo=c(a),ee=o(a,"UL",{});var Yo=s(ee);rr=o(Yo,"LI",{});var Bn=s(rr);ia=n(Bn,"Schedulers can be used interchangeably between diffusion models in inference to find the preferred trade-off between speed and generation quality."),Bn.forEach(t),da=c(Yo),or=o(Yo,"LI",{});var jn=s(or);ca=n(jn,"Schedulers are currently by default in PyTorch, but are designed to be framework independent (partial Jax support currently exists)."),jn.forEach(t),Yo.forEach(t),Ro=c(a),K=o(a,"H2",{class:!0});var Xo=s(K);te=o(Xo,"A",{id:!0,class:!0,href:!0});var Qn=s(te);sr=o(Qn,"SPAN",{});var Yn=s(sr);$(ve.$$.fragment,Yn),Yn.forEach(t),Qn.forEach(t),ha=c(Xo),ar=o(Xo,"SPAN",{});var Xn=s(ar);fa=n(Xn,"Schedulers Summary"),Xn.forEach(t),Xo.forEach(t),Lo=c(a),vt=o(a,"P",{});var Zn=s(vt);ua=n(Zn,"The following table summarizes all officially supported schedulers, their corresponding paper"),Zn.forEach(t),Io=c(a),re=o(a,"TABLE",{});var Zo=s(re);lr=o(Zo,"THEAD",{});var ei=s(lr);_e=o(ei,"TR",{});var es=s(_e);nr=o(es,"TH",{});var ti=s(nr);pa=n(ti,"Scheduler"),ti.forEach(t),ma=c(es),ir=o(es,"TH",{});var ri=s(ir);va=n(ri,"Paper"),ri.forEach(t),es.forEach(t),ei.forEach(t),_a=c(Zo),u=o(Zo,"TBODY",{});var p=s(u);ge=o(p,"TR",{});var ts=s(ge);dr=o(ts,"TD",{});var oi=s(dr);_t=o(oi,"A",{href:!0});var si=s(_t);ga=n(si,"ddim"),si.forEach(t),oi.forEach(t),Ea=c(ts),cr=o(ts,"TD",{});var ai=s(cr);Ee=o(ai,"A",{href:!0,rel:!0});var li=s(Ee);hr=o(li,"STRONG",{});var ni=s(hr);ba=n(ni,"Denoising Diffusion Implicit Models"),ni.forEach(t),li.forEach(t),ai.forEach(t),ts.forEach(t),wa=c(p),be=o(p,"TR",{});var rs=s(be);fr=o(rs,"TD",{});var ii=s(fr);gt=o(ii,"A",{href:!0});var di=s(gt);Sa=n(di,"ddpm"),di.forEach(t),ii.forEach(t),ya=c(rs),ur=o(rs,"TD",{});var ci=s(ur);we=o(ci,"A",{href:!0,rel:!0});var hi=s(we);pr=o(hi,"STRONG",{});var fi=s(pr);$a=n(fi,"Denoising Diffusion Probabilistic Models"),fi.forEach(t),hi.forEach(t),ci.forEach(t),rs.forEach(t),Ta=c(p),Se=o(p,"TR",{});var os=s(Se);mr=o(os,"TD",{});var ui=s(mr);Et=o(ui,"A",{href:!0});var pi=s(Et);Da=n(pi,"singlestep_dpm_solver"),pi.forEach(t),ui.forEach(t),xa=c(os),vr=o(os,"TD",{});var mi=s(vr);ye=o(mi,"A",{href:!0,rel:!0});var vi=s(ye);_r=o(vi,"STRONG",{});var _i=s(_r);Aa=n(_i,"Singlestep DPM-Solver"),_i.forEach(t),vi.forEach(t),mi.forEach(t),os.forEach(t),Pa=c(p),$e=o(p,"TR",{});var ss=s($e);gr=o(ss,"TD",{});var gi=s(gr);bt=o(gi,"A",{href:!0});var Ei=s(bt);ka=n(Ei,"multistep_dpm_solver"),Ei.forEach(t),gi.forEach(t),Ma=c(ss),Er=o(ss,"TD",{});var bi=s(Er);Te=o(bi,"A",{href:!0,rel:!0});var wi=s(Te);br=o(wi,"STRONG",{});var Si=s(br);Na=n(Si,"Multistep DPM-Solver"),Si.forEach(t),wi.forEach(t),bi.forEach(t),ss.forEach(t),Oa=c(p),De=o(p,"TR",{});var as=s(De);wr=o(as,"TD",{});var yi=s(wr);wt=o(yi,"A",{href:!0});var $i=s(wt);Ra=n($i,"heun"),$i.forEach(t),yi.forEach(t),La=c(as),Sr=o(as,"TD",{});var Ti=s(Sr);xe=o(Ti,"A",{href:!0,rel:!0});var Di=s(xe);yr=o(Di,"STRONG",{});var xi=s(yr);Ia=n(xi,"Heun scheduler inspired by Karras et. al paper"),xi.forEach(t),Di.forEach(t),Ti.forEach(t),as.forEach(t),qa=c(p),Ae=o(p,"TR",{});var ls=s(Ae);$r=o(ls,"TD",{});var Ai=s($r);St=o(Ai,"A",{href:!0});var Pi=s(St);Va=n(Pi,"dpm_discrete"),Pi.forEach(t),Ai.forEach(t),Ga=c(ls),Tr=o(ls,"TD",{});var ki=s(Tr);Pe=o(ki,"A",{href:!0,rel:!0});var Mi=s(Pe);Dr=o(Mi,"STRONG",{});var Ni=s(Dr);Ha=n(Ni,"DPM Discrete Scheduler inspired by Karras et. al paper"),Ni.forEach(t),Mi.forEach(t),ki.forEach(t),ls.forEach(t),Ca=c(p),ke=o(p,"TR",{});var ns=s(ke);xr=o(ns,"TD",{});var Oi=s(xr);yt=o(Oi,"A",{href:!0});var Ri=s(yt);Fa=n(Ri,"dpm_discrete_ancestral"),Ri.forEach(t),Oi.forEach(t),Wa=c(ns),Ar=o(ns,"TD",{});var Li=s(Ar);Me=o(Li,"A",{href:!0,rel:!0});var Ii=s(Me);Pr=o(Ii,"STRONG",{});var qi=s(Pr);Ka=n(qi,"DPM Discrete Scheduler with ancestral sampling inspired by Karras et. al paper"),qi.forEach(t),Ii.forEach(t),Li.forEach(t),ns.forEach(t),Ua=c(p),Ne=o(p,"TR",{});var is=s(Ne);kr=o(is,"TD",{});var Vi=s(kr);$t=o(Vi,"A",{href:!0});var Gi=s($t);Ja=n(Gi,"stochastic_karras_ve"),Gi.forEach(t),Vi.forEach(t),za=c(is),Mr=o(is,"TD",{});var Hi=s(Mr);Oe=o(Hi,"A",{href:!0,rel:!0});var Ci=s(Oe);Nr=o(Ci,"STRONG",{});var Fi=s(Nr);Ba=n(Fi,"Variance exploding, stochastic sampling from Karras et. al"),Fi.forEach(t),Ci.forEach(t),Hi.forEach(t),is.forEach(t),ja=c(p),Re=o(p,"TR",{});var ds=s(Re);Or=o(ds,"TD",{});var Wi=s(Or);Tt=o(Wi,"A",{href:!0});var Ki=s(Tt);Qa=n(Ki,"lms_discrete"),Ki.forEach(t),Wi.forEach(t),Ya=c(ds),Rr=o(ds,"TD",{});var Ui=s(Rr);Le=o(Ui,"A",{href:!0,rel:!0});var Ji=s(Le);Lr=o(Ji,"STRONG",{});var zi=s(Lr);Xa=n(zi,"Linear multistep scheduler for discrete beta schedules"),zi.forEach(t),Ji.forEach(t),Ui.forEach(t),ds.forEach(t),Za=c(p),Ie=o(p,"TR",{});var cs=s(Ie);Ir=o(cs,"TD",{});var Bi=s(Ir);Dt=o(Bi,"A",{href:!0});var ji=s(Dt);el=n(ji,"pndm"),ji.forEach(t),Bi.forEach(t),tl=c(cs),qr=o(cs,"TD",{});var Qi=s(qr);qe=o(Qi,"A",{href:!0,rel:!0});var Yi=s(qe);Vr=o(Yi,"STRONG",{});var Xi=s(Vr);rl=n(Xi,"Pseudo numerical methods for diffusion models (PNDM)"),Xi.forEach(t),Yi.forEach(t),Qi.forEach(t),cs.forEach(t),ol=c(p),Ve=o(p,"TR",{});var hs=s(Ve);Gr=o(hs,"TD",{});var Zi=s(Gr);xt=o(Zi,"A",{href:!0});var ed=s(xt);sl=n(ed,"score_sde_ve"),ed.forEach(t),Zi.forEach(t),al=c(hs),Hr=o(hs,"TD",{});var td=s(Hr);Ge=o(td,"A",{href:!0,rel:!0});var rd=s(Ge);Cr=o(rd,"STRONG",{});var od=s(Cr);ll=n(od,"variance exploding stochastic differential equation (VE-SDE) scheduler"),od.forEach(t),rd.forEach(t),td.forEach(t),hs.forEach(t),nl=c(p),He=o(p,"TR",{});var fs=s(He);Fr=o(fs,"TD",{});var sd=s(Fr);At=o(sd,"A",{href:!0});var ad=s(At);il=n(ad,"ipndm"),ad.forEach(t),sd.forEach(t),dl=c(fs),Wr=o(fs,"TD",{});var ld=s(Wr);Ce=o(ld,"A",{href:!0,rel:!0});var nd=s(Ce);Kr=o(nd,"STRONG",{});var id=s(Kr);cl=n(id,"improved pseudo numerical methods for diffusion models (iPNDM)"),id.forEach(t),nd.forEach(t),ld.forEach(t),fs.forEach(t),hl=c(p),Fe=o(p,"TR",{});var us=s(Fe);Ur=o(us,"TD",{});var dd=s(Ur);Pt=o(dd,"A",{href:!0});var cd=s(Pt);fl=n(cd,"score_sde_vp"),cd.forEach(t),dd.forEach(t),ul=c(us),Jr=o(us,"TD",{});var hd=s(Jr);We=o(hd,"A",{href:!0,rel:!0});var fd=s(We);zr=o(fd,"STRONG",{});var ud=s(zr);pl=n(ud,"Variance preserving stochastic differential equation (VP-SDE) scheduler"),ud.forEach(t),fd.forEach(t),hd.forEach(t),us.forEach(t),ml=c(p),Ke=o(p,"TR",{});var ps=s(Ke);Br=o(ps,"TD",{});var pd=s(Br);kt=o(pd,"A",{href:!0});var md=s(kt);vl=n(md,"euler"),md.forEach(t),pd.forEach(t),_l=c(ps),jr=o(ps,"TD",{});var vd=s(jr);Ue=o(vd,"A",{href:!0,rel:!0});var _d=s(Ue);Qr=o(_d,"STRONG",{});var gd=s(Qr);gl=n(gd,"Euler scheduler"),gd.forEach(t),_d.forEach(t),vd.forEach(t),ps.forEach(t),El=c(p),Je=o(p,"TR",{});var ms=s(Je);Yr=o(ms,"TD",{});var Ed=s(Yr);Mt=o(Ed,"A",{href:!0});var bd=s(Mt);bl=n(bd,"euler_ancestral"),bd.forEach(t),Ed.forEach(t),wl=c(ms),Xr=o(ms,"TD",{});var wd=s(Xr);ze=o(wd,"A",{href:!0,rel:!0});var Sd=s(ze);Zr=o(Sd,"STRONG",{});var yd=s(Zr);Sl=n(yd,"Euler Ancestral scheduler"),yd.forEach(t),Sd.forEach(t),wd.forEach(t),ms.forEach(t),yl=c(p),Be=o(p,"TR",{});var vs=s(Be);eo=o(vs,"TD",{});var $d=s(eo);Nt=o($d,"A",{href:!0});var Td=s(Nt);$l=n(Td,"vq_diffusion"),Td.forEach(t),$d.forEach(t),Tl=c(vs),to=o(vs,"TD",{});var Dd=s(to);je=o(Dd,"A",{href:!0,rel:!0});var xd=s(je);ro=o(xd,"STRONG",{});var Ad=s(ro);Dl=n(Ad,"VQDiffusionScheduler"),Ad.forEach(t),xd.forEach(t),Dd.forEach(t),vs.forEach(t),xl=c(p),Qe=o(p,"TR",{});var _s=s(Qe);oo=o(_s,"TD",{});var Pd=s(oo);Ot=o(Pd,"A",{href:!0});var kd=s(Ot);Al=n(kd,"repaint"),kd.forEach(t),Pd.forEach(t),Pl=c(_s),so=o(_s,"TD",{});var Md=s(so);Ye=o(Md,"A",{href:!0,rel:!0});var Nd=s(Ye);ao=o(Nd,"STRONG",{});var Od=s(ao);kl=n(Od,"RePaint scheduler"),Od.forEach(t),Nd.forEach(t),Md.forEach(t),_s.forEach(t),p.forEach(t),Zo.forEach(t),qo=c(a),U=o(a,"H2",{class:!0});var gs=s(U);oe=o(gs,"A",{id:!0,class:!0,href:!0});var Rd=s(oe);lo=o(Rd,"SPAN",{});var Ld=s(lo);$(Xe.$$.fragment,Ld),Ld.forEach(t),Rd.forEach(t),Ml=c(gs),no=o(gs,"SPAN",{});var Id=s(no);Nl=n(Id,"API"),Id.forEach(t),gs.forEach(t),Vo=c(a),Rt=o(a,"P",{});var qd=s(Rt);Ol=n(qd,"The core API for any new scheduler must follow a limited structure."),qd.forEach(t),Go=c(a),I=o(a,"UL",{});var Gt=s(I);Ze=o(Gt,"LI",{});var Es=s(Ze);Rl=n(Es,"Schedulers should provide one or more "),io=o(Es,"CODE",{});var Vd=s(io);Ll=n(Vd,"def step(...)"),Vd.forEach(t),Il=n(Es," functions that should be called to update the generated sample iteratively."),Es.forEach(t),ql=c(Gt),et=o(Gt,"LI",{});var bs=s(et);Vl=n(bs,"Schedulers should provide a "),co=o(bs,"CODE",{});var Gd=s(co);Gl=n(Gd,"set_timesteps(...)"),Gd.forEach(t),Hl=n(bs," method that configures the parameters of a schedule function for a specific inference task."),bs.forEach(t),Cl=c(Gt),ho=o(Gt,"LI",{});var Hd=s(ho);Fl=n(Hd,"Schedulers should be framework-specific."),Hd.forEach(t),Gt.forEach(t),Ho=c(a),se=o(a,"P",{});var ws=s(se);Wl=n(ws,"The base class "),Lt=o(ws,"A",{href:!0});var Cd=s(Lt);Kl=n(Cd,"SchedulerMixin"),Cd.forEach(t),Ul=n(ws," implements low level utilities used by multiple schedulers."),ws.forEach(t),Co=c(a),J=o(a,"H3",{class:!0});var Ss=s(J);ae=o(Ss,"A",{id:!0,class:!0,href:!0});var Fd=s(ae);fo=o(Fd,"SPAN",{});var Wd=s(fo);$(tt.$$.fragment,Wd),Wd.forEach(t),Fd.forEach(t),Jl=c(Ss),uo=o(Ss,"SPAN",{});var Kd=s(uo);zl=n(Kd,"SchedulerMixin"),Kd.forEach(t),Ss.forEach(t),Fo=c(a),E=o(a,"DIV",{class:!0});var R=s(E);$(rt.$$.fragment,R),Bl=c(R),po=o(R,"P",{});var Ud=s(po);jl=n(Ud,"Mixin containing common functions for the schedulers."),Ud.forEach(t),Ql=c(R),mo=o(R,"P",{});var Jd=s(mo);Yl=n(Jd,"Class attributes:"),Jd.forEach(t),Xl=c(R),vo=o(R,"UL",{});var zd=s(vo);q=o(zd,"LI",{});var it=s(q);_o=o(it,"STRONG",{});var Bd=s(_o);Zl=n(Bd,"_compatibles"),Bd.forEach(t),en=n(it," ("),go=o(it,"CODE",{});var jd=s(go);tn=n(jd,"List[str]"),jd.forEach(t),rn=n(it,`) \u2014 A list of classes that are compatible with the parent class, so that
`),Eo=o(it,"CODE",{});var Qd=s(Eo);on=n(Qd,"from_config"),Qd.forEach(t),sn=n(it,` can be used from a class different than the one used to save the config (should be overridden
by parent class).`),it.forEach(t),zd.forEach(t),an=c(R),O=o(R,"DIV",{class:!0});var ce=s(O);$(ot.$$.fragment,ce),ln=c(ce),bo=o(ce,"P",{});var Yd=s(bo);nn=n(Yd,"Instantiate a Scheduler class from a pre-defined JSON configuration file inside a directory or Hub repo."),Yd.forEach(t),dn=c(ce),$(le.$$.fragment,ce),cn=c(ce),$(ne.$$.fragment,ce),ce.forEach(t),hn=c(R),ie=o(R,"DIV",{class:!0});var ys=s(ie);$(st.$$.fragment,ys),fn=c(ys),z=o(ys,"P",{});var Ht=s(z);un=n(Ht,"Save a scheduler configuration object to the directory "),wo=o(Ht,"CODE",{});var Xd=s(wo);pn=n(Xd,"save_directory"),Xd.forEach(t),mn=n(Ht,`, so that it can be re-loaded using the
`),It=o(Ht,"A",{href:!0});var Zd=s(It);vn=n(Zd,"from_pretrained()"),Zd.forEach(t),_n=n(Ht," class method."),Ht.forEach(t),ys.forEach(t),R.forEach(t),Wo=c(a),B=o(a,"H3",{class:!0});var $s=s(B);de=o($s,"A",{id:!0,class:!0,href:!0});var ec=s(de);So=o(ec,"SPAN",{});var tc=s(So);$(at.$$.fragment,tc),tc.forEach(t),ec.forEach(t),gn=c($s),yo=o($s,"SPAN",{});var rc=s(yo);En=n(rc,"SchedulerOutput"),rc.forEach(t),$s.forEach(t),Ko=n(a,"\n\nThe class `SchedulerOutput` contains the outputs from any schedulers `step(...)` call.\n"),j=o(a,"DIV",{class:!0});var Ts=s(j);$(lt.$$.fragment,Ts),bn=c(Ts),$o=o(Ts,"P",{});var oc=s($o);wn=n(oc,"Base class for the scheduler\u2019s step function output."),oc.forEach(t),Ts.forEach(t),this.h()},h(){i(m,"name","hf:doc:metadata"),i(m,"content",JSON.stringify(uc)),i(b,"id","schedulers"),i(b,"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"),i(b,"href","#schedulers"),i(v,"class","relative group"),i(Q,"id","what-is-a-scheduler"),i(Q,"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"),i(Q,"href","#what-is-a-scheduler"),i(H,"class","relative group"),i(X,"id","discrete-versus-continuous-schedulers"),i(X,"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"),i(X,"href","#discrete-versus-continuous-schedulers"),i(F,"class","relative group"),i(ft,"href","/docs/diffusers/v0.11.0/en/api/schedulers/ddpm#diffusers.DDPMScheduler"),i(ut,"href","/docs/diffusers/v0.11.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),i(pt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/score_sde_ve#diffusers.ScoreSdeVeScheduler"),i(Z,"id","designing-reusable-schedulers"),i(Z,"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"),i(Z,"href","#designing-reusable-schedulers"),i(W,"class","relative group"),i(te,"id","schedulers-summary"),i(te,"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"),i(te,"href","#schedulers-summary"),i(K,"class","relative group"),i(_t,"href","./ddim"),i(Ee,"href","https://arxiv.org/abs/2010.02502"),i(Ee,"rel","nofollow"),i(gt,"href","./ddpm"),i(we,"href","https://arxiv.org/abs/2006.11239"),i(we,"rel","nofollow"),i(Et,"href","./singlestep_dpm_solver"),i(ye,"href","https://arxiv.org/abs/2206.00927"),i(ye,"rel","nofollow"),i(bt,"href","./multistep_dpm_solver"),i(Te,"href","https://arxiv.org/abs/2206.00927"),i(Te,"rel","nofollow"),i(wt,"href","./heun"),i(xe,"href","https://arxiv.org/abs/2206.00364"),i(xe,"rel","nofollow"),i(St,"href","./dpm_discrete"),i(Pe,"href","https://arxiv.org/abs/2206.00364"),i(Pe,"rel","nofollow"),i(yt,"href","./dpm_discrete_ancestral"),i(Me,"href","https://arxiv.org/abs/2206.00364"),i(Me,"rel","nofollow"),i($t,"href","./stochastic_karras_ve"),i(Oe,"href","https://arxiv.org/abs/2206.00364"),i(Oe,"rel","nofollow"),i(Tt,"href","./lms_discrete"),i(Le,"href","https://arxiv.org/abs/2206.00364"),i(Le,"rel","nofollow"),i(Dt,"href","./pndm"),i(qe,"href","https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L181"),i(qe,"rel","nofollow"),i(xt,"href","./score_sde_ve"),i(Ge,"href","https://arxiv.org/abs/2011.13456"),i(Ge,"rel","nofollow"),i(At,"href","./ipndm"),i(Ce,"href","https://github.com/crowsonkb/v-diffusion-pytorch/blob/987f8985e38208345c1959b0ea767a625831cc9b/diffusion/sampling.py#L296"),i(Ce,"rel","nofollow"),i(Pt,"href","./score_sde_vp"),i(We,"href","https://arxiv.org/abs/2011.13456"),i(We,"rel","nofollow"),i(kt,"href","./euler"),i(Ue,"href","https://arxiv.org/abs/2206.00364"),i(Ue,"rel","nofollow"),i(Mt,"href","./euler_ancestral"),i(ze,"href","https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L72"),i(ze,"rel","nofollow"),i(Nt,"href","./vq_diffusion"),i(je,"href","https://arxiv.org/abs/2111.14822"),i(je,"rel","nofollow"),i(Ot,"href","./repaint"),i(Ye,"href","https://arxiv.org/abs/2201.09865"),i(Ye,"rel","nofollow"),i(oe,"id","api"),i(oe,"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"),i(oe,"href","#api"),i(U,"class","relative group"),i(Lt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/overview#diffusers.SchedulerMixin"),i(ae,"id","diffusers.SchedulerMixin"),i(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"),i(ae,"href","#diffusers.SchedulerMixin"),i(J,"class","relative group"),i(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(It,"href","/docs/diffusers/v0.11.0/en/api/schedulers/overview#diffusers.SchedulerMixin.from_pretrained"),i(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(de,"id","diffusers.schedulers.scheduling_utils.SchedulerOutput"),i(de,"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"),i(de,"href","#diffusers.schedulers.scheduling_utils.SchedulerOutput"),i(B,"class","relative group"),i(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(a,h){e(document.head,m),f(a,M,h),f(a,v,h),e(v,b),e(b,P),T(_,P,null),e(v,w),e(v,N),e(N,V),f(a,k,h),f(a,G,h),e(G,ct),f(a,Do,h),f(a,H,h),e(H,Q),e(Q,Ct),T(fe,Ct,null),e(H,xs),e(H,Ft),e(Ft,As),f(a,xo,h),f(a,L,h),e(L,Ps),e(L,Wt),e(Wt,ks),e(L,Ms),e(L,Kt),e(Kt,Ns),e(L,Os),f(a,Ao,h),f(a,Y,h),e(Y,ht),e(ht,Rs),e(ht,ue),e(ue,Ut),e(Ut,Ls),e(ue,Is),e(ue,Jt),e(Jt,qs),e(Y,Vs),e(Y,C),e(C,Gs),e(C,zt),e(zt,Hs),e(C,Cs),e(C,Bt),e(Bt,Fs),e(C,Ws),f(a,Po,h),f(a,F,h),e(F,X),e(X,jt),T(pe,jt,null),e(F,Ks),e(F,Qt),e(Qt,Us),f(a,ko,h),f(a,g,h),e(g,Js),e(g,Yt),e(Yt,zs),e(g,Bs),e(g,ft),e(ft,js),e(g,Qs),e(g,ut),e(ut,Ys),e(g,Xs),e(g,Xt),e(Xt,Zs),e(g,ea),e(g,pt),e(pt,ta),e(g,ra),e(g,Zt),e(Zt,oa),e(g,sa),f(a,Mo,h),f(a,W,h),e(W,Z),e(Z,er),T(me,er,null),e(W,aa),e(W,tr),e(tr,la),f(a,No,h),f(a,mt,h),e(mt,na),f(a,Oo,h),f(a,ee,h),e(ee,rr),e(rr,ia),e(ee,da),e(ee,or),e(or,ca),f(a,Ro,h),f(a,K,h),e(K,te),e(te,sr),T(ve,sr,null),e(K,ha),e(K,ar),e(ar,fa),f(a,Lo,h),f(a,vt,h),e(vt,ua),f(a,Io,h),f(a,re,h),e(re,lr),e(lr,_e),e(_e,nr),e(nr,pa),e(_e,ma),e(_e,ir),e(ir,va),e(re,_a),e(re,u),e(u,ge),e(ge,dr),e(dr,_t),e(_t,ga),e(ge,Ea),e(ge,cr),e(cr,Ee),e(Ee,hr),e(hr,ba),e(u,wa),e(u,be),e(be,fr),e(fr,gt),e(gt,Sa),e(be,ya),e(be,ur),e(ur,we),e(we,pr),e(pr,$a),e(u,Ta),e(u,Se),e(Se,mr),e(mr,Et),e(Et,Da),e(Se,xa),e(Se,vr),e(vr,ye),e(ye,_r),e(_r,Aa),e(u,Pa),e(u,$e),e($e,gr),e(gr,bt),e(bt,ka),e($e,Ma),e($e,Er),e(Er,Te),e(Te,br),e(br,Na),e(u,Oa),e(u,De),e(De,wr),e(wr,wt),e(wt,Ra),e(De,La),e(De,Sr),e(Sr,xe),e(xe,yr),e(yr,Ia),e(u,qa),e(u,Ae),e(Ae,$r),e($r,St),e(St,Va),e(Ae,Ga),e(Ae,Tr),e(Tr,Pe),e(Pe,Dr),e(Dr,Ha),e(u,Ca),e(u,ke),e(ke,xr),e(xr,yt),e(yt,Fa),e(ke,Wa),e(ke,Ar),e(Ar,Me),e(Me,Pr),e(Pr,Ka),e(u,Ua),e(u,Ne),e(Ne,kr),e(kr,$t),e($t,Ja),e(Ne,za),e(Ne,Mr),e(Mr,Oe),e(Oe,Nr),e(Nr,Ba),e(u,ja),e(u,Re),e(Re,Or),e(Or,Tt),e(Tt,Qa),e(Re,Ya),e(Re,Rr),e(Rr,Le),e(Le,Lr),e(Lr,Xa),e(u,Za),e(u,Ie),e(Ie,Ir),e(Ir,Dt),e(Dt,el),e(Ie,tl),e(Ie,qr),e(qr,qe),e(qe,Vr),e(Vr,rl),e(u,ol),e(u,Ve),e(Ve,Gr),e(Gr,xt),e(xt,sl),e(Ve,al),e(Ve,Hr),e(Hr,Ge),e(Ge,Cr),e(Cr,ll),e(u,nl),e(u,He),e(He,Fr),e(Fr,At),e(At,il),e(He,dl),e(He,Wr),e(Wr,Ce),e(Ce,Kr),e(Kr,cl),e(u,hl),e(u,Fe),e(Fe,Ur),e(Ur,Pt),e(Pt,fl),e(Fe,ul),e(Fe,Jr),e(Jr,We),e(We,zr),e(zr,pl),e(u,ml),e(u,Ke),e(Ke,Br),e(Br,kt),e(kt,vl),e(Ke,_l),e(Ke,jr),e(jr,Ue),e(Ue,Qr),e(Qr,gl),e(u,El),e(u,Je),e(Je,Yr),e(Yr,Mt),e(Mt,bl),e(Je,wl),e(Je,Xr),e(Xr,ze),e(ze,Zr),e(Zr,Sl),e(u,yl),e(u,Be),e(Be,eo),e(eo,Nt),e(Nt,$l),e(Be,Tl),e(Be,to),e(to,je),e(je,ro),e(ro,Dl),e(u,xl),e(u,Qe),e(Qe,oo),e(oo,Ot),e(Ot,Al),e(Qe,Pl),e(Qe,so),e(so,Ye),e(Ye,ao),e(ao,kl),f(a,qo,h),f(a,U,h),e(U,oe),e(oe,lo),T(Xe,lo,null),e(U,Ml),e(U,no),e(no,Nl),f(a,Vo,h),f(a,Rt,h),e(Rt,Ol),f(a,Go,h),f(a,I,h),e(I,Ze),e(Ze,Rl),e(Ze,io),e(io,Ll),e(Ze,Il),e(I,ql),e(I,et),e(et,Vl),e(et,co),e(co,Gl),e(et,Hl),e(I,Cl),e(I,ho),e(ho,Fl),f(a,Ho,h),f(a,se,h),e(se,Wl),e(se,Lt),e(Lt,Kl),e(se,Ul),f(a,Co,h),f(a,J,h),e(J,ae),e(ae,fo),T(tt,fo,null),e(J,Jl),e(J,uo),e(uo,zl),f(a,Fo,h),f(a,E,h),T(rt,E,null),e(E,Bl),e(E,po),e(po,jl),e(E,Ql),e(E,mo),e(mo,Yl),e(E,Xl),e(E,vo),e(vo,q),e(q,_o),e(_o,Zl),e(q,en),e(q,go),e(go,tn),e(q,rn),e(q,Eo),e(Eo,on),e(q,sn),e(E,an),e(E,O),T(ot,O,null),e(O,ln),e(O,bo),e(bo,nn),e(O,dn),T(le,O,null),e(O,cn),T(ne,O,null),e(E,hn),e(E,ie),T(st,ie,null),e(ie,fn),e(ie,z),e(z,un),e(z,wo),e(wo,pn),e(z,mn),e(z,It),e(It,vn),e(z,_n),f(a,Wo,h),f(a,B,h),e(B,de),e(de,So),T(at,So,null),e(B,gn),e(B,yo),e(yo,En),f(a,Ko,h),f(a,j,h),T(lt,j,null),e(j,bn),e(j,$o),e($o,wn),Uo=!0},p(a,[h]){const nt={};h&2&&(nt.$$scope={dirty:h,ctx:a}),le.$set(nt);const To={};h&2&&(To.$$scope={dirty:h,ctx:a}),ne.$set(To)},i(a){Uo||(D(_.$$.fragment,a),D(fe.$$.fragment,a),D(pe.$$.fragment,a),D(me.$$.fragment,a),D(ve.$$.fragment,a),D(Xe.$$.fragment,a),D(tt.$$.fragment,a),D(rt.$$.fragment,a),D(ot.$$.fragment,a),D(le.$$.fragment,a),D(ne.$$.fragment,a),D(st.$$.fragment,a),D(at.$$.fragment,a),D(lt.$$.fragment,a),Uo=!0)},o(a){x(_.$$.fragment,a),x(fe.$$.fragment,a),x(pe.$$.fragment,a),x(me.$$.fragment,a),x(ve.$$.fragment,a),x(Xe.$$.fragment,a),x(tt.$$.fragment,a),x(rt.$$.fragment,a),x(ot.$$.fragment,a),x(le.$$.fragment,a),x(ne.$$.fragment,a),x(st.$$.fragment,a),x(at.$$.fragment,a),x(lt.$$.fragment,a),Uo=!1},d(a){t(m),a&&t(M),a&&t(v),A(_),a&&t(k),a&&t(G),a&&t(Do),a&&t(H),A(fe),a&&t(xo),a&&t(L),a&&t(Ao),a&&t(Y),a&&t(Po),a&&t(F),A(pe),a&&t(ko),a&&t(g),a&&t(Mo),a&&t(W),A(me),a&&t(No),a&&t(mt),a&&t(Oo),a&&t(ee),a&&t(Ro),a&&t(K),A(ve),a&&t(Lo),a&&t(vt),a&&t(Io),a&&t(re),a&&t(qo),a&&t(U),A(Xe),a&&t(Vo),a&&t(Rt),a&&t(Go),a&&t(I),a&&t(Ho),a&&t(se),a&&t(Co),a&&t(J),A(tt),a&&t(Fo),a&&t(E),A(rt),A(ot),A(le),A(ne),A(st),a&&t(Wo),a&&t(B),A(at),a&&t(Ko),a&&t(j),A(lt)}}}const uc={local:"schedulers",sections:[{local:"what-is-a-scheduler",sections:[{local:"discrete-versus-continuous-schedulers",title:"Discrete versus continuous schedulers"}],title:"What is a scheduler?"},{local:"designing-reusable-schedulers",title:"Designing Re-usable schedulers"},{local:"schedulers-summary",title:"Schedulers Summary"},{local:"api",sections:[{local:"diffusers.SchedulerMixin",title:"SchedulerMixin"},{local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",title:"SchedulerOutput"}],title:"API"}],title:"Schedulers"};function pc(dt){return dc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ec extends ac{constructor(m){super();lc(this,m,pc,fc,nc,{})}}export{Ec as default,uc as metadata};
