import{S as zr,i as Hr,s as jr,e as s,k as c,w as g,t as i,M as Ur,c as o,d as r,m as p,a as n,x as v,h as a,b as d,G as e,g as _,y as S,L as Br,q as b,o as E,B as D,v as Gr}from"../../../chunks/vendor-hf-doc-builder.js";import{D as z}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as ar}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Jr(dr){let I,Pe,$,O,he,H,Ke,fe,Qe,Ae,oe,Xe,Ce,x,P,me,j,Ye,_e,Ze,Le,y,et,U,tt,rt,B,st,ot,ke,w,A,ge,G,nt,ve,it,qe,l,J,at,M,dt,R,lt,ct,K,pt,ut,ht,T,ft,Se,mt,_t,be,gt,vt,St,F,bt,Q,Et,Dt,Ee,yt,It,$t,h,ne,xt,wt,De,Mt,Tt,ye,Ft,Ot,Ie,Pt,At,ie,Ct,Lt,ae,kt,qt,de,Nt,Vt,Wt,C,X,zt,$e,Ht,jt,L,Y,Ut,xe,Bt,Gt,k,Z,Jt,we,Rt,Kt,q,ee,Qt,Me,Xt,Yt,N,te,Zt,Te,er,tr,V,re,rr,Fe,sr,or,W,se,nr,Oe,ir,Ne;return H=new ar({}),j=new ar({}),G=new ar({}),J=new z({props:{name:"class diffusers.DEISMultistepScheduler",anchor:"diffusers.DEISMultistepScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"beta_start",val:": float = 0.0001"},{name:"beta_end",val:": float = 0.02"},{name:"beta_schedule",val:": str = 'linear'"},{name:"trained_betas",val:": typing.Optional[numpy.ndarray] = None"},{name:"solver_order",val:": int = 2"},{name:"prediction_type",val:": str = 'epsilon'"},{name:"thresholding",val:": bool = False"},{name:"dynamic_thresholding_ratio",val:": float = 0.995"},{name:"sample_max_value",val:": float = 1.0"},{name:"algorithm_type",val:": str = 'deis'"},{name:"solver_type",val:": str = 'logrho'"},{name:"lower_order_final",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.num_train_timesteps",description:"<strong>num_train_timesteps</strong> (<code>int</code>) &#x2014; number of diffusion steps used to train the model.",name:"num_train_timesteps"},{anchor:"diffusers.DEISMultistepScheduler.beta_start",description:"<strong>beta_start</strong> (<code>float</code>) &#x2014; the starting <code>beta</code> value of inference.",name:"beta_start"},{anchor:"diffusers.DEISMultistepScheduler.beta_end",description:"<strong>beta_end</strong> (<code>float</code>) &#x2014; the final <code>beta</code> value.",name:"beta_end"},{anchor:"diffusers.DEISMultistepScheduler.beta_schedule",description:`<strong>beta_schedule</strong> (<code>str</code>) &#x2014;
the beta schedule, a mapping from a beta range to a sequence of betas for stepping the model. Choose from
<code>linear</code>, <code>scaled_linear</code>, or <code>squaredcos_cap_v2</code>.`,name:"beta_schedule"},{anchor:"diffusers.DEISMultistepScheduler.trained_betas",description:`<strong>trained_betas</strong> (<code>np.ndarray</code>, optional) &#x2014;
option to pass an array of betas directly to the constructor to bypass <code>beta_start</code>, <code>beta_end</code> etc.`,name:"trained_betas"},{anchor:"diffusers.DEISMultistepScheduler.solver_order",description:`<strong>solver_order</strong> (<code>int</code>, default <code>2</code>) &#x2014;
the order of DEIS; can be <code>1</code> or <code>2</code> or <code>3</code>. We recommend to use <code>solver_order=2</code> for guided sampling, and
<code>solver_order=3</code> for unconditional sampling.`,name:"solver_order"},{anchor:"diffusers.DEISMultistepScheduler.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, default <code>epsilon</code>) &#x2014;
indicates whether the model predicts the noise (epsilon), or the data / <code>x0</code>. One of <code>epsilon</code>, <code>sample</code>,
or <code>v-prediction</code>.`,name:"prediction_type"},{anchor:"diffusers.DEISMultistepScheduler.thresholding",description:`<strong>thresholding</strong> (<code>bool</code>, default <code>False</code>) &#x2014;
whether to use the &#x201C;dynamic thresholding&#x201D; method (introduced by Imagen, <a href="https://arxiv.org/abs/2205.11487" rel="nofollow">https://arxiv.org/abs/2205.11487</a>).
Note that the thresholding method is unsuitable for latent-space diffusion models (such as
stable-diffusion).`,name:"thresholding"},{anchor:"diffusers.DEISMultistepScheduler.dynamic_thresholding_ratio",description:`<strong>dynamic_thresholding_ratio</strong> (<code>float</code>, default <code>0.995</code>) &#x2014;
the ratio for the dynamic thresholding method. Default is <code>0.995</code>, the same as Imagen
(<a href="https://arxiv.org/abs/2205.11487" rel="nofollow">https://arxiv.org/abs/2205.11487</a>).`,name:"dynamic_thresholding_ratio"},{anchor:"diffusers.DEISMultistepScheduler.sample_max_value",description:`<strong>sample_max_value</strong> (<code>float</code>, default <code>1.0</code>) &#x2014;
the threshold value for dynamic thresholding. Valid woks when <code>thresholding=True</code>`,name:"sample_max_value"},{anchor:"diffusers.DEISMultistepScheduler.algorithm_type",description:`<strong>algorithm_type</strong> (<code>str</code>, default <code>deis</code>) &#x2014;
the algorithm type for the solver. current we support multistep deis, we will add other variants of DEIS in
the future`,name:"algorithm_type"},{anchor:"diffusers.DEISMultistepScheduler.lower_order_final",description:`<strong>lower_order_final</strong> (<code>bool</code>, default <code>True</code>) &#x2014;
whether to use lower-order solvers in the final steps. Only valid for &lt; 15 inference steps. We empirically
find this trick can stabilize the sampling of DEIS for steps &lt; 15, especially for steps &lt;= 10.`,name:"lower_order_final"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L57"}}),X=new z({props:{name:"convert_model_output",anchor:"diffusers.DEISMultistepScheduler.convert_model_output",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.convert_model_output.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.DEISMultistepScheduler.convert_model_output.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.convert_model_output.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L196",returnDescription:`
<p>the converted model output.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),Y=new z({props:{name:"deis_first_order_update",anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"prev_timestep",val:": int"},{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.prev_timestep",description:"<strong>prev_timestep</strong> (<code>int</code>) &#x2014; previous discrete timestep in the diffusion chain.",name:"prev_timestep"},{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L246",returnDescription:`
<p>the sample tensor at the previous timestep.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),Z=new z({props:{name:"multistep_deis_second_order_update",anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update",parameters:[{name:"model_output_list",val:": typing.List[torch.FloatTensor]"},{name:"timestep_list",val:": typing.List[int]"},{name:"prev_timestep",val:": int"},{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update.model_output_list",description:`<strong>model_output_list</strong> (<code>List[torch.FloatTensor]</code>) &#x2014;
direct outputs from learned diffusion model at current and latter timesteps.`,name:"model_output_list"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current and latter discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update.prev_timestep",description:"<strong>prev_timestep</strong> (<code>int</code>) &#x2014; previous discrete timestep in the diffusion chain.",name:"prev_timestep"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L276",returnDescription:`
<p>the sample tensor at the previous timestep.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),ee=new z({props:{name:"multistep_deis_third_order_update",anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update",parameters:[{name:"model_output_list",val:": typing.List[torch.FloatTensor]"},{name:"timestep_list",val:": typing.List[int]"},{name:"prev_timestep",val:": int"},{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update.model_output_list",description:`<strong>model_output_list</strong> (<code>List[torch.FloatTensor]</code>) &#x2014;
direct outputs from learned diffusion model at current and latter timesteps.`,name:"model_output_list"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current and latter discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update.prev_timestep",description:"<strong>prev_timestep</strong> (<code>int</code>) &#x2014; previous discrete timestep in the diffusion chain.",name:"prev_timestep"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L318",returnDescription:`
<p>the sample tensor at the previous timestep.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),te=new z({props:{name:"scale_model_input",anchor:"diffusers.DEISMultistepScheduler.scale_model_input",parameters:[{name:"sample",val:": FloatTensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.scale_model_input.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; input sample",name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L443",returnDescription:`
<p>scaled input sample</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),re=new z({props:{name:"set_timesteps",anchor:"diffusers.DEISMultistepScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"device",val:": typing.Union[str, torch.device] = None"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.set_timesteps.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>) &#x2014;
the number of diffusion steps used when generating samples with a pre-trained model.`,name:"num_inference_steps"},{anchor:"diffusers.DEISMultistepScheduler.set_timesteps.device",description:`<strong>device</strong> (<code>str</code> or <code>torch.device</code>, optional) &#x2014;
the device to which the timesteps should be moved to. If <code>None</code>, the timesteps are not moved.`,name:"device"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L173"}}),se=new z({props:{name:"step",anchor:"diffusers.DEISMultistepScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.step.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.DEISMultistepScheduler.step.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"},{anchor:"diffusers.DEISMultistepScheduler.step.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>) &#x2014; option for returning tuple rather than SchedulerOutput class",name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L375",returnDescription:`
<p><code>~scheduling_utils.SchedulerOutput</code> if <code>return_dict</code> is
True, otherwise a <code>tuple</code>. When returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><code>~scheduling_utils.SchedulerOutput</code> or <code>tuple</code></p>
`}}),{c(){I=s("meta"),Pe=c(),$=s("h1"),O=s("a"),he=s("span"),g(H.$$.fragment),Ke=c(),fe=s("span"),Qe=i("DEIS"),Ae=c(),oe=s("p"),Xe=i("Fast Sampling of Diffusion Models with Exponential Integrator."),Ce=c(),x=s("h2"),P=s("a"),me=s("span"),g(j.$$.fragment),Ye=c(),_e=s("span"),Ze=i("Overview"),Le=c(),y=s("p"),et=i("Original paper can be found "),U=s("a"),tt=i("here"),rt=i(". The original implementation can be found "),B=s("a"),st=i("here"),ot=i("."),ke=c(),w=s("h2"),A=s("a"),ge=s("span"),g(G.$$.fragment),nt=c(),ve=s("span"),it=i("DEISMultistepScheduler"),qe=c(),l=s("div"),g(J.$$.fragment),at=c(),M=s("p"),dt=i("DEIS ("),R=s("a"),lt=i("https://arxiv.org/abs/2204.13902"),ct=i(`) is a fast high order solver for diffusion ODEs. We slightly modify the
polynomial fitting formula in log-rho space instead of the original linear t space in DEIS paper. The modification
enjoys closed-form coefficients for exponential multistep update instead of replying on the numerical solver. More
variants of DEIS can be found in `),K=s("a"),pt=i("https://github.com/qsh-zh/deis"),ut=i("."),ht=c(),T=s("p"),ft=i("Currently, we support the log-rho multistep DEIS. We recommend to use "),Se=s("code"),mt=i("solver_order=2 / 3"),_t=i(" while "),be=s("code"),gt=i("solver_order=1"),vt=i(`
reduces to DDIM.`),St=c(),F=s("p"),bt=i("We also support the \u201Cdynamic thresholding\u201D method in Imagen ("),Q=s("a"),Et=i("https://arxiv.org/abs/2205.11487"),Dt=i(`). For pixel-space
diffusion models, you can set `),Ee=s("code"),yt=i("thresholding=True"),It=i(" to use the dynamic thresholding."),$t=c(),h=s("p"),ne=s("a"),xt=i("~ConfigMixin"),wt=i(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),De=s("code"),Mt=i("__init__"),Tt=i(`
function, such as `),ye=s("code"),Ft=i("num_train_timesteps"),Ot=i(". They can be accessed via "),Ie=s("code"),Pt=i("scheduler.config.num_train_timesteps"),At=i(`.
`),ie=s("a"),Ct=i("SchedulerMixin"),Lt=i(" provides general loading and saving functionality via the "),ae=s("a"),kt=i("SchedulerMixin.save_pretrained()"),qt=i(` and
`),de=s("a"),Nt=i("from_pretrained()"),Vt=i(" functions."),Wt=c(),C=s("div"),g(X.$$.fragment),zt=c(),$e=s("p"),Ht=i("Convert the model output to the corresponding type that the algorithm DEIS needs."),jt=c(),L=s("div"),g(Y.$$.fragment),Ut=c(),xe=s("p"),Bt=i("One step for the first-order DEIS (equivalent to DDIM)."),Gt=c(),k=s("div"),g(Z.$$.fragment),Jt=c(),we=s("p"),Rt=i("One step for the second-order multistep DEIS."),Kt=c(),q=s("div"),g(ee.$$.fragment),Qt=c(),Me=s("p"),Xt=i("One step for the third-order multistep DEIS."),Yt=c(),N=s("div"),g(te.$$.fragment),Zt=c(),Te=s("p"),er=i(`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`),tr=c(),V=s("div"),g(re.$$.fragment),rr=c(),Fe=s("p"),sr=i("Sets the timesteps used for the diffusion chain. Supporting function to be run before inference."),or=c(),W=s("div"),g(se.$$.fragment),nr=c(),Oe=s("p"),ir=i("Step function propagating the sample with the multistep DEIS."),this.h()},l(t){const f=Ur('[data-svelte="svelte-1phssyn"]',document.head);I=o(f,"META",{name:!0,content:!0}),f.forEach(r),Pe=p(t),$=o(t,"H1",{class:!0});var Ve=n($);O=o(Ve,"A",{id:!0,class:!0,href:!0});var lr=n(O);he=o(lr,"SPAN",{});var cr=n(he);v(H.$$.fragment,cr),cr.forEach(r),lr.forEach(r),Ke=p(Ve),fe=o(Ve,"SPAN",{});var pr=n(fe);Qe=a(pr,"DEIS"),pr.forEach(r),Ve.forEach(r),Ae=p(t),oe=o(t,"P",{});var ur=n(oe);Xe=a(ur,"Fast Sampling of Diffusion Models with Exponential Integrator."),ur.forEach(r),Ce=p(t),x=o(t,"H2",{class:!0});var We=n(x);P=o(We,"A",{id:!0,class:!0,href:!0});var hr=n(P);me=o(hr,"SPAN",{});var fr=n(me);v(j.$$.fragment,fr),fr.forEach(r),hr.forEach(r),Ye=p(We),_e=o(We,"SPAN",{});var mr=n(_e);Ze=a(mr,"Overview"),mr.forEach(r),We.forEach(r),Le=p(t),y=o(t,"P",{});var le=n(y);et=a(le,"Original paper can be found "),U=o(le,"A",{href:!0,rel:!0});var _r=n(U);tt=a(_r,"here"),_r.forEach(r),rt=a(le,". The original implementation can be found "),B=o(le,"A",{href:!0,rel:!0});var gr=n(B);st=a(gr,"here"),gr.forEach(r),ot=a(le,"."),le.forEach(r),ke=p(t),w=o(t,"H2",{class:!0});var ze=n(w);A=o(ze,"A",{id:!0,class:!0,href:!0});var vr=n(A);ge=o(vr,"SPAN",{});var Sr=n(ge);v(G.$$.fragment,Sr),Sr.forEach(r),vr.forEach(r),nt=p(ze),ve=o(ze,"SPAN",{});var br=n(ve);it=a(br,"DEISMultistepScheduler"),br.forEach(r),ze.forEach(r),qe=p(t),l=o(t,"DIV",{class:!0});var u=n(l);v(J.$$.fragment,u),at=p(u),M=o(u,"P",{});var ce=n(M);dt=a(ce,"DEIS ("),R=o(ce,"A",{href:!0,rel:!0});var Er=n(R);lt=a(Er,"https://arxiv.org/abs/2204.13902"),Er.forEach(r),ct=a(ce,`) is a fast high order solver for diffusion ODEs. We slightly modify the
polynomial fitting formula in log-rho space instead of the original linear t space in DEIS paper. The modification
enjoys closed-form coefficients for exponential multistep update instead of replying on the numerical solver. More
variants of DEIS can be found in `),K=o(ce,"A",{href:!0,rel:!0});var Dr=n(K);pt=a(Dr,"https://github.com/qsh-zh/deis"),Dr.forEach(r),ut=a(ce,"."),ce.forEach(r),ht=p(u),T=o(u,"P",{});var pe=n(T);ft=a(pe,"Currently, we support the log-rho multistep DEIS. We recommend to use "),Se=o(pe,"CODE",{});var yr=n(Se);mt=a(yr,"solver_order=2 / 3"),yr.forEach(r),_t=a(pe," while "),be=o(pe,"CODE",{});var Ir=n(be);gt=a(Ir,"solver_order=1"),Ir.forEach(r),vt=a(pe,`
reduces to DDIM.`),pe.forEach(r),St=p(u),F=o(u,"P",{});var ue=n(F);bt=a(ue,"We also support the \u201Cdynamic thresholding\u201D method in Imagen ("),Q=o(ue,"A",{href:!0,rel:!0});var $r=n(Q);Et=a($r,"https://arxiv.org/abs/2205.11487"),$r.forEach(r),Dt=a(ue,`). For pixel-space
diffusion models, you can set `),Ee=o(ue,"CODE",{});var xr=n(Ee);yt=a(xr,"thresholding=True"),xr.forEach(r),It=a(ue," to use the dynamic thresholding."),ue.forEach(r),$t=p(u),h=o(u,"P",{});var m=n(h);ne=o(m,"A",{href:!0});var wr=n(ne);xt=a(wr,"~ConfigMixin"),wr.forEach(r),wt=a(m," takes care of storing all config attributes that are passed in the scheduler\u2019s "),De=o(m,"CODE",{});var Mr=n(De);Mt=a(Mr,"__init__"),Mr.forEach(r),Tt=a(m,`
function, such as `),ye=o(m,"CODE",{});var Tr=n(ye);Ft=a(Tr,"num_train_timesteps"),Tr.forEach(r),Ot=a(m,". They can be accessed via "),Ie=o(m,"CODE",{});var Fr=n(Ie);Pt=a(Fr,"scheduler.config.num_train_timesteps"),Fr.forEach(r),At=a(m,`.
`),ie=o(m,"A",{href:!0});var Or=n(ie);Ct=a(Or,"SchedulerMixin"),Or.forEach(r),Lt=a(m," provides general loading and saving functionality via the "),ae=o(m,"A",{href:!0});var Pr=n(ae);kt=a(Pr,"SchedulerMixin.save_pretrained()"),Pr.forEach(r),qt=a(m,` and
`),de=o(m,"A",{href:!0});var Ar=n(de);Nt=a(Ar,"from_pretrained()"),Ar.forEach(r),Vt=a(m," functions."),m.forEach(r),Wt=p(u),C=o(u,"DIV",{class:!0});var He=n(C);v(X.$$.fragment,He),zt=p(He),$e=o(He,"P",{});var Cr=n($e);Ht=a(Cr,"Convert the model output to the corresponding type that the algorithm DEIS needs."),Cr.forEach(r),He.forEach(r),jt=p(u),L=o(u,"DIV",{class:!0});var je=n(L);v(Y.$$.fragment,je),Ut=p(je),xe=o(je,"P",{});var Lr=n(xe);Bt=a(Lr,"One step for the first-order DEIS (equivalent to DDIM)."),Lr.forEach(r),je.forEach(r),Gt=p(u),k=o(u,"DIV",{class:!0});var Ue=n(k);v(Z.$$.fragment,Ue),Jt=p(Ue),we=o(Ue,"P",{});var kr=n(we);Rt=a(kr,"One step for the second-order multistep DEIS."),kr.forEach(r),Ue.forEach(r),Kt=p(u),q=o(u,"DIV",{class:!0});var Be=n(q);v(ee.$$.fragment,Be),Qt=p(Be),Me=o(Be,"P",{});var qr=n(Me);Xt=a(qr,"One step for the third-order multistep DEIS."),qr.forEach(r),Be.forEach(r),Yt=p(u),N=o(u,"DIV",{class:!0});var Ge=n(N);v(te.$$.fragment,Ge),Zt=p(Ge),Te=o(Ge,"P",{});var Nr=n(Te);er=a(Nr,`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`),Nr.forEach(r),Ge.forEach(r),tr=p(u),V=o(u,"DIV",{class:!0});var Je=n(V);v(re.$$.fragment,Je),rr=p(Je),Fe=o(Je,"P",{});var Vr=n(Fe);sr=a(Vr,"Sets the timesteps used for the diffusion chain. Supporting function to be run before inference."),Vr.forEach(r),Je.forEach(r),or=p(u),W=o(u,"DIV",{class:!0});var Re=n(W);v(se.$$.fragment,Re),nr=p(Re),Oe=o(Re,"P",{});var Wr=n(Oe);ir=a(Wr,"Step function propagating the sample with the multistep DEIS."),Wr.forEach(r),Re.forEach(r),u.forEach(r),this.h()},h(){d(I,"name","hf:doc:metadata"),d(I,"content",JSON.stringify(Rr)),d(O,"id","deis"),d(O,"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"),d(O,"href","#deis"),d($,"class","relative group"),d(P,"id","overview"),d(P,"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"),d(P,"href","#overview"),d(x,"class","relative group"),d(U,"href","https://arxiv.org/abs/2204.13902"),d(U,"rel","nofollow"),d(B,"href","https://github.com/qsh-zh/deis"),d(B,"rel","nofollow"),d(A,"id","diffusers.DEISMultistepScheduler"),d(A,"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"),d(A,"href","#diffusers.DEISMultistepScheduler"),d(w,"class","relative group"),d(R,"href","https://arxiv.org/abs/2204.13902"),d(R,"rel","nofollow"),d(K,"href","https://github.com/qsh-zh/deis"),d(K,"rel","nofollow"),d(Q,"href","https://arxiv.org/abs/2205.11487"),d(Q,"rel","nofollow"),d(ne,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin"),d(ie,"href","/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin"),d(ae,"href","/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin.save_pretrained"),d(de,"href","/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin.from_pretrained"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,f){e(document.head,I),_(t,Pe,f),_(t,$,f),e($,O),e(O,he),S(H,he,null),e($,Ke),e($,fe),e(fe,Qe),_(t,Ae,f),_(t,oe,f),e(oe,Xe),_(t,Ce,f),_(t,x,f),e(x,P),e(P,me),S(j,me,null),e(x,Ye),e(x,_e),e(_e,Ze),_(t,Le,f),_(t,y,f),e(y,et),e(y,U),e(U,tt),e(y,rt),e(y,B),e(B,st),e(y,ot),_(t,ke,f),_(t,w,f),e(w,A),e(A,ge),S(G,ge,null),e(w,nt),e(w,ve),e(ve,it),_(t,qe,f),_(t,l,f),S(J,l,null),e(l,at),e(l,M),e(M,dt),e(M,R),e(R,lt),e(M,ct),e(M,K),e(K,pt),e(M,ut),e(l,ht),e(l,T),e(T,ft),e(T,Se),e(Se,mt),e(T,_t),e(T,be),e(be,gt),e(T,vt),e(l,St),e(l,F),e(F,bt),e(F,Q),e(Q,Et),e(F,Dt),e(F,Ee),e(Ee,yt),e(F,It),e(l,$t),e(l,h),e(h,ne),e(ne,xt),e(h,wt),e(h,De),e(De,Mt),e(h,Tt),e(h,ye),e(ye,Ft),e(h,Ot),e(h,Ie),e(Ie,Pt),e(h,At),e(h,ie),e(ie,Ct),e(h,Lt),e(h,ae),e(ae,kt),e(h,qt),e(h,de),e(de,Nt),e(h,Vt),e(l,Wt),e(l,C),S(X,C,null),e(C,zt),e(C,$e),e($e,Ht),e(l,jt),e(l,L),S(Y,L,null),e(L,Ut),e(L,xe),e(xe,Bt),e(l,Gt),e(l,k),S(Z,k,null),e(k,Jt),e(k,we),e(we,Rt),e(l,Kt),e(l,q),S(ee,q,null),e(q,Qt),e(q,Me),e(Me,Xt),e(l,Yt),e(l,N),S(te,N,null),e(N,Zt),e(N,Te),e(Te,er),e(l,tr),e(l,V),S(re,V,null),e(V,rr),e(V,Fe),e(Fe,sr),e(l,or),e(l,W),S(se,W,null),e(W,nr),e(W,Oe),e(Oe,ir),Ne=!0},p:Br,i(t){Ne||(b(H.$$.fragment,t),b(j.$$.fragment,t),b(G.$$.fragment,t),b(J.$$.fragment,t),b(X.$$.fragment,t),b(Y.$$.fragment,t),b(Z.$$.fragment,t),b(ee.$$.fragment,t),b(te.$$.fragment,t),b(re.$$.fragment,t),b(se.$$.fragment,t),Ne=!0)},o(t){E(H.$$.fragment,t),E(j.$$.fragment,t),E(G.$$.fragment,t),E(J.$$.fragment,t),E(X.$$.fragment,t),E(Y.$$.fragment,t),E(Z.$$.fragment,t),E(ee.$$.fragment,t),E(te.$$.fragment,t),E(re.$$.fragment,t),E(se.$$.fragment,t),Ne=!1},d(t){r(I),t&&r(Pe),t&&r($),D(H),t&&r(Ae),t&&r(oe),t&&r(Ce),t&&r(x),D(j),t&&r(Le),t&&r(y),t&&r(ke),t&&r(w),D(G),t&&r(qe),t&&r(l),D(J),D(X),D(Y),D(Z),D(ee),D(te),D(re),D(se)}}}const Rr={local:"deis",sections:[{local:"overview",title:"Overview"},{local:"diffusers.DEISMultistepScheduler",title:"DEISMultistepScheduler"}],title:"DEIS"};function Kr(dr){return Gr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zr extends zr{constructor(I){super();Hr(this,I,Kr,Jr,jr,{})}}export{Zr as default,Rr as metadata};
