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