import{S as Gm,i as Ym,s as zm,e as s,k as l,w as p,t as a,M as Jm,c as o,d as r,m as c,a as n,x as h,h as i,b as d,G as e,g as u,y as m,q as g,o as _,B as v,v as jm}from"../../chunks/vendor-hf-doc-builder.js";import{T as Qm}from"../../chunks/Tip-hf-doc-builder.js";import{D as b}from"../../chunks/Docstring-hf-doc-builder.js";import{I as Y}from"../../chunks/IconCopyLink-hf-doc-builder.js";function Xm(cn){let N,Ee;return{c(){N=s("p"),Ee=a("Score SDE-VP is under construction.")},l(F){N=o(F,"P",{});var J=n(N);Ee=i(J,"Score SDE-VP is under construction."),J.forEach(r)},m(F,J){u(F,N,J),e(N,Ee)},d(F){F&&r(N)}}}function Zm(cn){let N,Ee,F,J,_s,pt,Ua,vs,Ba,fn,Dr,Ga,un,ne,xe,bs,ht,Ya,Ss,za,pn,ye,Ja,$s,ja,Qa,hn,we,Er,Xa,mt,Ds,Za,ei,Es,ti,ri,ae,si,xs,oi,ni,ys,ai,ii,mn,ie,Me,ws,gt,di,Ms,li,gn,E,ci,Ps,fi,ui,xr,pi,hi,yr,mi,gi,Ts,_i,vi,wr,bi,Si,Os,$i,Di,_n,de,Pe,ks,_t,Ei,Cs,xi,vn,Mr,yi,bn,Te,Vs,wi,Mi,As,Pi,Sn,le,Oe,Ns,vt,Ti,Ls,Oi,$n,Pr,ki,Dn,ee,bt,Ci,Is,Vi,Ai,Ni,St,Li,Fs,Ii,Fi,Ki,Ks,qi,En,ke,Hi,Tr,Ri,Wi,xn,ce,Ce,qs,$t,Ui,Hs,Bi,yn,fe,Dt,Gi,Rs,Yi,wn,ue,Ve,Ws,Et,zi,Us,Ji,Mn,pe,xt,ji,Bs,Qi,Pn,he,Ae,Gs,yt,Xi,Ys,Zi,Tn,me,Ne,zs,wt,ed,Js,td,On,Or,rd,kn,C,Mt,sd,js,od,nd,x,kr,ad,id,Qs,dd,ld,Xs,cd,fd,Zs,ud,pd,Cr,hd,md,Vr,gd,_d,Ar,vd,bd,Sd,Nr,$d,Pt,Dd,Ed,Le,Tt,xd,eo,yd,wd,Ie,Ot,Md,to,Pd,Cn,ge,Fe,ro,kt,Td,so,Od,Vn,Ke,kd,Ct,Cd,Vd,An,V,Vt,Ad,oo,Nd,Ld,y,Lr,Id,Fd,no,Kd,qd,ao,Hd,Rd,io,Wd,Ud,Ir,Bd,Gd,Fr,Yd,zd,Kr,Jd,jd,Qd,qr,Xd,At,Zd,el,qe,Nt,tl,lo,rl,sl,He,Lt,ol,co,nl,Nn,_e,Re,fo,It,al,uo,il,Ln,We,dl,Ft,ll,cl,In,S,Kt,fl,po,ul,pl,Ue,hl,qt,ml,gl,Ht,_l,vl,w,Hr,bl,Sl,ho,$l,Dl,mo,El,xl,go,yl,wl,Rr,Ml,Pl,Wr,Tl,Ol,Ur,kl,Cl,Vl,Rt,Al,Wt,Nl,Ll,Il,te,Ut,Fl,_o,Kl,ql,vo,Hl,Rl,Be,Bt,Wl,bo,Ul,Bl,Ge,Gt,Gl,So,Yl,zl,Ye,Yt,Jl,$o,jl,Fn,ve,ze,Do,zt,Ql,Eo,Xl,Kn,Je,Zl,Jt,ec,tc,qn,A,jt,rc,Br,sc,Qt,oc,nc,M,Gr,ac,ic,xo,dc,lc,yo,cc,fc,wo,uc,pc,Yr,hc,mc,zr,gc,_c,Jr,vc,bc,Sc,je,Xt,$c,Mo,Dc,Ec,Qe,Zt,xc,Po,yc,wc,Xe,er,Mc,To,Pc,Hn,be,Ze,Oo,tr,Tc,ko,Oc,Rn,et,kc,rr,Cc,Vc,Wn,$,sr,Ac,Co,Nc,Lc,P,jr,Ic,Fc,Vo,Kc,qc,Ao,Hc,Rc,No,Wc,Uc,Qr,Bc,Gc,Xr,Yc,zc,Zr,Jc,jc,Qc,es,Xc,or,Zc,ef,tt,nr,tf,Lo,rf,sf,re,ar,of,Io,nf,af,Z,df,Fo,lf,cf,Ko,ff,uf,qo,pf,hf,mf,rt,ir,gf,Ho,_f,vf,st,dr,bf,Ro,Sf,Un,Se,ot,Wo,lr,$f,Uo,Df,Bn,nt,Ef,cr,xf,yf,Gn,D,fr,wf,Bo,Mf,Pf,ts,Tf,ur,Of,kf,T,rs,Cf,Vf,Go,Af,Nf,Yo,Lf,If,zo,Ff,Kf,ss,qf,Hf,os,Rf,Wf,ns,Uf,Bf,Gf,se,pr,Yf,Jo,zf,Jf,$e,jf,jo,Qf,Xf,Qo,Zf,eu,tu,at,hr,ru,Xo,su,ou,it,mr,nu,Zo,au,iu,dt,gr,du,en,lu,Yn,De,lt,tn,_r,cu,rn,fu,zn,ct,uu,vr,pu,hu,Jn,ft,jn,K,br,mu,sn,gu,_u,O,as,vu,bu,on,Su,$u,nn,Du,Eu,an,xu,yu,is,wu,Mu,ds,Pu,Tu,ls,Ou,ku,Cu,cs,Vu,Sr,Au,Nu,dn,Lu,Qn;return pt=new Y({}),ht=new Y({}),gt=new Y({}),_t=new Y({}),vt=new Y({}),$t=new Y({}),Dt=new b({props:{name:"class diffusers.SchedulerMixin",anchor:"diffusers.SchedulerMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_utils.py#L38"}}),Et=new Y({}),xt=new b({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/vr_649/src/diffusers/schedulers/scheduling_utils.py#L25"}}),yt=new Y({}),wt=new Y({}),Mt=new b({props:{name:"class diffusers.DDIMScheduler",anchor:"diffusers.DDIMScheduler",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:"clip_sample",val:": bool = True"},{name:"set_alpha_to_one",val:": bool = True"},{name:"steps_offset",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.DDIMScheduler.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.DDIMScheduler.beta_start",description:"<strong>beta_start</strong> (<code>float</code>) &#x2014; the starting <code>beta</code> value of inference.",name:"beta_start"},{anchor:"diffusers.DDIMScheduler.beta_end",description:"<strong>beta_end</strong> (<code>float</code>) &#x2014; the final <code>beta</code> value.",name:"beta_end"},{anchor:"diffusers.DDIMScheduler.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.DDIMScheduler.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.DDIMScheduler.clip_sample",description:`<strong>clip_sample</strong> (<code>bool</code>, default <code>True</code>) &#x2014;
option to clip predicted sample between -1 and 1 for numerical stability.`,name:"clip_sample"},{anchor:"diffusers.DDIMScheduler.set_alpha_to_one",description:`<strong>set_alpha_to_one</strong> (<code>bool</code>, default <code>True</code>) &#x2014;
each diffusion step uses the value of alphas product at that step and at the previous one. For the final
step there is no previous alpha. When this option is <code>True</code> the previous alpha product is fixed to <code>1</code>,
otherwise it uses the value of alpha at step 0.`,name:"set_alpha_to_one"},{anchor:"diffusers.DDIMScheduler.steps_offset",description:`<strong>steps_offset</strong> (<code>int</code>, default <code>0</code>) &#x2014;
an offset added to the inference steps. You can use a combination of <code>offset=1</code> and
<code>set_alpha_to_one=False</code>, to make the last step use step 0 for the previous alpha product, as done in
stable diffusion.`,name:"steps_offset"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_ddim.py#L78"}}),Tt=new b({props:{name:"set_timesteps",anchor:"diffusers.DDIMScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DDIMScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_ddim.py#L162"}}),Ot=new b({props:{name:"step",anchor:"diffusers.DDIMScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"eta",val:": float = 0.0"},{name:"use_clipped_model_output",val:": bool = False"},{name:"generator",val:" = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DDIMScheduler.step.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.DDIMScheduler.step.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DDIMScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"},{anchor:"diffusers.DDIMScheduler.step.eta",description:"<strong>eta</strong> (<code>float</code>) &#x2014; weight of noise for added noise in diffusion step.",name:"eta"},{anchor:"diffusers.DDIMScheduler.step.use_clipped_model_output",description:`<strong>use_clipped_model_output</strong> (<code>bool</code>) &#x2014; TODO
generator &#x2014; random number generator.`,name:"use_clipped_model_output"},{anchor:"diffusers.DDIMScheduler.step.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>) &#x2014; option for returning tuple rather than DDIMSchedulerOutput class",name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_ddim.py#L189",returnDescription:`
<p><code>DDIMSchedulerOutput</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>DDIMSchedulerOutput</code> or <code>tuple</code></p>
`}}),kt=new Y({}),Vt=new b({props:{name:"class diffusers.DDPMScheduler",anchor:"diffusers.DDPMScheduler",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:"variance_type",val:": str = 'fixed_small'"},{name:"clip_sample",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DDPMScheduler.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.DDPMScheduler.beta_start",description:"<strong>beta_start</strong> (<code>float</code>) &#x2014; the starting <code>beta</code> value of inference.",name:"beta_start"},{anchor:"diffusers.DDPMScheduler.beta_end",description:"<strong>beta_end</strong> (<code>float</code>) &#x2014; the final <code>beta</code> value.",name:"beta_end"},{anchor:"diffusers.DDPMScheduler.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.DDPMScheduler.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.DDPMScheduler.variance_type",description:`<strong>variance_type</strong> (<code>str</code>) &#x2014;
options to clip the variance used when adding noise to the denoised sample. Choose from <code>fixed_small</code>,
<code>fixed_small_log</code>, <code>fixed_large</code>, <code>fixed_large_log</code>, <code>learned</code> or <code>learned_range</code>.`,name:"variance_type"},{anchor:"diffusers.DDPMScheduler.clip_sample",description:`<strong>clip_sample</strong> (<code>bool</code>, default <code>True</code>) &#x2014;
option to clip predicted sample between -1 and 1 for numerical stability.`,name:"clip_sample"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_ddpm.py#L76"}}),Nt=new b({props:{name:"set_timesteps",anchor:"diffusers.DDPMScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"}],parametersDescription:[{anchor:"diffusers.DDPMScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_ddpm.py#L141"}}),Lt=new b({props:{name:"step",anchor:"diffusers.DDPMScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"predict_epsilon",val:" = True"},{name:"generator",val:" = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DDPMScheduler.step.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.DDPMScheduler.step.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.DDPMScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"},{anchor:"diffusers.DDPMScheduler.step.predict_epsilon",description:`<strong>predict_epsilon</strong> (<code>bool</code>) &#x2014;
optional flag to use when model predicts the samples directly instead of the noise, epsilon.
generator &#x2014; random number generator.`,name:"predict_epsilon"},{anchor:"diffusers.DDPMScheduler.step.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>) &#x2014; option for returning tuple rather than DDPMSchedulerOutput class",name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_ddpm.py#L188",returnDescription:`
<p><code>DDPMSchedulerOutput</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>DDPMSchedulerOutput</code> or <code>tuple</code></p>
`}}),It=new Y({}),Kt=new b({props:{name:"class diffusers.KarrasVeScheduler",anchor:"diffusers.KarrasVeScheduler",parameters:[{name:"sigma_min",val:": float = 0.02"},{name:"sigma_max",val:": float = 100"},{name:"s_noise",val:": float = 1.007"},{name:"s_churn",val:": float = 80"},{name:"s_min",val:": float = 0.05"},{name:"s_max",val:": float = 50"}],parametersDescription:[{anchor:"diffusers.KarrasVeScheduler.sigma_min",description:"<strong>sigma_min</strong> (<code>float</code>) &#x2014; minimum noise magnitude",name:"sigma_min"},{anchor:"diffusers.KarrasVeScheduler.sigma_max",description:"<strong>sigma_max</strong> (<code>float</code>) &#x2014; maximum noise magnitude",name:"sigma_max"},{anchor:"diffusers.KarrasVeScheduler.s_noise",description:`<strong>s_noise</strong> (<code>float</code>) &#x2014; the amount of additional noise to counteract loss of detail during sampling.
A reasonable range is [1.000, 1.011].`,name:"s_noise"},{anchor:"diffusers.KarrasVeScheduler.s_churn",description:`<strong>s_churn</strong> (<code>float</code>) &#x2014; the parameter controlling the overall amount of stochasticity.
A reasonable range is [0, 100].`,name:"s_churn"},{anchor:"diffusers.KarrasVeScheduler.s_min",description:`<strong>s_min</strong> (<code>float</code>) &#x2014; the start value of the sigma range where we add noise (enable stochasticity).
A reasonable range is [0, 10].`,name:"s_min"},{anchor:"diffusers.KarrasVeScheduler.s_max",description:`<strong>s_max</strong> (<code>float</code>) &#x2014; the end value of the sigma range where we add noise.
A reasonable range is [0.2, 80].`,name:"s_max"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_karras_ve.py#L48"}}),Ut=new b({props:{name:"add_noise_to_input",anchor:"diffusers.KarrasVeScheduler.add_noise_to_input",parameters:[{name:"sample",val:": FloatTensor"},{name:"sigma",val:": float"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_karras_ve.py#L115"}}),Bt=new b({props:{name:"set_timesteps",anchor:"diffusers.KarrasVeScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"}],parametersDescription:[{anchor:"diffusers.KarrasVeScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_karras_ve.py#L95"}}),Gt=new b({props:{name:"step",anchor:"diffusers.KarrasVeScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"sigma_hat",val:": float"},{name:"sigma_prev",val:": float"},{name:"sample_hat",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.KarrasVeScheduler.step.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.KarrasVeScheduler.step.sigma_hat",description:"<strong>sigma_hat</strong> (<code>float</code>) &#x2014; TODO",name:"sigma_hat"},{anchor:"diffusers.KarrasVeScheduler.step.sigma_prev",description:"<strong>sigma_prev</strong> (<code>float</code>) &#x2014; TODO",name:"sigma_prev"},{anchor:"diffusers.KarrasVeScheduler.step.sample_hat",description:"<strong>sample_hat</strong> (<code>torch.FloatTensor</code>) &#x2014; TODO",name:"sample_hat"},{anchor:"diffusers.KarrasVeScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>) &#x2014; option for returning tuple rather than KarrasVeOutput class</p>
<p>KarrasVeOutput &#x2014; updated sample in the diffusion chain and derivative (TODO double check).`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_karras_ve.py#L136",returnDescription:`
<p><code>KarrasVeOutput</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>KarrasVeOutput</code> or <code>tuple</code></p>
`}}),Yt=new b({props:{name:"step_correct",anchor:"diffusers.KarrasVeScheduler.step_correct",parameters:[{name:"model_output",val:": FloatTensor"},{name:"sigma_hat",val:": float"},{name:"sigma_prev",val:": float"},{name:"sample_hat",val:": FloatTensor"},{name:"sample_prev",val:": FloatTensor"},{name:"derivative",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.KarrasVeScheduler.step_correct.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.KarrasVeScheduler.step_correct.sigma_hat",description:"<strong>sigma_hat</strong> (<code>float</code>) &#x2014; TODO",name:"sigma_hat"},{anchor:"diffusers.KarrasVeScheduler.step_correct.sigma_prev",description:"<strong>sigma_prev</strong> (<code>float</code>) &#x2014; TODO",name:"sigma_prev"},{anchor:"diffusers.KarrasVeScheduler.step_correct.sample_hat",description:"<strong>sample_hat</strong> (<code>torch.FloatTensor</code>) &#x2014; TODO",name:"sample_hat"},{anchor:"diffusers.KarrasVeScheduler.step_correct.sample_prev",description:"<strong>sample_prev</strong> (<code>torch.FloatTensor</code>) &#x2014; TODO",name:"sample_prev"},{anchor:"diffusers.KarrasVeScheduler.step_correct.derivative",description:"<strong>derivative</strong> (<code>torch.FloatTensor</code>) &#x2014; TODO",name:"derivative"},{anchor:"diffusers.KarrasVeScheduler.step_correct.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>) &#x2014; option for returning tuple rather than KarrasVeOutput class",name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_karras_ve.py#L174",returnDescription:`
<p>updated sample in the diffusion chain. derivative (TODO): TODO</p>
`,returnType:`
<p>prev_sample (TODO)</p>
`}}),zt=new Y({}),jt=new b({props:{name:"class diffusers.LMSDiscreteScheduler",anchor:"diffusers.LMSDiscreteScheduler",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"}],parametersDescription:[{anchor:"diffusers.LMSDiscreteScheduler.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.LMSDiscreteScheduler.beta_start",description:"<strong>beta_start</strong> (<code>float</code>) &#x2014; the starting <code>beta</code> value of inference.",name:"beta_start"},{anchor:"diffusers.LMSDiscreteScheduler.beta_end",description:"<strong>beta_end</strong> (<code>float</code>) &#x2014; the final <code>beta</code> value.",name:"beta_end"},{anchor:"diffusers.LMSDiscreteScheduler.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> or <code>scaled_linear</code>.`,name:"beta_schedule"},{anchor:"diffusers.LMSDiscreteScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_lms_discrete.py#L46"}}),Xt=new b({props:{name:"get_lms_coefficient",anchor:"diffusers.LMSDiscreteScheduler.get_lms_coefficient",parameters:[{name:"order",val:""},{name:"t",val:""},{name:"current_order",val:""}],parametersDescription:[{anchor:"diffusers.LMSDiscreteScheduler.get_lms_coefficient.order",description:"<strong>order</strong> (TODO) &#x2014;",name:"order"},{anchor:"diffusers.LMSDiscreteScheduler.get_lms_coefficient.t",description:"<strong>t</strong> (TODO) &#x2014;",name:"t"},{anchor:"diffusers.LMSDiscreteScheduler.get_lms_coefficient.current_order",description:"<strong>current_order</strong> (TODO) &#x2014;",name:"current_order"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_lms_discrete.py#L100"}}),Zt=new b({props:{name:"set_timesteps",anchor:"diffusers.LMSDiscreteScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"}],parametersDescription:[{anchor:"diffusers.LMSDiscreteScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_lms_discrete.py#L122"}}),er=new b({props:{name:"step",anchor:"diffusers.LMSDiscreteScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"order",val:": int = 4"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.LMSDiscreteScheduler.step.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.LMSDiscreteScheduler.step.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.LMSDiscreteScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.
order &#x2014; coefficient for multi-step inference.`,name:"sample"},{anchor:"diffusers.LMSDiscreteScheduler.step.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>) &#x2014; option for returning tuple rather than LMSDiscreteSchedulerOutput class",name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_lms_discrete.py#L144",returnDescription:`
<p><code>LMSDiscreteSchedulerOutput</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>LMSDiscreteSchedulerOutput</code> or <code>tuple</code></p>
`}}),tr=new Y({}),sr=new b({props:{name:"class diffusers.PNDMScheduler",anchor:"diffusers.PNDMScheduler",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:"skip_prk_steps",val:": bool = False"},{name:"set_alpha_to_one",val:": bool = False"},{name:"steps_offset",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.PNDMScheduler.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.PNDMScheduler.beta_start",description:"<strong>beta_start</strong> (<code>float</code>) &#x2014; the starting <code>beta</code> value of inference.",name:"beta_start"},{anchor:"diffusers.PNDMScheduler.beta_end",description:"<strong>beta_end</strong> (<code>float</code>) &#x2014; the final <code>beta</code> value.",name:"beta_end"},{anchor:"diffusers.PNDMScheduler.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.PNDMScheduler.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.PNDMScheduler.skip_prk_steps",description:`<strong>skip_prk_steps</strong> (<code>bool</code>) &#x2014;
allows the scheduler to skip the Runge-Kutta steps that are defined in the original paper as being required
before plms steps; defaults to <code>False</code>.`,name:"skip_prk_steps"},{anchor:"diffusers.PNDMScheduler.set_alpha_to_one",description:`<strong>set_alpha_to_one</strong> (<code>bool</code>, default <code>False</code>) &#x2014;
each diffusion step uses the value of alphas product at that step and at the previous one. For the final
step there is no previous alpha. When this option is <code>True</code> the previous alpha product is fixed to <code>1</code>,
otherwise it uses the value of alpha at step 0.`,name:"set_alpha_to_one"},{anchor:"diffusers.PNDMScheduler.steps_offset",description:`<strong>steps_offset</strong> (<code>int</code>, default <code>0</code>) &#x2014;
an offset added to the inference steps. You can use a combination of <code>offset=1</code> and
<code>set_alpha_to_one=False</code>, to make the last step use step 0 for the previous alpha product, as done in
stable diffusion.`,name:"steps_offset"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_pndm.py#L57"}}),nr=new b({props:{name:"set_timesteps",anchor:"diffusers.PNDMScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.PNDMScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_pndm.py#L142"}}),ar=new b({props:{name:"step",anchor:"diffusers.PNDMScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.PNDMScheduler.step.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.PNDMScheduler.step.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.PNDMScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"},{anchor:"diffusers.PNDMScheduler.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/vr_649/src/diffusers/schedulers/scheduling_pndm.py#L190",returnDescription:`
<p><a
  href="/docs/diffusers/pr_649/en/api/schedulers#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> 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><a
  href="/docs/diffusers/pr_649/en/api/schedulers#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),ir=new b({props:{name:"step_plms",anchor:"diffusers.PNDMScheduler.step_plms",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.PNDMScheduler.step_plms.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.PNDMScheduler.step_plms.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.PNDMScheduler.step_plms.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"},{anchor:"diffusers.PNDMScheduler.step_plms.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/vr_649/src/diffusers/schedulers/scheduling_pndm.py#L276",returnDescription:`
<p><code>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>SchedulerOutput</code> or <code>tuple</code></p>
`}}),dr=new b({props:{name:"step_prk",anchor:"diffusers.PNDMScheduler.step_prk",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.PNDMScheduler.step_prk.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.PNDMScheduler.step_prk.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.PNDMScheduler.step_prk.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.`,name:"sample"},{anchor:"diffusers.PNDMScheduler.step_prk.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/vr_649/src/diffusers/schedulers/scheduling_pndm.py#L221",returnDescription:`
<p><code>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>SchedulerOutput</code> or <code>tuple</code></p>
`}}),lr=new Y({}),fr=new b({props:{name:"class diffusers.ScoreSdeVeScheduler",anchor:"diffusers.ScoreSdeVeScheduler",parameters:[{name:"num_train_timesteps",val:": int = 2000"},{name:"snr",val:": float = 0.15"},{name:"sigma_min",val:": float = 0.01"},{name:"sigma_max",val:": float = 1348.0"},{name:"sampling_eps",val:": float = 1e-05"},{name:"correct_steps",val:": int = 1"}],parametersDescription:[{anchor:"diffusers.ScoreSdeVeScheduler.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.ScoreSdeVeScheduler.snr",description:`<strong>snr</strong> (<code>float</code>) &#x2014;
coefficient weighting the step from the model_output sample (from the network) to the random noise.`,name:"snr"},{anchor:"diffusers.ScoreSdeVeScheduler.sigma_min",description:`<strong>sigma_min</strong> (<code>float</code>) &#x2014;
initial noise scale for sigma sequence in sampling procedure. The minimum sigma should mirror the
distribution of the data.`,name:"sigma_min"},{anchor:"diffusers.ScoreSdeVeScheduler.sigma_max",description:"<strong>sigma_max</strong> (<code>float</code>) &#x2014; maximum value used for the range of continuous timesteps passed into the model.",name:"sigma_max"},{anchor:"diffusers.ScoreSdeVeScheduler.sampling_eps",description:`<strong>sampling_eps</strong> (<code>float</code>) &#x2014; the end value of sampling, where timesteps decrease progressively from 1 to
epsilon. &#x2014;`,name:"sampling_eps"},{anchor:"diffusers.ScoreSdeVeScheduler.correct_steps",description:"<strong>correct_steps</strong> (<code>int</code>) &#x2014; number of correction steps performed on a produced sample.",name:"correct_steps"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_sde_ve.py#L46"}}),pr=new b({props:{name:"set_sigmas",anchor:"diffusers.ScoreSdeVeScheduler.set_sigmas",parameters:[{name:"num_inference_steps",val:": int"},{name:"sigma_min",val:": float = None"},{name:"sigma_max",val:": float = None"},{name:"sampling_eps",val:": float = None"}],parametersDescription:[{anchor:"diffusers.ScoreSdeVeScheduler.set_sigmas.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.ScoreSdeVeScheduler.set_sigmas.sigma_min",description:`<strong>sigma_min</strong> (<code>float</code>, optional) &#x2014;
initial noise scale value (overrides value given at Scheduler instantiation).`,name:"sigma_min"},{anchor:"diffusers.ScoreSdeVeScheduler.set_sigmas.sigma_max",description:"<strong>sigma_max</strong> (<code>float</code>, optional) &#x2014; final noise scale value (overrides value given at Scheduler instantiation).",name:"sigma_max"},{anchor:"diffusers.ScoreSdeVeScheduler.set_sigmas.sampling_eps",description:"<strong>sampling_eps</strong> (<code>float</code>, optional) &#x2014; final timestep value (overrides value given at Scheduler instantiation).",name:"sampling_eps"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_sde_ve.py#L99"}}),hr=new b({props:{name:"set_timesteps",anchor:"diffusers.ScoreSdeVeScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"sampling_eps",val:": float = None"}],parametersDescription:[{anchor:"diffusers.ScoreSdeVeScheduler.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.ScoreSdeVeScheduler.set_timesteps.sampling_eps",description:"<strong>sampling_eps</strong> (<code>float</code>, optional) &#x2014; final timestep value (overrides value given at Scheduler instantiation).",name:"sampling_eps"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_sde_ve.py#L85"}}),mr=new b({props:{name:"step_correct",anchor:"diffusers.ScoreSdeVeScheduler.step_correct",parameters:[{name:"model_output",val:": FloatTensor"},{name:"sample",val:": FloatTensor"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ScoreSdeVeScheduler.step_correct.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.ScoreSdeVeScheduler.step_correct.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.
generator &#x2014; random number generator.`,name:"sample"},{anchor:"diffusers.ScoreSdeVeScheduler.step_correct.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/vr_649/src/diffusers/schedulers/scheduling_sde_ve.py#L206",returnDescription:`
<p><code>SdeVeOutput</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>SdeVeOutput</code> or <code>tuple</code></p>
`}}),gr=new b({props:{name:"step_pred",anchor:"diffusers.ScoreSdeVeScheduler.step_pred",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ScoreSdeVeScheduler.step_pred.model_output",description:"<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014; direct output from learned diffusion model.",name:"model_output"},{anchor:"diffusers.ScoreSdeVeScheduler.step_pred.timestep",description:"<strong>timestep</strong> (<code>int</code>) &#x2014; current discrete timestep in the diffusion chain.",name:"timestep"},{anchor:"diffusers.ScoreSdeVeScheduler.step_pred.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
current instance of sample being created by diffusion process.
generator &#x2014; random number generator.`,name:"sample"},{anchor:"diffusers.ScoreSdeVeScheduler.step_pred.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/vr_649/src/diffusers/schedulers/scheduling_sde_ve.py#L141",returnDescription:`
<p><code>SdeVeOutput</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>SdeVeOutput</code> or <code>tuple</code></p>
`}}),_r=new Y({}),ft=new Qm({props:{warning:!0,$$slots:{default:[Xm]},$$scope:{ctx:cn}}}),br=new b({props:{name:"class diffusers.schedulers.ScoreSdeVpScheduler",anchor:"diffusers.schedulers.ScoreSdeVpScheduler",parameters:[{name:"num_train_timesteps",val:" = 2000"},{name:"beta_min",val:" = 0.1"},{name:"beta_max",val:" = 20"},{name:"sampling_eps",val:" = 0.001"}],source:"https://github.com/huggingface/diffusers/blob/vr_649/src/diffusers/schedulers/scheduling_sde_vp.py#L27"}}),{c(){N=s("meta"),Ee=l(),F=s("h1"),J=s("a"),_s=s("span"),p(pt.$$.fragment),Ua=l(),vs=s("span"),Ba=a("Schedulers"),fn=l(),Dr=s("p"),Ga=a("Diffusers contains multiple pre-built schedule functions for the diffusion process."),un=l(),ne=s("h2"),xe=s("a"),bs=s("span"),p(ht.$$.fragment),Ya=l(),Ss=s("span"),za=a("What is a scheduler?"),pn=l(),ye=s("p"),Ja=a("The schedule functions, denoted "),$s=s("em"),ja=a("Schedulers"),Qa=a(" 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."),hn=l(),we=s("ul"),Er=s("li"),Xa=a("Schedulers define the methodology for iteratively adding noise to an image or for updating a sample based on model outputs."),mt=s("ul"),Ds=s("li"),Za=a("adding noise in different manners represent the algorithmic processes to train a diffusion model by adding noise to images."),ei=l(),Es=s("li"),ti=a("for inference, the scheduler defines how to update a sample based on an output from a pretrained model."),ri=l(),ae=s("li"),si=a("Schedulers are often defined by a "),xs=s("em"),oi=a("noise schedule"),ni=a(" and an "),ys=s("em"),ai=a("update rule"),ii=a(" to solve the differential equation solution."),mn=l(),ie=s("h3"),Me=s("a"),ws=s("span"),p(gt.$$.fragment),di=l(),Ms=s("span"),li=a("Discrete versus continuous schedulers"),gn=l(),E=s("p"),ci=a(`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 both discrete (accepting `),Ps=s("code"),fi=a("int"),ui=a(" inputs), such as the "),xr=s("a"),pi=a("DDPMScheduler"),hi=a(" or "),yr=s("a"),mi=a("PNDMScheduler"),gi=a(", and continuous (accepting "),Ts=s("code"),_i=a("float"),vi=a(" inputs), such as the score-based schedulers "),wr=s("a"),bi=a("ScoreSdeVeScheduler"),Si=a(" or "),Os=s("code"),$i=a("ScoreSdeVpScheduler"),Di=a("."),_n=l(),de=s("h2"),Pe=s("a"),ks=s("span"),p(_t.$$.fragment),Ei=l(),Cs=s("span"),xi=a("Designing Re-usable schedulers"),vn=l(),Mr=s("p"),yi=a(`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:`),bn=l(),Te=s("ul"),Vs=s("li"),wi=a("Schedulers can be used interchangeably between diffusion models in inference to find the preferred trade-off between speed and generation quality."),Mi=l(),As=s("li"),Pi=a("Schedulers are currently by default in PyTorch, but are designed to be framework independent (partial Numpy support currently exists)."),Sn=l(),le=s("h2"),Oe=s("a"),Ns=s("span"),p(vt.$$.fragment),Ti=l(),Ls=s("span"),Oi=a("API"),$n=l(),Pr=s("p"),ki=a("The core API for any new scheduler must follow a limited structure."),Dn=l(),ee=s("ul"),bt=s("li"),Ci=a("Schedulers should provide one or more "),Is=s("code"),Vi=a("def step(...)"),Ai=a(" functions that should be called to update the generated sample iteratively."),Ni=l(),St=s("li"),Li=a("Schedulers should provide a "),Fs=s("code"),Ii=a("set_timesteps(...)"),Fi=a(" method that configures the parameters of a schedule function for a specific inference task."),Ki=l(),Ks=s("li"),qi=a("Schedulers should be framework-specific."),En=l(),ke=s("p"),Hi=a("The base class "),Tr=s("a"),Ri=a("SchedulerMixin"),Wi=a(" implements low level utilities used by multiple schedulers."),xn=l(),ce=s("h3"),Ce=s("a"),qs=s("span"),p($t.$$.fragment),Ui=l(),Hs=s("span"),Bi=a("SchedulerMixin"),yn=l(),fe=s("div"),p(Dt.$$.fragment),Gi=l(),Rs=s("p"),Yi=a("Mixin containing common functions for the schedulers."),wn=l(),ue=s("h3"),Ve=s("a"),Ws=s("span"),p(Et.$$.fragment),zi=l(),Us=s("span"),Ji=a("SchedulerOutput"),Mn=a("\n\nThe class `SchedulerOutput` contains the outputs from any schedulers `step(...)` call.\n"),pe=s("div"),p(xt.$$.fragment),ji=l(),Bs=s("p"),Qi=a("Base class for the scheduler\u2019s step function output."),Pn=l(),he=s("h3"),Ae=s("a"),Gs=s("span"),p(yt.$$.fragment),Xi=l(),Ys=s("span"),Zi=a("Implemented Schedulers"),Tn=l(),me=s("h4"),Ne=s("a"),zs=s("span"),p(wt.$$.fragment),ed=l(),Js=s("span"),td=a("Denoising diffusion implicit models (DDIM)"),On=l(),Or=s("p"),rd=a("Original paper can be found here."),kn=l(),C=s("div"),p(Mt.$$.fragment),sd=l(),js=s("p"),od=a(`Denoising diffusion implicit models is a scheduler that extends the denoising procedure introduced in denoising
diffusion probabilistic models (DDPMs) with non-Markovian guidance.`),nd=l(),x=s("p"),kr=s("a"),ad=a("~ConfigMixin"),id=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),Qs=s("code"),dd=a("__init__"),ld=a(`
function, such as `),Xs=s("code"),cd=a("num_train_timesteps"),fd=a(". They can be accessed via "),Zs=s("code"),ud=a("scheduler.config.num_train_timesteps"),pd=a(`.
`),Cr=s("a"),hd=a("~ConfigMixin"),md=a(" also provides general loading and saving functionality via the "),Vr=s("a"),gd=a("save_config()"),_d=a(` and
`),Ar=s("a"),vd=a("from_config()"),bd=a(" functions."),Sd=l(),Nr=s("p"),$d=a("For more details, see the original paper: "),Pt=s("a"),Dd=a("https://arxiv.org/abs/2010.02502"),Ed=l(),Le=s("div"),p(Tt.$$.fragment),xd=l(),eo=s("p"),yd=a("Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference."),wd=l(),Ie=s("div"),p(Ot.$$.fragment),Md=l(),to=s("p"),Pd=a(`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),Cn=l(),ge=s("h4"),Fe=s("a"),ro=s("span"),p(kt.$$.fragment),Td=l(),so=s("span"),Od=a("Denoising diffusion probabilistic models (DDPM)"),Vn=l(),Ke=s("p"),kd=a("Original paper can be found "),Ct=s("a"),Cd=a("here"),Vd=a("."),An=l(),V=s("div"),p(Vt.$$.fragment),Ad=l(),oo=s("p"),Nd=a(`Denoising diffusion probabilistic models (DDPMs) explores the connections between denoising score matching and
Langevin dynamics sampling.`),Ld=l(),y=s("p"),Lr=s("a"),Id=a("~ConfigMixin"),Fd=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),no=s("code"),Kd=a("__init__"),qd=a(`
function, such as `),ao=s("code"),Hd=a("num_train_timesteps"),Rd=a(". They can be accessed via "),io=s("code"),Wd=a("scheduler.config.num_train_timesteps"),Ud=a(`.
`),Ir=s("a"),Bd=a("~ConfigMixin"),Gd=a(" also provides general loading and saving functionality via the "),Fr=s("a"),Yd=a("save_config()"),zd=a(` and
`),Kr=s("a"),Jd=a("from_config()"),jd=a(" functions."),Qd=l(),qr=s("p"),Xd=a("For more details, see the original paper: "),At=s("a"),Zd=a("https://arxiv.org/abs/2006.11239"),el=l(),qe=s("div"),p(Nt.$$.fragment),tl=l(),lo=s("p"),rl=a("Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference."),sl=l(),He=s("div"),p(Lt.$$.fragment),ol=l(),co=s("p"),nl=a(`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),Nn=l(),_e=s("h4"),Re=s("a"),fo=s("span"),p(It.$$.fragment),al=l(),uo=s("span"),il=a("Variance exploding, stochastic sampling from Karras et. al"),Ln=l(),We=s("p"),dl=a("Original paper can be found "),Ft=s("a"),ll=a("here"),cl=a("."),In=l(),S=s("div"),p(Kt.$$.fragment),fl=l(),po=s("p"),ul=a(`Stochastic sampling from Karras et al. [1] tailored to the Variance-Expanding (VE) models [2]. Use Algorithm 2 and
the VE column of Table 1 from [1] for reference.`),pl=l(),Ue=s("p"),hl=a(`[1] Karras, Tero, et al. \u201CElucidating the Design Space of Diffusion-Based Generative Models.\u201D
`),qt=s("a"),ml=a("https://arxiv.org/abs/2206.00364"),gl=a(` [2] Song, Yang, et al. \u201CScore-based generative modeling through stochastic
differential equations.\u201D `),Ht=s("a"),_l=a("https://arxiv.org/abs/2011.13456"),vl=l(),w=s("p"),Hr=s("a"),bl=a("~ConfigMixin"),Sl=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),ho=s("code"),$l=a("__init__"),Dl=a(`
function, such as `),mo=s("code"),El=a("num_train_timesteps"),xl=a(". They can be accessed via "),go=s("code"),yl=a("scheduler.config.num_train_timesteps"),wl=a(`.
`),Rr=s("a"),Ml=a("~ConfigMixin"),Pl=a(" also provides general loading and saving functionality via the "),Wr=s("a"),Tl=a("save_config()"),Ol=a(` and
`),Ur=s("a"),kl=a("from_config()"),Cl=a(" functions."),Vl=l(),Rt=s("p"),Al=a(`For more details on the parameters, see the original paper\u2019s Appendix E.: \u201CElucidating the Design Space of
Diffusion-Based Generative Models.\u201D `),Wt=s("a"),Nl=a("https://arxiv.org/abs/2206.00364"),Ll=a(`. The grid search values used to find the
optimal {s_noise, s_churn, s_min, s_max} for a specific model are described in Table 5 of the paper.`),Il=l(),te=s("div"),p(Ut.$$.fragment),Fl=l(),_o=s("p"),Kl=a(`Explicit Langevin-like \u201Cchurn\u201D step of adding noise to the sample according to a factor gamma_i \u2265 0 to reach a
higher noise level sigma_hat = sigma_i + gamma_i*sigma_i.`),ql=l(),vo=s("p"),Hl=a("TODO Args:"),Rl=l(),Be=s("div"),p(Bt.$$.fragment),Wl=l(),bo=s("p"),Ul=a("Sets the continuous timesteps used for the diffusion chain. Supporting function to be run before inference."),Bl=l(),Ge=s("div"),p(Gt.$$.fragment),Gl=l(),So=s("p"),Yl=a(`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),zl=l(),Ye=s("div"),p(Yt.$$.fragment),Jl=l(),$o=s("p"),jl=a("Correct the predicted sample based on the output model_output of the network. TODO complete description"),Fn=l(),ve=s("h4"),ze=s("a"),Do=s("span"),p(zt.$$.fragment),Ql=l(),Eo=s("span"),Xl=a("Linear multistep scheduler for discrete beta schedules"),Kn=l(),Je=s("p"),Zl=a("Original implementation can be found "),Jt=s("a"),ec=a("here"),tc=a("."),qn=l(),A=s("div"),p(jt.$$.fragment),rc=l(),Br=s("p"),sc=a(`Linear Multistep Scheduler for discrete beta schedules. Based on the original k-diffusion implementation by
Katherine Crowson:
`),Qt=s("a"),oc=a("https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L181"),nc=l(),M=s("p"),Gr=s("a"),ac=a("~ConfigMixin"),ic=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),xo=s("code"),dc=a("__init__"),lc=a(`
function, such as `),yo=s("code"),cc=a("num_train_timesteps"),fc=a(". They can be accessed via "),wo=s("code"),uc=a("scheduler.config.num_train_timesteps"),pc=a(`.
`),Yr=s("a"),hc=a("~ConfigMixin"),mc=a(" also provides general loading and saving functionality via the "),zr=s("a"),gc=a("save_config()"),_c=a(` and
`),Jr=s("a"),vc=a("from_config()"),bc=a(" functions."),Sc=l(),je=s("div"),p(Xt.$$.fragment),$c=l(),Mo=s("p"),Dc=a("Compute a linear multistep coefficient."),Ec=l(),Qe=s("div"),p(Zt.$$.fragment),xc=l(),Po=s("p"),yc=a("Sets the timesteps used for the diffusion chain. Supporting function to be run before inference."),wc=l(),Xe=s("div"),p(er.$$.fragment),Mc=l(),To=s("p"),Pc=a(`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),Hn=l(),be=s("h4"),Ze=s("a"),Oo=s("span"),p(tr.$$.fragment),Tc=l(),ko=s("span"),Oc=a("Pseudo numerical methods for diffusion models (PNDM)"),Rn=l(),et=s("p"),kc=a("Original implementation can be found "),rr=s("a"),Cc=a("here"),Vc=a("."),Wn=l(),$=s("div"),p(sr.$$.fragment),Ac=l(),Co=s("p"),Nc=a(`Pseudo numerical methods for diffusion models (PNDM) proposes using more advanced ODE integration techniques,
namely Runge-Kutta method and a linear multi-step method.`),Lc=l(),P=s("p"),jr=s("a"),Ic=a("~ConfigMixin"),Fc=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),Vo=s("code"),Kc=a("__init__"),qc=a(`
function, such as `),Ao=s("code"),Hc=a("num_train_timesteps"),Rc=a(". They can be accessed via "),No=s("code"),Wc=a("scheduler.config.num_train_timesteps"),Uc=a(`.
`),Qr=s("a"),Bc=a("~ConfigMixin"),Gc=a(" also provides general loading and saving functionality via the "),Xr=s("a"),Yc=a("save_config()"),zc=a(` and
`),Zr=s("a"),Jc=a("from_config()"),jc=a(" functions."),Qc=l(),es=s("p"),Xc=a("For more details, see the original paper: "),or=s("a"),Zc=a("https://arxiv.org/abs/2202.09778"),ef=l(),tt=s("div"),p(nr.$$.fragment),tf=l(),Lo=s("p"),rf=a("Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference."),sf=l(),re=s("div"),p(ar.$$.fragment),of=l(),Io=s("p"),nf=a(`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),af=l(),Z=s("p"),df=a("This function calls "),Fo=s("code"),lf=a("step_prk()"),cf=a(" or "),Ko=s("code"),ff=a("step_plms()"),uf=a(" depending on the internal variable "),qo=s("code"),pf=a("counter"),hf=a("."),mf=l(),rt=s("div"),p(ir.$$.fragment),gf=l(),Ho=s("p"),_f=a(`Step function propagating the sample with the linear multi-step method. This has one forward pass with multiple
times to approximate the solution.`),vf=l(),st=s("div"),p(dr.$$.fragment),bf=l(),Ro=s("p"),Sf=a(`Step function propagating the sample with the Runge-Kutta method. RK takes 4 forward passes to approximate the
solution to the differential equation.`),Un=l(),Se=s("h4"),ot=s("a"),Wo=s("span"),p(lr.$$.fragment),$f=l(),Uo=s("span"),Df=a("variance exploding stochastic differential equation (SDE) scheduler"),Bn=l(),nt=s("p"),Ef=a("Original paper can be found "),cr=s("a"),xf=a("here"),yf=a("."),Gn=l(),D=s("div"),p(fr.$$.fragment),wf=l(),Bo=s("p"),Mf=a("The variance exploding stochastic differential equation (SDE) scheduler."),Pf=l(),ts=s("p"),Tf=a("For more information, see the original paper: "),ur=s("a"),Of=a("https://arxiv.org/abs/2011.13456"),kf=l(),T=s("p"),rs=s("a"),Cf=a("~ConfigMixin"),Vf=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),Go=s("code"),Af=a("__init__"),Nf=a(`
function, such as `),Yo=s("code"),Lf=a("num_train_timesteps"),If=a(". They can be accessed via "),zo=s("code"),Ff=a("scheduler.config.num_train_timesteps"),Kf=a(`.
`),ss=s("a"),qf=a("~ConfigMixin"),Hf=a(" also provides general loading and saving functionality via the "),os=s("a"),Rf=a("save_config()"),Wf=a(` and
`),ns=s("a"),Uf=a("from_config()"),Bf=a(" functions."),Gf=l(),se=s("div"),p(pr.$$.fragment),Yf=l(),Jo=s("p"),zf=a("Sets the noise scales used for the diffusion chain. Supporting function to be run before inference."),Jf=l(),$e=s("p"),jf=a("The sigmas control the weight of the "),jo=s("code"),Qf=a("drift"),Xf=a(" and "),Qo=s("code"),Zf=a("diffusion"),eu=a(" components of sample update."),tu=l(),at=s("div"),p(hr.$$.fragment),ru=l(),Xo=s("p"),su=a("Sets the continuous timesteps used for the diffusion chain. Supporting function to be run before inference."),ou=l(),it=s("div"),p(mr.$$.fragment),nu=l(),Zo=s("p"),au=a(`Correct the predicted sample based on the output model_output of the network. This is often run repeatedly
after making the prediction for the previous timestep.`),iu=l(),dt=s("div"),p(gr.$$.fragment),du=l(),en=s("p"),lu=a(`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),Yn=l(),De=s("h4"),lt=s("a"),tn=s("span"),p(_r.$$.fragment),cu=l(),rn=s("span"),fu=a("variance preserving stochastic differential equation (SDE) scheduler"),zn=l(),ct=s("p"),uu=a("Original paper can be found "),vr=s("a"),pu=a("here"),hu=a("."),Jn=l(),p(ft.$$.fragment),jn=l(),K=s("div"),p(br.$$.fragment),mu=l(),sn=s("p"),gu=a("The variance preserving stochastic differential equation (SDE) scheduler."),_u=l(),O=s("p"),as=s("a"),vu=a("~ConfigMixin"),bu=a(" takes care of storing all config attributes that are passed in the scheduler\u2019s "),on=s("code"),Su=a("__init__"),$u=a(`
function, such as `),nn=s("code"),Du=a("num_train_timesteps"),Eu=a(". They can be accessed via "),an=s("code"),xu=a("scheduler.config.num_train_timesteps"),yu=a(`.
`),is=s("a"),wu=a("~ConfigMixin"),Mu=a(" also provides general loading and saving functionality via the "),ds=s("a"),Pu=a("save_config()"),Tu=a(` and
`),ls=s("a"),Ou=a("from_config()"),ku=a(" functions."),Cu=l(),cs=s("p"),Vu=a("For more information, see the original paper: "),Sr=s("a"),Au=a("https://arxiv.org/abs/2011.13456"),Nu=l(),dn=s("p"),Lu=a("UNDER CONSTRUCTION"),this.h()},l(t){const f=Jm('[data-svelte="svelte-1phssyn"]',document.head);N=o(f,"META",{name:!0,content:!0}),f.forEach(r),Ee=c(t),F=o(t,"H1",{class:!0});var $r=n(F);J=o($r,"A",{id:!0,class:!0,href:!0});var Uu=n(J);_s=o(Uu,"SPAN",{});var Bu=n(_s);h(pt.$$.fragment,Bu),Bu.forEach(r),Uu.forEach(r),Ua=c($r),vs=o($r,"SPAN",{});var Gu=n(vs);Ba=i(Gu,"Schedulers"),Gu.forEach(r),$r.forEach(r),fn=c(t),Dr=o(t,"P",{});var Yu=n(Dr);Ga=i(Yu,"Diffusers contains multiple pre-built schedule functions for the diffusion process."),Yu.forEach(r),un=c(t),ne=o(t,"H2",{class:!0});var Xn=n(ne);xe=o(Xn,"A",{id:!0,class:!0,href:!0});var zu=n(xe);bs=o(zu,"SPAN",{});var Ju=n(bs);h(ht.$$.fragment,Ju),Ju.forEach(r),zu.forEach(r),Ya=c(Xn),Ss=o(Xn,"SPAN",{});var ju=n(Ss);za=i(ju,"What is a scheduler?"),ju.forEach(r),Xn.forEach(r),pn=c(t),ye=o(t,"P",{});var Zn=n(ye);Ja=i(Zn,"The schedule functions, denoted "),$s=o(Zn,"EM",{});var Qu=n($s);ja=i(Qu,"Schedulers"),Qu.forEach(r),Qa=i(Zn," 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."),Zn.forEach(r),hn=c(t),we=o(t,"UL",{});var ea=n(we);Er=o(ea,"LI",{});var Iu=n(Er);Xa=i(Iu,"Schedulers define the methodology for iteratively adding noise to an image or for updating a sample based on model outputs."),mt=o(Iu,"UL",{});var ta=n(mt);Ds=o(ta,"LI",{});var Xu=n(Ds);Za=i(Xu,"adding noise in different manners represent the algorithmic processes to train a diffusion model by adding noise to images."),Xu.forEach(r),ei=c(ta),Es=o(ta,"LI",{});var Zu=n(Es);ti=i(Zu,"for inference, the scheduler defines how to update a sample based on an output from a pretrained model."),Zu.forEach(r),ta.forEach(r),Iu.forEach(r),ri=c(ea),ae=o(ea,"LI",{});var fs=n(ae);si=i(fs,"Schedulers are often defined by a "),xs=o(fs,"EM",{});var ep=n(xs);oi=i(ep,"noise schedule"),ep.forEach(r),ni=i(fs," and an "),ys=o(fs,"EM",{});var tp=n(ys);ai=i(tp,"update rule"),tp.forEach(r),ii=i(fs," to solve the differential equation solution."),fs.forEach(r),ea.forEach(r),mn=c(t),ie=o(t,"H3",{class:!0});var ra=n(ie);Me=o(ra,"A",{id:!0,class:!0,href:!0});var rp=n(Me);ws=o(rp,"SPAN",{});var sp=n(ws);h(gt.$$.fragment,sp),sp.forEach(r),rp.forEach(r),di=c(ra),Ms=o(ra,"SPAN",{});var op=n(Ms);li=i(op,"Discrete versus continuous schedulers"),op.forEach(r),ra.forEach(r),gn=c(t),E=o(t,"P",{});var z=n(E);ci=i(z,`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 both discrete (accepting `),Ps=o(z,"CODE",{});var np=n(Ps);fi=i(np,"int"),np.forEach(r),ui=i(z," inputs), such as the "),xr=o(z,"A",{href:!0});var ap=n(xr);pi=i(ap,"DDPMScheduler"),ap.forEach(r),hi=i(z," or "),yr=o(z,"A",{href:!0});var ip=n(yr);mi=i(ip,"PNDMScheduler"),ip.forEach(r),gi=i(z,", and continuous (accepting "),Ts=o(z,"CODE",{});var dp=n(Ts);_i=i(dp,"float"),dp.forEach(r),vi=i(z," inputs), such as the score-based schedulers "),wr=o(z,"A",{href:!0});var lp=n(wr);bi=i(lp,"ScoreSdeVeScheduler"),lp.forEach(r),Si=i(z," or "),Os=o(z,"CODE",{});var cp=n(Os);$i=i(cp,"ScoreSdeVpScheduler"),cp.forEach(r),Di=i(z,"."),z.forEach(r),_n=c(t),de=o(t,"H2",{class:!0});var sa=n(de);Pe=o(sa,"A",{id:!0,class:!0,href:!0});var fp=n(Pe);ks=o(fp,"SPAN",{});var up=n(ks);h(_t.$$.fragment,up),up.forEach(r),fp.forEach(r),Ei=c(sa),Cs=o(sa,"SPAN",{});var pp=n(Cs);xi=i(pp,"Designing Re-usable schedulers"),pp.forEach(r),sa.forEach(r),vn=c(t),Mr=o(t,"P",{});var hp=n(Mr);yi=i(hp,`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:`),hp.forEach(r),bn=c(t),Te=o(t,"UL",{});var oa=n(Te);Vs=o(oa,"LI",{});var mp=n(Vs);wi=i(mp,"Schedulers can be used interchangeably between diffusion models in inference to find the preferred trade-off between speed and generation quality."),mp.forEach(r),Mi=c(oa),As=o(oa,"LI",{});var gp=n(As);Pi=i(gp,"Schedulers are currently by default in PyTorch, but are designed to be framework independent (partial Numpy support currently exists)."),gp.forEach(r),oa.forEach(r),Sn=c(t),le=o(t,"H2",{class:!0});var na=n(le);Oe=o(na,"A",{id:!0,class:!0,href:!0});var _p=n(Oe);Ns=o(_p,"SPAN",{});var vp=n(Ns);h(vt.$$.fragment,vp),vp.forEach(r),_p.forEach(r),Ti=c(na),Ls=o(na,"SPAN",{});var bp=n(Ls);Oi=i(bp,"API"),bp.forEach(r),na.forEach(r),$n=c(t),Pr=o(t,"P",{});var Sp=n(Pr);ki=i(Sp,"The core API for any new scheduler must follow a limited structure."),Sp.forEach(r),Dn=c(t),ee=o(t,"UL",{});var us=n(ee);bt=o(us,"LI",{});var aa=n(bt);Ci=i(aa,"Schedulers should provide one or more "),Is=o(aa,"CODE",{});var $p=n(Is);Vi=i($p,"def step(...)"),$p.forEach(r),Ai=i(aa," functions that should be called to update the generated sample iteratively."),aa.forEach(r),Ni=c(us),St=o(us,"LI",{});var ia=n(St);Li=i(ia,"Schedulers should provide a "),Fs=o(ia,"CODE",{});var Dp=n(Fs);Ii=i(Dp,"set_timesteps(...)"),Dp.forEach(r),Fi=i(ia," method that configures the parameters of a schedule function for a specific inference task."),ia.forEach(r),Ki=c(us),Ks=o(us,"LI",{});var Ep=n(Ks);qi=i(Ep,"Schedulers should be framework-specific."),Ep.forEach(r),us.forEach(r),En=c(t),ke=o(t,"P",{});var da=n(ke);Hi=i(da,"The base class "),Tr=o(da,"A",{href:!0});var xp=n(Tr);Ri=i(xp,"SchedulerMixin"),xp.forEach(r),Wi=i(da," implements low level utilities used by multiple schedulers."),da.forEach(r),xn=c(t),ce=o(t,"H3",{class:!0});var la=n(ce);Ce=o(la,"A",{id:!0,class:!0,href:!0});var yp=n(Ce);qs=o(yp,"SPAN",{});var wp=n(qs);h($t.$$.fragment,wp),wp.forEach(r),yp.forEach(r),Ui=c(la),Hs=o(la,"SPAN",{});var Mp=n(Hs);Bi=i(Mp,"SchedulerMixin"),Mp.forEach(r),la.forEach(r),yn=c(t),fe=o(t,"DIV",{class:!0});var ca=n(fe);h(Dt.$$.fragment,ca),Gi=c(ca),Rs=o(ca,"P",{});var Pp=n(Rs);Yi=i(Pp,"Mixin containing common functions for the schedulers."),Pp.forEach(r),ca.forEach(r),wn=c(t),ue=o(t,"H3",{class:!0});var fa=n(ue);Ve=o(fa,"A",{id:!0,class:!0,href:!0});var Tp=n(Ve);Ws=o(Tp,"SPAN",{});var Op=n(Ws);h(Et.$$.fragment,Op),Op.forEach(r),Tp.forEach(r),zi=c(fa),Us=o(fa,"SPAN",{});var kp=n(Us);Ji=i(kp,"SchedulerOutput"),kp.forEach(r),fa.forEach(r),Mn=i(t,"\n\nThe class `SchedulerOutput` contains the outputs from any schedulers `step(...)` call.\n"),pe=o(t,"DIV",{class:!0});var ua=n(pe);h(xt.$$.fragment,ua),ji=c(ua),Bs=o(ua,"P",{});var Cp=n(Bs);Qi=i(Cp,"Base class for the scheduler\u2019s step function output."),Cp.forEach(r),ua.forEach(r),Pn=c(t),he=o(t,"H3",{class:!0});var pa=n(he);Ae=o(pa,"A",{id:!0,class:!0,href:!0});var Vp=n(Ae);Gs=o(Vp,"SPAN",{});var Ap=n(Gs);h(yt.$$.fragment,Ap),Ap.forEach(r),Vp.forEach(r),Xi=c(pa),Ys=o(pa,"SPAN",{});var Np=n(Ys);Zi=i(Np,"Implemented Schedulers"),Np.forEach(r),pa.forEach(r),Tn=c(t),me=o(t,"H4",{class:!0});var ha=n(me);Ne=o(ha,"A",{id:!0,class:!0,href:!0});var Lp=n(Ne);zs=o(Lp,"SPAN",{});var Ip=n(zs);h(wt.$$.fragment,Ip),Ip.forEach(r),Lp.forEach(r),ed=c(ha),Js=o(ha,"SPAN",{});var Fp=n(Js);td=i(Fp,"Denoising diffusion implicit models (DDIM)"),Fp.forEach(r),ha.forEach(r),On=c(t),Or=o(t,"P",{});var Kp=n(Or);rd=i(Kp,"Original paper can be found here."),Kp.forEach(r),kn=c(t),C=o(t,"DIV",{class:!0});var j=n(C);h(Mt.$$.fragment,j),sd=c(j),js=o(j,"P",{});var qp=n(js);od=i(qp,`Denoising diffusion implicit models is a scheduler that extends the denoising procedure introduced in denoising
diffusion probabilistic models (DDPMs) with non-Markovian guidance.`),qp.forEach(r),nd=c(j),x=o(j,"P",{});var q=n(x);kr=o(q,"A",{href:!0});var Hp=n(kr);ad=i(Hp,"~ConfigMixin"),Hp.forEach(r),id=i(q," takes care of storing all config attributes that are passed in the scheduler\u2019s "),Qs=o(q,"CODE",{});var Rp=n(Qs);dd=i(Rp,"__init__"),Rp.forEach(r),ld=i(q,`
function, such as `),Xs=o(q,"CODE",{});var Wp=n(Xs);cd=i(Wp,"num_train_timesteps"),Wp.forEach(r),fd=i(q,". They can be accessed via "),Zs=o(q,"CODE",{});var Up=n(Zs);ud=i(Up,"scheduler.config.num_train_timesteps"),Up.forEach(r),pd=i(q,`.
`),Cr=o(q,"A",{href:!0});var Bp=n(Cr);hd=i(Bp,"~ConfigMixin"),Bp.forEach(r),md=i(q," also provides general loading and saving functionality via the "),Vr=o(q,"A",{href:!0});var Gp=n(Vr);gd=i(Gp,"save_config()"),Gp.forEach(r),_d=i(q,` and
`),Ar=o(q,"A",{href:!0});var Yp=n(Ar);vd=i(Yp,"from_config()"),Yp.forEach(r),bd=i(q," functions."),q.forEach(r),Sd=c(j),Nr=o(j,"P",{});var Fu=n(Nr);$d=i(Fu,"For more details, see the original paper: "),Pt=o(Fu,"A",{href:!0,rel:!0});var zp=n(Pt);Dd=i(zp,"https://arxiv.org/abs/2010.02502"),zp.forEach(r),Fu.forEach(r),Ed=c(j),Le=o(j,"DIV",{class:!0});var ma=n(Le);h(Tt.$$.fragment,ma),xd=c(ma),eo=o(ma,"P",{});var Jp=n(eo);yd=i(Jp,"Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference."),Jp.forEach(r),ma.forEach(r),wd=c(j),Ie=o(j,"DIV",{class:!0});var ga=n(Ie);h(Ot.$$.fragment,ga),Md=c(ga),to=o(ga,"P",{});var jp=n(to);Pd=i(jp,`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),jp.forEach(r),ga.forEach(r),j.forEach(r),Cn=c(t),ge=o(t,"H4",{class:!0});var _a=n(ge);Fe=o(_a,"A",{id:!0,class:!0,href:!0});var Qp=n(Fe);ro=o(Qp,"SPAN",{});var Xp=n(ro);h(kt.$$.fragment,Xp),Xp.forEach(r),Qp.forEach(r),Td=c(_a),so=o(_a,"SPAN",{});var Zp=n(so);Od=i(Zp,"Denoising diffusion probabilistic models (DDPM)"),Zp.forEach(r),_a.forEach(r),Vn=c(t),Ke=o(t,"P",{});var va=n(Ke);kd=i(va,"Original paper can be found "),Ct=o(va,"A",{href:!0,rel:!0});var eh=n(Ct);Cd=i(eh,"here"),eh.forEach(r),Vd=i(va,"."),va.forEach(r),An=c(t),V=o(t,"DIV",{class:!0});var Q=n(V);h(Vt.$$.fragment,Q),Ad=c(Q),oo=o(Q,"P",{});var th=n(oo);Nd=i(th,`Denoising diffusion probabilistic models (DDPMs) explores the connections between denoising score matching and
Langevin dynamics sampling.`),th.forEach(r),Ld=c(Q),y=o(Q,"P",{});var H=n(y);Lr=o(H,"A",{href:!0});var rh=n(Lr);Id=i(rh,"~ConfigMixin"),rh.forEach(r),Fd=i(H," takes care of storing all config attributes that are passed in the scheduler\u2019s "),no=o(H,"CODE",{});var sh=n(no);Kd=i(sh,"__init__"),sh.forEach(r),qd=i(H,`
function, such as `),ao=o(H,"CODE",{});var oh=n(ao);Hd=i(oh,"num_train_timesteps"),oh.forEach(r),Rd=i(H,". They can be accessed via "),io=o(H,"CODE",{});var nh=n(io);Wd=i(nh,"scheduler.config.num_train_timesteps"),nh.forEach(r),Ud=i(H,`.
`),Ir=o(H,"A",{href:!0});var ah=n(Ir);Bd=i(ah,"~ConfigMixin"),ah.forEach(r),Gd=i(H," also provides general loading and saving functionality via the "),Fr=o(H,"A",{href:!0});var ih=n(Fr);Yd=i(ih,"save_config()"),ih.forEach(r),zd=i(H,` and
`),Kr=o(H,"A",{href:!0});var dh=n(Kr);Jd=i(dh,"from_config()"),dh.forEach(r),jd=i(H," functions."),H.forEach(r),Qd=c(Q),qr=o(Q,"P",{});var Ku=n(qr);Xd=i(Ku,"For more details, see the original paper: "),At=o(Ku,"A",{href:!0,rel:!0});var lh=n(At);Zd=i(lh,"https://arxiv.org/abs/2006.11239"),lh.forEach(r),Ku.forEach(r),el=c(Q),qe=o(Q,"DIV",{class:!0});var ba=n(qe);h(Nt.$$.fragment,ba),tl=c(ba),lo=o(ba,"P",{});var ch=n(lo);rl=i(ch,"Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference."),ch.forEach(r),ba.forEach(r),sl=c(Q),He=o(Q,"DIV",{class:!0});var Sa=n(He);h(Lt.$$.fragment,Sa),ol=c(Sa),co=o(Sa,"P",{});var fh=n(co);nl=i(fh,`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),fh.forEach(r),Sa.forEach(r),Q.forEach(r),Nn=c(t),_e=o(t,"H4",{class:!0});var $a=n(_e);Re=o($a,"A",{id:!0,class:!0,href:!0});var uh=n(Re);fo=o(uh,"SPAN",{});var ph=n(fo);h(It.$$.fragment,ph),ph.forEach(r),uh.forEach(r),al=c($a),uo=o($a,"SPAN",{});var hh=n(uo);il=i(hh,"Variance exploding, stochastic sampling from Karras et. al"),hh.forEach(r),$a.forEach(r),Ln=c(t),We=o(t,"P",{});var Da=n(We);dl=i(Da,"Original paper can be found "),Ft=o(Da,"A",{href:!0,rel:!0});var mh=n(Ft);ll=i(mh,"here"),mh.forEach(r),cl=i(Da,"."),Da.forEach(r),In=c(t),S=o(t,"DIV",{class:!0});var k=n(S);h(Kt.$$.fragment,k),fl=c(k),po=o(k,"P",{});var gh=n(po);ul=i(gh,`Stochastic sampling from Karras et al. [1] tailored to the Variance-Expanding (VE) models [2]. Use Algorithm 2 and
the VE column of Table 1 from [1] for reference.`),gh.forEach(r),pl=c(k),Ue=o(k,"P",{});var ln=n(Ue);hl=i(ln,`[1] Karras, Tero, et al. \u201CElucidating the Design Space of Diffusion-Based Generative Models.\u201D
`),qt=o(ln,"A",{href:!0,rel:!0});var _h=n(qt);ml=i(_h,"https://arxiv.org/abs/2206.00364"),_h.forEach(r),gl=i(ln,` [2] Song, Yang, et al. \u201CScore-based generative modeling through stochastic
differential equations.\u201D `),Ht=o(ln,"A",{href:!0,rel:!0});var vh=n(Ht);_l=i(vh,"https://arxiv.org/abs/2011.13456"),vh.forEach(r),ln.forEach(r),vl=c(k),w=o(k,"P",{});var R=n(w);Hr=o(R,"A",{href:!0});var bh=n(Hr);bl=i(bh,"~ConfigMixin"),bh.forEach(r),Sl=i(R," takes care of storing all config attributes that are passed in the scheduler\u2019s "),ho=o(R,"CODE",{});var Sh=n(ho);$l=i(Sh,"__init__"),Sh.forEach(r),Dl=i(R,`
function, such as `),mo=o(R,"CODE",{});var $h=n(mo);El=i($h,"num_train_timesteps"),$h.forEach(r),xl=i(R,". They can be accessed via "),go=o(R,"CODE",{});var Dh=n(go);yl=i(Dh,"scheduler.config.num_train_timesteps"),Dh.forEach(r),wl=i(R,`.
`),Rr=o(R,"A",{href:!0});var Eh=n(Rr);Ml=i(Eh,"~ConfigMixin"),Eh.forEach(r),Pl=i(R," also provides general loading and saving functionality via the "),Wr=o(R,"A",{href:!0});var xh=n(Wr);Tl=i(xh,"save_config()"),xh.forEach(r),Ol=i(R,` and
`),Ur=o(R,"A",{href:!0});var yh=n(Ur);kl=i(yh,"from_config()"),yh.forEach(r),Cl=i(R," functions."),R.forEach(r),Vl=c(k),Rt=o(k,"P",{});var Ea=n(Rt);Al=i(Ea,`For more details on the parameters, see the original paper\u2019s Appendix E.: \u201CElucidating the Design Space of
Diffusion-Based Generative Models.\u201D `),Wt=o(Ea,"A",{href:!0,rel:!0});var wh=n(Wt);Nl=i(wh,"https://arxiv.org/abs/2206.00364"),wh.forEach(r),Ll=i(Ea,`. The grid search values used to find the
optimal {s_noise, s_churn, s_min, s_max} for a specific model are described in Table 5 of the paper.`),Ea.forEach(r),Il=c(k),te=o(k,"DIV",{class:!0});var ps=n(te);h(Ut.$$.fragment,ps),Fl=c(ps),_o=o(ps,"P",{});var Mh=n(_o);Kl=i(Mh,`Explicit Langevin-like \u201Cchurn\u201D step of adding noise to the sample according to a factor gamma_i \u2265 0 to reach a
higher noise level sigma_hat = sigma_i + gamma_i*sigma_i.`),Mh.forEach(r),ql=c(ps),vo=o(ps,"P",{});var Ph=n(vo);Hl=i(Ph,"TODO Args:"),Ph.forEach(r),ps.forEach(r),Rl=c(k),Be=o(k,"DIV",{class:!0});var xa=n(Be);h(Bt.$$.fragment,xa),Wl=c(xa),bo=o(xa,"P",{});var Th=n(bo);Ul=i(Th,"Sets the continuous timesteps used for the diffusion chain. Supporting function to be run before inference."),Th.forEach(r),xa.forEach(r),Bl=c(k),Ge=o(k,"DIV",{class:!0});var ya=n(Ge);h(Gt.$$.fragment,ya),Gl=c(ya),So=o(ya,"P",{});var Oh=n(So);Yl=i(Oh,`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),Oh.forEach(r),ya.forEach(r),zl=c(k),Ye=o(k,"DIV",{class:!0});var wa=n(Ye);h(Yt.$$.fragment,wa),Jl=c(wa),$o=o(wa,"P",{});var kh=n($o);jl=i(kh,"Correct the predicted sample based on the output model_output of the network. TODO complete description"),kh.forEach(r),wa.forEach(r),k.forEach(r),Fn=c(t),ve=o(t,"H4",{class:!0});var Ma=n(ve);ze=o(Ma,"A",{id:!0,class:!0,href:!0});var Ch=n(ze);Do=o(Ch,"SPAN",{});var Vh=n(Do);h(zt.$$.fragment,Vh),Vh.forEach(r),Ch.forEach(r),Ql=c(Ma),Eo=o(Ma,"SPAN",{});var Ah=n(Eo);Xl=i(Ah,"Linear multistep scheduler for discrete beta schedules"),Ah.forEach(r),Ma.forEach(r),Kn=c(t),Je=o(t,"P",{});var Pa=n(Je);Zl=i(Pa,"Original implementation can be found "),Jt=o(Pa,"A",{href:!0,rel:!0});var Nh=n(Jt);ec=i(Nh,"here"),Nh.forEach(r),tc=i(Pa,"."),Pa.forEach(r),qn=c(t),A=o(t,"DIV",{class:!0});var X=n(A);h(jt.$$.fragment,X),rc=c(X),Br=o(X,"P",{});var qu=n(Br);sc=i(qu,`Linear Multistep Scheduler for discrete beta schedules. Based on the original k-diffusion implementation by
Katherine Crowson:
`),Qt=o(qu,"A",{href:!0,rel:!0});var Lh=n(Qt);oc=i(Lh,"https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L181"),Lh.forEach(r),qu.forEach(r),nc=c(X),M=o(X,"P",{});var W=n(M);Gr=o(W,"A",{href:!0});var Ih=n(Gr);ac=i(Ih,"~ConfigMixin"),Ih.forEach(r),ic=i(W," takes care of storing all config attributes that are passed in the scheduler\u2019s "),xo=o(W,"CODE",{});var Fh=n(xo);dc=i(Fh,"__init__"),Fh.forEach(r),lc=i(W,`
function, such as `),yo=o(W,"CODE",{});var Kh=n(yo);cc=i(Kh,"num_train_timesteps"),Kh.forEach(r),fc=i(W,". They can be accessed via "),wo=o(W,"CODE",{});var qh=n(wo);uc=i(qh,"scheduler.config.num_train_timesteps"),qh.forEach(r),pc=i(W,`.
`),Yr=o(W,"A",{href:!0});var Hh=n(Yr);hc=i(Hh,"~ConfigMixin"),Hh.forEach(r),mc=i(W," also provides general loading and saving functionality via the "),zr=o(W,"A",{href:!0});var Rh=n(zr);gc=i(Rh,"save_config()"),Rh.forEach(r),_c=i(W,` and
`),Jr=o(W,"A",{href:!0});var Wh=n(Jr);vc=i(Wh,"from_config()"),Wh.forEach(r),bc=i(W," functions."),W.forEach(r),Sc=c(X),je=o(X,"DIV",{class:!0});var Ta=n(je);h(Xt.$$.fragment,Ta),$c=c(Ta),Mo=o(Ta,"P",{});var Uh=n(Mo);Dc=i(Uh,"Compute a linear multistep coefficient."),Uh.forEach(r),Ta.forEach(r),Ec=c(X),Qe=o(X,"DIV",{class:!0});var Oa=n(Qe);h(Zt.$$.fragment,Oa),xc=c(Oa),Po=o(Oa,"P",{});var Bh=n(Po);yc=i(Bh,"Sets the timesteps used for the diffusion chain. Supporting function to be run before inference."),Bh.forEach(r),Oa.forEach(r),wc=c(X),Xe=o(X,"DIV",{class:!0});var ka=n(Xe);h(er.$$.fragment,ka),Mc=c(ka),To=o(ka,"P",{});var Gh=n(To);Pc=i(Gh,`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),Gh.forEach(r),ka.forEach(r),X.forEach(r),Hn=c(t),be=o(t,"H4",{class:!0});var Ca=n(be);Ze=o(Ca,"A",{id:!0,class:!0,href:!0});var Yh=n(Ze);Oo=o(Yh,"SPAN",{});var zh=n(Oo);h(tr.$$.fragment,zh),zh.forEach(r),Yh.forEach(r),Tc=c(Ca),ko=o(Ca,"SPAN",{});var Jh=n(ko);Oc=i(Jh,"Pseudo numerical methods for diffusion models (PNDM)"),Jh.forEach(r),Ca.forEach(r),Rn=c(t),et=o(t,"P",{});var Va=n(et);kc=i(Va,"Original implementation can be found "),rr=o(Va,"A",{href:!0,rel:!0});var jh=n(rr);Cc=i(jh,"here"),jh.forEach(r),Vc=i(Va,"."),Va.forEach(r),Wn=c(t),$=o(t,"DIV",{class:!0});var L=n($);h(sr.$$.fragment,L),Ac=c(L),Co=o(L,"P",{});var Qh=n(Co);Nc=i(Qh,`Pseudo numerical methods for diffusion models (PNDM) proposes using more advanced ODE integration techniques,
namely Runge-Kutta method and a linear multi-step method.`),Qh.forEach(r),Lc=c(L),P=o(L,"P",{});var U=n(P);jr=o(U,"A",{href:!0});var Xh=n(jr);Ic=i(Xh,"~ConfigMixin"),Xh.forEach(r),Fc=i(U," takes care of storing all config attributes that are passed in the scheduler\u2019s "),Vo=o(U,"CODE",{});var Zh=n(Vo);Kc=i(Zh,"__init__"),Zh.forEach(r),qc=i(U,`
function, such as `),Ao=o(U,"CODE",{});var em=n(Ao);Hc=i(em,"num_train_timesteps"),em.forEach(r),Rc=i(U,". They can be accessed via "),No=o(U,"CODE",{});var tm=n(No);Wc=i(tm,"scheduler.config.num_train_timesteps"),tm.forEach(r),Uc=i(U,`.
`),Qr=o(U,"A",{href:!0});var rm=n(Qr);Bc=i(rm,"~ConfigMixin"),rm.forEach(r),Gc=i(U," also provides general loading and saving functionality via the "),Xr=o(U,"A",{href:!0});var sm=n(Xr);Yc=i(sm,"save_config()"),sm.forEach(r),zc=i(U,` and
`),Zr=o(U,"A",{href:!0});var om=n(Zr);Jc=i(om,"from_config()"),om.forEach(r),jc=i(U," functions."),U.forEach(r),Qc=c(L),es=o(L,"P",{});var Hu=n(es);Xc=i(Hu,"For more details, see the original paper: "),or=o(Hu,"A",{href:!0,rel:!0});var nm=n(or);Zc=i(nm,"https://arxiv.org/abs/2202.09778"),nm.forEach(r),Hu.forEach(r),ef=c(L),tt=o(L,"DIV",{class:!0});var Aa=n(tt);h(nr.$$.fragment,Aa),tf=c(Aa),Lo=o(Aa,"P",{});var am=n(Lo);rf=i(am,"Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference."),am.forEach(r),Aa.forEach(r),sf=c(L),re=o(L,"DIV",{class:!0});var hs=n(re);h(ar.$$.fragment,hs),of=c(hs),Io=o(hs,"P",{});var im=n(Io);nf=i(im,`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),im.forEach(r),af=c(hs),Z=o(hs,"P",{});var ut=n(Z);df=i(ut,"This function calls "),Fo=o(ut,"CODE",{});var dm=n(Fo);lf=i(dm,"step_prk()"),dm.forEach(r),cf=i(ut," or "),Ko=o(ut,"CODE",{});var lm=n(Ko);ff=i(lm,"step_plms()"),lm.forEach(r),uf=i(ut," depending on the internal variable "),qo=o(ut,"CODE",{});var cm=n(qo);pf=i(cm,"counter"),cm.forEach(r),hf=i(ut,"."),ut.forEach(r),hs.forEach(r),mf=c(L),rt=o(L,"DIV",{class:!0});var Na=n(rt);h(ir.$$.fragment,Na),gf=c(Na),Ho=o(Na,"P",{});var fm=n(Ho);_f=i(fm,`Step function propagating the sample with the linear multi-step method. This has one forward pass with multiple
times to approximate the solution.`),fm.forEach(r),Na.forEach(r),vf=c(L),st=o(L,"DIV",{class:!0});var La=n(st);h(dr.$$.fragment,La),bf=c(La),Ro=o(La,"P",{});var um=n(Ro);Sf=i(um,`Step function propagating the sample with the Runge-Kutta method. RK takes 4 forward passes to approximate the
solution to the differential equation.`),um.forEach(r),La.forEach(r),L.forEach(r),Un=c(t),Se=o(t,"H4",{class:!0});var Ia=n(Se);ot=o(Ia,"A",{id:!0,class:!0,href:!0});var pm=n(ot);Wo=o(pm,"SPAN",{});var hm=n(Wo);h(lr.$$.fragment,hm),hm.forEach(r),pm.forEach(r),$f=c(Ia),Uo=o(Ia,"SPAN",{});var mm=n(Uo);Df=i(mm,"variance exploding stochastic differential equation (SDE) scheduler"),mm.forEach(r),Ia.forEach(r),Bn=c(t),nt=o(t,"P",{});var Fa=n(nt);Ef=i(Fa,"Original paper can be found "),cr=o(Fa,"A",{href:!0,rel:!0});var gm=n(cr);xf=i(gm,"here"),gm.forEach(r),yf=i(Fa,"."),Fa.forEach(r),Gn=c(t),D=o(t,"DIV",{class:!0});var I=n(D);h(fr.$$.fragment,I),wf=c(I),Bo=o(I,"P",{});var _m=n(Bo);Mf=i(_m,"The variance exploding stochastic differential equation (SDE) scheduler."),_m.forEach(r),Pf=c(I),ts=o(I,"P",{});var Ru=n(ts);Tf=i(Ru,"For more information, see the original paper: "),ur=o(Ru,"A",{href:!0,rel:!0});var vm=n(ur);Of=i(vm,"https://arxiv.org/abs/2011.13456"),vm.forEach(r),Ru.forEach(r),kf=c(I),T=o(I,"P",{});var B=n(T);rs=o(B,"A",{href:!0});var bm=n(rs);Cf=i(bm,"~ConfigMixin"),bm.forEach(r),Vf=i(B," takes care of storing all config attributes that are passed in the scheduler\u2019s "),Go=o(B,"CODE",{});var Sm=n(Go);Af=i(Sm,"__init__"),Sm.forEach(r),Nf=i(B,`
function, such as `),Yo=o(B,"CODE",{});var $m=n(Yo);Lf=i($m,"num_train_timesteps"),$m.forEach(r),If=i(B,". They can be accessed via "),zo=o(B,"CODE",{});var Dm=n(zo);Ff=i(Dm,"scheduler.config.num_train_timesteps"),Dm.forEach(r),Kf=i(B,`.
`),ss=o(B,"A",{href:!0});var Em=n(ss);qf=i(Em,"~ConfigMixin"),Em.forEach(r),Hf=i(B," also provides general loading and saving functionality via the "),os=o(B,"A",{href:!0});var xm=n(os);Rf=i(xm,"save_config()"),xm.forEach(r),Wf=i(B,` and
`),ns=o(B,"A",{href:!0});var ym=n(ns);Uf=i(ym,"from_config()"),ym.forEach(r),Bf=i(B," functions."),B.forEach(r),Gf=c(I),se=o(I,"DIV",{class:!0});var ms=n(se);h(pr.$$.fragment,ms),Yf=c(ms),Jo=o(ms,"P",{});var wm=n(Jo);zf=i(wm,"Sets the noise scales used for the diffusion chain. Supporting function to be run before inference."),wm.forEach(r),Jf=c(ms),$e=o(ms,"P",{});var gs=n($e);jf=i(gs,"The sigmas control the weight of the "),jo=o(gs,"CODE",{});var Mm=n(jo);Qf=i(Mm,"drift"),Mm.forEach(r),Xf=i(gs," and "),Qo=o(gs,"CODE",{});var Pm=n(Qo);Zf=i(Pm,"diffusion"),Pm.forEach(r),eu=i(gs," components of sample update."),gs.forEach(r),ms.forEach(r),tu=c(I),at=o(I,"DIV",{class:!0});var Ka=n(at);h(hr.$$.fragment,Ka),ru=c(Ka),Xo=o(Ka,"P",{});var Tm=n(Xo);su=i(Tm,"Sets the continuous timesteps used for the diffusion chain. Supporting function to be run before inference."),Tm.forEach(r),Ka.forEach(r),ou=c(I),it=o(I,"DIV",{class:!0});var qa=n(it);h(mr.$$.fragment,qa),nu=c(qa),Zo=o(qa,"P",{});var Om=n(Zo);au=i(Om,`Correct the predicted sample based on the output model_output of the network. This is often run repeatedly
after making the prediction for the previous timestep.`),Om.forEach(r),qa.forEach(r),iu=c(I),dt=o(I,"DIV",{class:!0});var Ha=n(dt);h(gr.$$.fragment,Ha),du=c(Ha),en=o(Ha,"P",{});var km=n(en);lu=i(km,`Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
process from the learned model outputs (most often the predicted noise).`),km.forEach(r),Ha.forEach(r),I.forEach(r),Yn=c(t),De=o(t,"H4",{class:!0});var Ra=n(De);lt=o(Ra,"A",{id:!0,class:!0,href:!0});var Cm=n(lt);tn=o(Cm,"SPAN",{});var Vm=n(tn);h(_r.$$.fragment,Vm),Vm.forEach(r),Cm.forEach(r),cu=c(Ra),rn=o(Ra,"SPAN",{});var Am=n(rn);fu=i(Am,"variance preserving stochastic differential equation (SDE) scheduler"),Am.forEach(r),Ra.forEach(r),zn=c(t),ct=o(t,"P",{});var Wa=n(ct);uu=i(Wa,"Original paper can be found "),vr=o(Wa,"A",{href:!0,rel:!0});var Nm=n(vr);pu=i(Nm,"here"),Nm.forEach(r),hu=i(Wa,"."),Wa.forEach(r),Jn=c(t),h(ft.$$.fragment,t),jn=c(t),K=o(t,"DIV",{class:!0});var oe=n(K);h(br.$$.fragment,oe),mu=c(oe),sn=o(oe,"P",{});var Lm=n(sn);gu=i(Lm,"The variance preserving stochastic differential equation (SDE) scheduler."),Lm.forEach(r),_u=c(oe),O=o(oe,"P",{});var G=n(O);as=o(G,"A",{href:!0});var Im=n(as);vu=i(Im,"~ConfigMixin"),Im.forEach(r),bu=i(G," takes care of storing all config attributes that are passed in the scheduler\u2019s "),on=o(G,"CODE",{});var Fm=n(on);Su=i(Fm,"__init__"),Fm.forEach(r),$u=i(G,`
function, such as `),nn=o(G,"CODE",{});var Km=n(nn);Du=i(Km,"num_train_timesteps"),Km.forEach(r),Eu=i(G,". They can be accessed via "),an=o(G,"CODE",{});var qm=n(an);xu=i(qm,"scheduler.config.num_train_timesteps"),qm.forEach(r),yu=i(G,`.
`),is=o(G,"A",{href:!0});var Hm=n(is);wu=i(Hm,"~ConfigMixin"),Hm.forEach(r),Mu=i(G," also provides general loading and saving functionality via the "),ds=o(G,"A",{href:!0});var Rm=n(ds);Pu=i(Rm,"save_config()"),Rm.forEach(r),Tu=i(G,` and
`),ls=o(G,"A",{href:!0});var Wm=n(ls);Ou=i(Wm,"from_config()"),Wm.forEach(r),ku=i(G," functions."),G.forEach(r),Cu=c(oe),cs=o(oe,"P",{});var Wu=n(cs);Vu=i(Wu,"For more information, see the original paper: "),Sr=o(Wu,"A",{href:!0,rel:!0});var Um=n(Sr);Au=i(Um,"https://arxiv.org/abs/2011.13456"),Um.forEach(r),Wu.forEach(r),Nu=c(oe),dn=o(oe,"P",{});var Bm=n(dn);Lu=i(Bm,"UNDER CONSTRUCTION"),Bm.forEach(r),oe.forEach(r),this.h()},h(){d(N,"name","hf:doc:metadata"),d(N,"content",JSON.stringify(eg)),d(J,"id","schedulers"),d(J,"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(J,"href","#schedulers"),d(F,"class","relative group"),d(xe,"id","what-is-a-scheduler"),d(xe,"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(xe,"href","#what-is-a-scheduler"),d(ne,"class","relative group"),d(Me,"id","discrete-versus-continuous-schedulers"),d(Me,"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(Me,"href","#discrete-versus-continuous-schedulers"),d(ie,"class","relative group"),d(xr,"href","/docs/diffusers/pr_649/en/api/schedulers#diffusers.DDPMScheduler"),d(yr,"href","/docs/diffusers/pr_649/en/api/schedulers#diffusers.PNDMScheduler"),d(wr,"href","/docs/diffusers/pr_649/en/api/schedulers#diffusers.ScoreSdeVeScheduler"),d(Pe,"id","designing-reusable-schedulers"),d(Pe,"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(Pe,"href","#designing-reusable-schedulers"),d(de,"class","relative group"),d(Oe,"id","api"),d(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"),d(Oe,"href","#api"),d(le,"class","relative group"),d(Tr,"href","/docs/diffusers/pr_649/en/api/schedulers#diffusers.SchedulerMixin"),d(Ce,"id","diffusers.SchedulerMixin"),d(Ce,"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(Ce,"href","#diffusers.SchedulerMixin"),d(ce,"class","relative group"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ve,"id","diffusers.schedulers.scheduling_utils.SchedulerOutput"),d(Ve,"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(Ve,"href","#diffusers.schedulers.scheduling_utils.SchedulerOutput"),d(ue,"class","relative group"),d(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ae,"id","implemented-schedulers"),d(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"),d(Ae,"href","#implemented-schedulers"),d(he,"class","relative group"),d(Ne,"id","diffusers.DDIMScheduler"),d(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"),d(Ne,"href","#diffusers.DDIMScheduler"),d(me,"class","relative group"),d(kr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Cr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Vr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(Ar,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(Pt,"href","https://arxiv.org/abs/2010.02502"),d(Pt,"rel","nofollow"),d(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Fe,"id","diffusers.DDPMScheduler"),d(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"),d(Fe,"href","#diffusers.DDPMScheduler"),d(ge,"class","relative group"),d(Ct,"href","https://arxiv.org/abs/2010.02502"),d(Ct,"rel","nofollow"),d(Lr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Ir,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Fr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(Kr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(At,"href","https://arxiv.org/abs/2006.11239"),d(At,"rel","nofollow"),d(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(He,"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(Re,"id","diffusers.KarrasVeScheduler"),d(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"),d(Re,"href","#diffusers.KarrasVeScheduler"),d(_e,"class","relative group"),d(Ft,"href","https://arxiv.org/abs/2006.11239"),d(Ft,"rel","nofollow"),d(qt,"href","https://arxiv.org/abs/2206.00364"),d(qt,"rel","nofollow"),d(Ht,"href","https://arxiv.org/abs/2011.13456"),d(Ht,"rel","nofollow"),d(Hr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Rr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Wr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(Ur,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(Wt,"href","https://arxiv.org/abs/2206.00364"),d(Wt,"rel","nofollow"),d(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ze,"id","diffusers.LMSDiscreteScheduler"),d(ze,"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(ze,"href","#diffusers.LMSDiscreteScheduler"),d(ve,"class","relative group"),d(Jt,"href","https://arxiv.org/abs/2206.00364"),d(Jt,"rel","nofollow"),d(Qt,"href","https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L181"),d(Qt,"rel","nofollow"),d(Gr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Yr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(zr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(Jr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ze,"id","diffusers.PNDMScheduler"),d(Ze,"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(Ze,"href","#diffusers.PNDMScheduler"),d(be,"class","relative group"),d(rr,"href","https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L181"),d(rr,"rel","nofollow"),d(jr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Qr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(Xr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(Zr,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(or,"href","https://arxiv.org/abs/2202.09778"),d(or,"rel","nofollow"),d(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ot,"id","diffusers.ScoreSdeVeScheduler"),d(ot,"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(ot,"href","#diffusers.ScoreSdeVeScheduler"),d(Se,"class","relative group"),d(cr,"href","https://arxiv.org/abs/2011.13456"),d(cr,"rel","nofollow"),d(ur,"href","https://arxiv.org/abs/2011.13456"),d(ur,"rel","nofollow"),d(rs,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(ss,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(os,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(ns,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(lt,"id","diffusers.schedulers.ScoreSdeVpScheduler"),d(lt,"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(lt,"href","#diffusers.schedulers.ScoreSdeVpScheduler"),d(De,"class","relative group"),d(vr,"href","https://arxiv.org/abs/2011.13456"),d(vr,"rel","nofollow"),d(as,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(is,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin"),d(ds,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.save_config"),d(ls,"href","/docs/diffusers/pr_649/en/api/configuration#diffusers.ConfigMixin.from_config"),d(Sr,"href","https://arxiv.org/abs/2011.13456"),d(Sr,"rel","nofollow"),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")},m(t,f){e(document.head,N),u(t,Ee,f),u(t,F,f),e(F,J),e(J,_s),m(pt,_s,null),e(F,Ua),e(F,vs),e(vs,Ba),u(t,fn,f),u(t,Dr,f),e(Dr,Ga),u(t,un,f),u(t,ne,f),e(ne,xe),e(xe,bs),m(ht,bs,null),e(ne,Ya),e(ne,Ss),e(Ss,za),u(t,pn,f),u(t,ye,f),e(ye,Ja),e(ye,$s),e($s,ja),e(ye,Qa),u(t,hn,f),u(t,we,f),e(we,Er),e(Er,Xa),e(Er,mt),e(mt,Ds),e(Ds,Za),e(mt,ei),e(mt,Es),e(Es,ti),e(we,ri),e(we,ae),e(ae,si),e(ae,xs),e(xs,oi),e(ae,ni),e(ae,ys),e(ys,ai),e(ae,ii),u(t,mn,f),u(t,ie,f),e(ie,Me),e(Me,ws),m(gt,ws,null),e(ie,di),e(ie,Ms),e(Ms,li),u(t,gn,f),u(t,E,f),e(E,ci),e(E,Ps),e(Ps,fi),e(E,ui),e(E,xr),e(xr,pi),e(E,hi),e(E,yr),e(yr,mi),e(E,gi),e(E,Ts),e(Ts,_i),e(E,vi),e(E,wr),e(wr,bi),e(E,Si),e(E,Os),e(Os,$i),e(E,Di),u(t,_n,f),u(t,de,f),e(de,Pe),e(Pe,ks),m(_t,ks,null),e(de,Ei),e(de,Cs),e(Cs,xi),u(t,vn,f),u(t,Mr,f),e(Mr,yi),u(t,bn,f),u(t,Te,f),e(Te,Vs),e(Vs,wi),e(Te,Mi),e(Te,As),e(As,Pi),u(t,Sn,f),u(t,le,f),e(le,Oe),e(Oe,Ns),m(vt,Ns,null),e(le,Ti),e(le,Ls),e(Ls,Oi),u(t,$n,f),u(t,Pr,f),e(Pr,ki),u(t,Dn,f),u(t,ee,f),e(ee,bt),e(bt,Ci),e(bt,Is),e(Is,Vi),e(bt,Ai),e(ee,Ni),e(ee,St),e(St,Li),e(St,Fs),e(Fs,Ii),e(St,Fi),e(ee,Ki),e(ee,Ks),e(Ks,qi),u(t,En,f),u(t,ke,f),e(ke,Hi),e(ke,Tr),e(Tr,Ri),e(ke,Wi),u(t,xn,f),u(t,ce,f),e(ce,Ce),e(Ce,qs),m($t,qs,null),e(ce,Ui),e(ce,Hs),e(Hs,Bi),u(t,yn,f),u(t,fe,f),m(Dt,fe,null),e(fe,Gi),e(fe,Rs),e(Rs,Yi),u(t,wn,f),u(t,ue,f),e(ue,Ve),e(Ve,Ws),m(Et,Ws,null),e(ue,zi),e(ue,Us),e(Us,Ji),u(t,Mn,f),u(t,pe,f),m(xt,pe,null),e(pe,ji),e(pe,Bs),e(Bs,Qi),u(t,Pn,f),u(t,he,f),e(he,Ae),e(Ae,Gs),m(yt,Gs,null),e(he,Xi),e(he,Ys),e(Ys,Zi),u(t,Tn,f),u(t,me,f),e(me,Ne),e(Ne,zs),m(wt,zs,null),e(me,ed),e(me,Js),e(Js,td),u(t,On,f),u(t,Or,f),e(Or,rd),u(t,kn,f),u(t,C,f),m(Mt,C,null),e(C,sd),e(C,js),e(js,od),e(C,nd),e(C,x),e(x,kr),e(kr,ad),e(x,id),e(x,Qs),e(Qs,dd),e(x,ld),e(x,Xs),e(Xs,cd),e(x,fd),e(x,Zs),e(Zs,ud),e(x,pd),e(x,Cr),e(Cr,hd),e(x,md),e(x,Vr),e(Vr,gd),e(x,_d),e(x,Ar),e(Ar,vd),e(x,bd),e(C,Sd),e(C,Nr),e(Nr,$d),e(Nr,Pt),e(Pt,Dd),e(C,Ed),e(C,Le),m(Tt,Le,null),e(Le,xd),e(Le,eo),e(eo,yd),e(C,wd),e(C,Ie),m(Ot,Ie,null),e(Ie,Md),e(Ie,to),e(to,Pd),u(t,Cn,f),u(t,ge,f),e(ge,Fe),e(Fe,ro),m(kt,ro,null),e(ge,Td),e(ge,so),e(so,Od),u(t,Vn,f),u(t,Ke,f),e(Ke,kd),e(Ke,Ct),e(Ct,Cd),e(Ke,Vd),u(t,An,f),u(t,V,f),m(Vt,V,null),e(V,Ad),e(V,oo),e(oo,Nd),e(V,Ld),e(V,y),e(y,Lr),e(Lr,Id),e(y,Fd),e(y,no),e(no,Kd),e(y,qd),e(y,ao),e(ao,Hd),e(y,Rd),e(y,io),e(io,Wd),e(y,Ud),e(y,Ir),e(Ir,Bd),e(y,Gd),e(y,Fr),e(Fr,Yd),e(y,zd),e(y,Kr),e(Kr,Jd),e(y,jd),e(V,Qd),e(V,qr),e(qr,Xd),e(qr,At),e(At,Zd),e(V,el),e(V,qe),m(Nt,qe,null),e(qe,tl),e(qe,lo),e(lo,rl),e(V,sl),e(V,He),m(Lt,He,null),e(He,ol),e(He,co),e(co,nl),u(t,Nn,f),u(t,_e,f),e(_e,Re),e(Re,fo),m(It,fo,null),e(_e,al),e(_e,uo),e(uo,il),u(t,Ln,f),u(t,We,f),e(We,dl),e(We,Ft),e(Ft,ll),e(We,cl),u(t,In,f),u(t,S,f),m(Kt,S,null),e(S,fl),e(S,po),e(po,ul),e(S,pl),e(S,Ue),e(Ue,hl),e(Ue,qt),e(qt,ml),e(Ue,gl),e(Ue,Ht),e(Ht,_l),e(S,vl),e(S,w),e(w,Hr),e(Hr,bl),e(w,Sl),e(w,ho),e(ho,$l),e(w,Dl),e(w,mo),e(mo,El),e(w,xl),e(w,go),e(go,yl),e(w,wl),e(w,Rr),e(Rr,Ml),e(w,Pl),e(w,Wr),e(Wr,Tl),e(w,Ol),e(w,Ur),e(Ur,kl),e(w,Cl),e(S,Vl),e(S,Rt),e(Rt,Al),e(Rt,Wt),e(Wt,Nl),e(Rt,Ll),e(S,Il),e(S,te),m(Ut,te,null),e(te,Fl),e(te,_o),e(_o,Kl),e(te,ql),e(te,vo),e(vo,Hl),e(S,Rl),e(S,Be),m(Bt,Be,null),e(Be,Wl),e(Be,bo),e(bo,Ul),e(S,Bl),e(S,Ge),m(Gt,Ge,null),e(Ge,Gl),e(Ge,So),e(So,Yl),e(S,zl),e(S,Ye),m(Yt,Ye,null),e(Ye,Jl),e(Ye,$o),e($o,jl),u(t,Fn,f),u(t,ve,f),e(ve,ze),e(ze,Do),m(zt,Do,null),e(ve,Ql),e(ve,Eo),e(Eo,Xl),u(t,Kn,f),u(t,Je,f),e(Je,Zl),e(Je,Jt),e(Jt,ec),e(Je,tc),u(t,qn,f),u(t,A,f),m(jt,A,null),e(A,rc),e(A,Br),e(Br,sc),e(Br,Qt),e(Qt,oc),e(A,nc),e(A,M),e(M,Gr),e(Gr,ac),e(M,ic),e(M,xo),e(xo,dc),e(M,lc),e(M,yo),e(yo,cc),e(M,fc),e(M,wo),e(wo,uc),e(M,pc),e(M,Yr),e(Yr,hc),e(M,mc),e(M,zr),e(zr,gc),e(M,_c),e(M,Jr),e(Jr,vc),e(M,bc),e(A,Sc),e(A,je),m(Xt,je,null),e(je,$c),e(je,Mo),e(Mo,Dc),e(A,Ec),e(A,Qe),m(Zt,Qe,null),e(Qe,xc),e(Qe,Po),e(Po,yc),e(A,wc),e(A,Xe),m(er,Xe,null),e(Xe,Mc),e(Xe,To),e(To,Pc),u(t,Hn,f),u(t,be,f),e(be,Ze),e(Ze,Oo),m(tr,Oo,null),e(be,Tc),e(be,ko),e(ko,Oc),u(t,Rn,f),u(t,et,f),e(et,kc),e(et,rr),e(rr,Cc),e(et,Vc),u(t,Wn,f),u(t,$,f),m(sr,$,null),e($,Ac),e($,Co),e(Co,Nc),e($,Lc),e($,P),e(P,jr),e(jr,Ic),e(P,Fc),e(P,Vo),e(Vo,Kc),e(P,qc),e(P,Ao),e(Ao,Hc),e(P,Rc),e(P,No),e(No,Wc),e(P,Uc),e(P,Qr),e(Qr,Bc),e(P,Gc),e(P,Xr),e(Xr,Yc),e(P,zc),e(P,Zr),e(Zr,Jc),e(P,jc),e($,Qc),e($,es),e(es,Xc),e(es,or),e(or,Zc),e($,ef),e($,tt),m(nr,tt,null),e(tt,tf),e(tt,Lo),e(Lo,rf),e($,sf),e($,re),m(ar,re,null),e(re,of),e(re,Io),e(Io,nf),e(re,af),e(re,Z),e(Z,df),e(Z,Fo),e(Fo,lf),e(Z,cf),e(Z,Ko),e(Ko,ff),e(Z,uf),e(Z,qo),e(qo,pf),e(Z,hf),e($,mf),e($,rt),m(ir,rt,null),e(rt,gf),e(rt,Ho),e(Ho,_f),e($,vf),e($,st),m(dr,st,null),e(st,bf),e(st,Ro),e(Ro,Sf),u(t,Un,f),u(t,Se,f),e(Se,ot),e(ot,Wo),m(lr,Wo,null),e(Se,$f),e(Se,Uo),e(Uo,Df),u(t,Bn,f),u(t,nt,f),e(nt,Ef),e(nt,cr),e(cr,xf),e(nt,yf),u(t,Gn,f),u(t,D,f),m(fr,D,null),e(D,wf),e(D,Bo),e(Bo,Mf),e(D,Pf),e(D,ts),e(ts,Tf),e(ts,ur),e(ur,Of),e(D,kf),e(D,T),e(T,rs),e(rs,Cf),e(T,Vf),e(T,Go),e(Go,Af),e(T,Nf),e(T,Yo),e(Yo,Lf),e(T,If),e(T,zo),e(zo,Ff),e(T,Kf),e(T,ss),e(ss,qf),e(T,Hf),e(T,os),e(os,Rf),e(T,Wf),e(T,ns),e(ns,Uf),e(T,Bf),e(D,Gf),e(D,se),m(pr,se,null),e(se,Yf),e(se,Jo),e(Jo,zf),e(se,Jf),e(se,$e),e($e,jf),e($e,jo),e(jo,Qf),e($e,Xf),e($e,Qo),e(Qo,Zf),e($e,eu),e(D,tu),e(D,at),m(hr,at,null),e(at,ru),e(at,Xo),e(Xo,su),e(D,ou),e(D,it),m(mr,it,null),e(it,nu),e(it,Zo),e(Zo,au),e(D,iu),e(D,dt),m(gr,dt,null),e(dt,du),e(dt,en),e(en,lu),u(t,Yn,f),u(t,De,f),e(De,lt),e(lt,tn),m(_r,tn,null),e(De,cu),e(De,rn),e(rn,fu),u(t,zn,f),u(t,ct,f),e(ct,uu),e(ct,vr),e(vr,pu),e(ct,hu),u(t,Jn,f),m(ft,t,f),u(t,jn,f),u(t,K,f),m(br,K,null),e(K,mu),e(K,sn),e(sn,gu),e(K,_u),e(K,O),e(O,as),e(as,vu),e(O,bu),e(O,on),e(on,Su),e(O,$u),e(O,nn),e(nn,Du),e(O,Eu),e(O,an),e(an,xu),e(O,yu),e(O,is),e(is,wu),e(O,Mu),e(O,ds),e(ds,Pu),e(O,Tu),e(O,ls),e(ls,Ou),e(O,ku),e(K,Cu),e(K,cs),e(cs,Vu),e(cs,Sr),e(Sr,Au),e(K,Nu),e(K,dn),e(dn,Lu),Qn=!0},p(t,[f]){const $r={};f&2&&($r.$$scope={dirty:f,ctx:t}),ft.$set($r)},i(t){Qn||(g(pt.$$.fragment,t),g(ht.$$.fragment,t),g(gt.$$.fragment,t),g(_t.$$.fragment,t),g(vt.$$.fragment,t),g($t.$$.fragment,t),g(Dt.$$.fragment,t),g(Et.$$.fragment,t),g(xt.$$.fragment,t),g(yt.$$.fragment,t),g(wt.$$.fragment,t),g(Mt.$$.fragment,t),g(Tt.$$.fragment,t),g(Ot.$$.fragment,t),g(kt.$$.fragment,t),g(Vt.$$.fragment,t),g(Nt.$$.fragment,t),g(Lt.$$.fragment,t),g(It.$$.fragment,t),g(Kt.$$.fragment,t),g(Ut.$$.fragment,t),g(Bt.$$.fragment,t),g(Gt.$$.fragment,t),g(Yt.$$.fragment,t),g(zt.$$.fragment,t),g(jt.$$.fragment,t),g(Xt.$$.fragment,t),g(Zt.$$.fragment,t),g(er.$$.fragment,t),g(tr.$$.fragment,t),g(sr.$$.fragment,t),g(nr.$$.fragment,t),g(ar.$$.fragment,t),g(ir.$$.fragment,t),g(dr.$$.fragment,t),g(lr.$$.fragment,t),g(fr.$$.fragment,t),g(pr.$$.fragment,t),g(hr.$$.fragment,t),g(mr.$$.fragment,t),g(gr.$$.fragment,t),g(_r.$$.fragment,t),g(ft.$$.fragment,t),g(br.$$.fragment,t),Qn=!0)},o(t){_(pt.$$.fragment,t),_(ht.$$.fragment,t),_(gt.$$.fragment,t),_(_t.$$.fragment,t),_(vt.$$.fragment,t),_($t.$$.fragment,t),_(Dt.$$.fragment,t),_(Et.$$.fragment,t),_(xt.$$.fragment,t),_(yt.$$.fragment,t),_(wt.$$.fragment,t),_(Mt.$$.fragment,t),_(Tt.$$.fragment,t),_(Ot.$$.fragment,t),_(kt.$$.fragment,t),_(Vt.$$.fragment,t),_(Nt.$$.fragment,t),_(Lt.$$.fragment,t),_(It.$$.fragment,t),_(Kt.$$.fragment,t),_(Ut.$$.fragment,t),_(Bt.$$.fragment,t),_(Gt.$$.fragment,t),_(Yt.$$.fragment,t),_(zt.$$.fragment,t),_(jt.$$.fragment,t),_(Xt.$$.fragment,t),_(Zt.$$.fragment,t),_(er.$$.fragment,t),_(tr.$$.fragment,t),_(sr.$$.fragment,t),_(nr.$$.fragment,t),_(ar.$$.fragment,t),_(ir.$$.fragment,t),_(dr.$$.fragment,t),_(lr.$$.fragment,t),_(fr.$$.fragment,t),_(pr.$$.fragment,t),_(hr.$$.fragment,t),_(mr.$$.fragment,t),_(gr.$$.fragment,t),_(_r.$$.fragment,t),_(ft.$$.fragment,t),_(br.$$.fragment,t),Qn=!1},d(t){r(N),t&&r(Ee),t&&r(F),v(pt),t&&r(fn),t&&r(Dr),t&&r(un),t&&r(ne),v(ht),t&&r(pn),t&&r(ye),t&&r(hn),t&&r(we),t&&r(mn),t&&r(ie),v(gt),t&&r(gn),t&&r(E),t&&r(_n),t&&r(de),v(_t),t&&r(vn),t&&r(Mr),t&&r(bn),t&&r(Te),t&&r(Sn),t&&r(le),v(vt),t&&r($n),t&&r(Pr),t&&r(Dn),t&&r(ee),t&&r(En),t&&r(ke),t&&r(xn),t&&r(ce),v($t),t&&r(yn),t&&r(fe),v(Dt),t&&r(wn),t&&r(ue),v(Et),t&&r(Mn),t&&r(pe),v(xt),t&&r(Pn),t&&r(he),v(yt),t&&r(Tn),t&&r(me),v(wt),t&&r(On),t&&r(Or),t&&r(kn),t&&r(C),v(Mt),v(Tt),v(Ot),t&&r(Cn),t&&r(ge),v(kt),t&&r(Vn),t&&r(Ke),t&&r(An),t&&r(V),v(Vt),v(Nt),v(Lt),t&&r(Nn),t&&r(_e),v(It),t&&r(Ln),t&&r(We),t&&r(In),t&&r(S),v(Kt),v(Ut),v(Bt),v(Gt),v(Yt),t&&r(Fn),t&&r(ve),v(zt),t&&r(Kn),t&&r(Je),t&&r(qn),t&&r(A),v(jt),v(Xt),v(Zt),v(er),t&&r(Hn),t&&r(be),v(tr),t&&r(Rn),t&&r(et),t&&r(Wn),t&&r($),v(sr),v(nr),v(ar),v(ir),v(dr),t&&r(Un),t&&r(Se),v(lr),t&&r(Bn),t&&r(nt),t&&r(Gn),t&&r(D),v(fr),v(pr),v(hr),v(mr),v(gr),t&&r(Yn),t&&r(De),v(_r),t&&r(zn),t&&r(ct),t&&r(Jn),v(ft,t),t&&r(jn),t&&r(K),v(br)}}}const eg={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:"api",sections:[{local:"diffusers.SchedulerMixin",title:"SchedulerMixin"},{local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",title:"SchedulerOutput"},{local:"implemented-schedulers",sections:[{local:"diffusers.DDIMScheduler",title:"Denoising diffusion implicit models (DDIM)"},{local:"diffusers.DDPMScheduler",title:"Denoising diffusion probabilistic models (DDPM)"},{local:"diffusers.KarrasVeScheduler",title:"Variance exploding, stochastic sampling from Karras et. al"},{local:"diffusers.LMSDiscreteScheduler",title:"Linear multistep scheduler for discrete beta schedules"},{local:"diffusers.PNDMScheduler",title:"Pseudo numerical methods for diffusion models (PNDM)"},{local:"diffusers.ScoreSdeVeScheduler",title:"variance exploding stochastic differential equation (SDE) scheduler"},{local:"diffusers.schedulers.ScoreSdeVpScheduler",title:"variance preserving stochastic differential equation (SDE) scheduler"}],title:"Implemented Schedulers"}],title:"API"}],title:"Schedulers"};function tg(cn){return jm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ag extends Gm{constructor(N){super();Ym(this,N,tg,Zm,zm,{})}}export{ag as default,eg as metadata};
