import{S as bt,i as $t,s as St,e as s,k as l,w as E,t as a,M as yt,c as n,d as r,m as u,a as o,x as N,h as d,b as i,G as t,g as f,y as x,L as Pt,q as T,o as O,B as k,v as wt}from"../../../chunks/vendor-hf-doc-builder.js";import{D as ie}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as Ze}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Dt(et){let m,ae,g,y,W,A,ye,j,Pe,de,v,K,we,De,L,Ie,Me,le,_,P,Q,C,Ee,X,Ne,ue,c,F,xe,Y,Te,Oe,b,ke,G,Ae,Le,J,Ce,Fe,Ve,w,V,qe,Z,Be,He,D,q,Ue,ee,ze,Ge,I,B,Je,te,Re,ce,$,M,re,H,We,se,je,pe,S,U,Ke,z,Qe,ne,Xe,Ye,he;return A=new Ze({}),C=new Ze({}),F=new ie({props:{name:"class diffusers.IPNDMScheduler",anchor:"diffusers.IPNDMScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"trained_betas",val:": typing.Union[numpy.ndarray, typing.List[float], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.num_train_timesteps",description:`<strong>num_train_timesteps</strong> (<code>int</code>, defaults to 1000) &#x2014;
The number of diffusion steps to train the model.`,name:"num_train_timesteps"},{anchor:"diffusers.IPNDMScheduler.trained_betas",description:`<strong>trained_betas</strong> (<code>np.ndarray</code>, <em>optional</em>) &#x2014;
Pass an array of betas directly to the constructor to bypass <code>beta_start</code> and <code>beta_end</code>.`,name:"trained_betas"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ipndm.py#L25"}}),V=new ie({props:{name:"scale_model_input",anchor:"diffusers.IPNDMScheduler.scale_model_input",parameters:[{name:"sample",val:": FloatTensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
The input sample.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ipndm.py#L170",returnDescription:`
<p>A scaled input sample.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),q=new ie({props:{name:"set_timesteps",anchor:"diffusers.IPNDMScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"device",val:": typing.Union[str, torch.device] = None"}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.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.IPNDMScheduler.set_timesteps.device",description:`<strong>device</strong> (<code>str</code> or <code>torch.device</code>, <em>optional</em>) &#x2014;
The device to which the timesteps should be moved to. If <code>None</code>, the timesteps are not moved.`,name:"device"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ipndm.py#L67"}}),B=new ie({props:{name:"step",anchor:"diffusers.IPNDMScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.step.model_output",description:`<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014;
The direct output from learned diffusion model.`,name:"model_output"},{anchor:"diffusers.IPNDMScheduler.step.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.IPNDMScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
A current instance of a sample created by the diffusion process.`,name:"sample"},{anchor:"diffusers.IPNDMScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/main/en/api/schedulers/singlestep_dpm_solver#diffusers.schedulers.scheduling_utils.SchedulerOutput">SchedulerOutput</a> or tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ipndm.py#L112",returnDescription:`
<p>If return_dict is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/schedulers/singlestep_dpm_solver#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> is returned, otherwise a
tuple is returned where the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/schedulers/singlestep_dpm_solver#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),H=new Ze({}),U=new ie({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 <code>(x_{t-1})</code> 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/main/src/diffusers/schedulers/scheduling_utils.py#L50"}}),{c(){m=s("meta"),ae=l(),g=s("h1"),y=s("a"),W=s("span"),E(A.$$.fragment),ye=l(),j=s("span"),Pe=a("IPNDMScheduler"),de=l(),v=s("p"),K=s("code"),we=a("IPNDMScheduler"),De=a(" is a fourth-order Improved Pseudo Linear Multistep scheduler. The original implementation can be found at "),L=s("a"),Ie=a("crowsonkb/v-diffusion-pytorch"),Me=a("."),le=l(),_=s("h2"),P=s("a"),Q=s("span"),E(C.$$.fragment),Ee=l(),X=s("span"),Ne=a("IPNDMScheduler"),ue=l(),c=s("div"),E(F.$$.fragment),xe=l(),Y=s("p"),Te=a("A fourth-order Improved Pseudo Linear Multistep scheduler."),Oe=l(),b=s("p"),ke=a("This model inherits from "),G=s("a"),Ae=a("SchedulerMixin"),Le=a(" and "),J=s("a"),Ce=a("ConfigMixin"),Fe=a(`. Check the superclass documentation for the generic
methods the library implements for all schedulers such as loading and saving.`),Ve=l(),w=s("div"),E(V.$$.fragment),qe=l(),Z=s("p"),Be=a(`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`),He=l(),D=s("div"),E(q.$$.fragment),Ue=l(),ee=s("p"),ze=a("Sets the discrete timesteps used for the diffusion chain (to be run before inference)."),Ge=l(),I=s("div"),E(B.$$.fragment),Je=l(),te=s("p"),Re=a(`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the linear multistep method. It performs one forward pass multiple times to approximate the solution.`),ce=l(),$=s("h2"),M=s("a"),re=s("span"),E(H.$$.fragment),We=l(),se=s("span"),je=a("SchedulerOutput"),pe=l(),S=s("div"),E(U.$$.fragment),Ke=l(),z=s("p"),Qe=a("Base class for the output of a scheduler\u2019s "),ne=s("code"),Xe=a("step"),Ye=a(" function."),this.h()},l(e){const p=yt('[data-svelte="svelte-1phssyn"]',document.head);m=n(p,"META",{name:!0,content:!0}),p.forEach(r),ae=u(e),g=n(e,"H1",{class:!0});var fe=o(g);y=n(fe,"A",{id:!0,class:!0,href:!0});var tt=o(y);W=n(tt,"SPAN",{});var rt=o(W);N(A.$$.fragment,rt),rt.forEach(r),tt.forEach(r),ye=u(fe),j=n(fe,"SPAN",{});var st=o(j);Pe=d(st,"IPNDMScheduler"),st.forEach(r),fe.forEach(r),de=u(e),v=n(e,"P",{});var oe=o(v);K=n(oe,"CODE",{});var nt=o(K);we=d(nt,"IPNDMScheduler"),nt.forEach(r),De=d(oe," is a fourth-order Improved Pseudo Linear Multistep scheduler. The original implementation can be found at "),L=n(oe,"A",{href:!0,rel:!0});var ot=o(L);Ie=d(ot,"crowsonkb/v-diffusion-pytorch"),ot.forEach(r),Me=d(oe,"."),oe.forEach(r),le=u(e),_=n(e,"H2",{class:!0});var me=o(_);P=n(me,"A",{id:!0,class:!0,href:!0});var it=o(P);Q=n(it,"SPAN",{});var at=o(Q);N(C.$$.fragment,at),at.forEach(r),it.forEach(r),Ee=u(me),X=n(me,"SPAN",{});var dt=o(X);Ne=d(dt,"IPNDMScheduler"),dt.forEach(r),me.forEach(r),ue=u(e),c=n(e,"DIV",{class:!0});var h=o(c);N(F.$$.fragment,h),xe=u(h),Y=n(h,"P",{});var lt=o(Y);Te=d(lt,"A fourth-order Improved Pseudo Linear Multistep scheduler."),lt.forEach(r),Oe=u(h),b=n(h,"P",{});var R=o(b);ke=d(R,"This model inherits from "),G=n(R,"A",{href:!0});var ut=o(G);Ae=d(ut,"SchedulerMixin"),ut.forEach(r),Le=d(R," and "),J=n(R,"A",{href:!0});var ct=o(J);Ce=d(ct,"ConfigMixin"),ct.forEach(r),Fe=d(R,`. Check the superclass documentation for the generic
methods the library implements for all schedulers such as loading and saving.`),R.forEach(r),Ve=u(h),w=n(h,"DIV",{class:!0});var ge=o(w);N(V.$$.fragment,ge),qe=u(ge),Z=n(ge,"P",{});var pt=o(Z);Be=d(pt,`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`),pt.forEach(r),ge.forEach(r),He=u(h),D=n(h,"DIV",{class:!0});var ve=o(D);N(q.$$.fragment,ve),Ue=u(ve),ee=n(ve,"P",{});var ht=o(ee);ze=d(ht,"Sets the discrete timesteps used for the diffusion chain (to be run before inference)."),ht.forEach(r),ve.forEach(r),Ge=u(h),I=n(h,"DIV",{class:!0});var _e=o(I);N(B.$$.fragment,_e),Je=u(_e),te=n(_e,"P",{});var ft=o(te);Re=d(ft,`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the linear multistep method. It performs one forward pass multiple times to approximate the solution.`),ft.forEach(r),_e.forEach(r),h.forEach(r),ce=u(e),$=n(e,"H2",{class:!0});var be=o($);M=n(be,"A",{id:!0,class:!0,href:!0});var mt=o(M);re=n(mt,"SPAN",{});var gt=o(re);N(H.$$.fragment,gt),gt.forEach(r),mt.forEach(r),We=u(be),se=n(be,"SPAN",{});var vt=o(se);je=d(vt,"SchedulerOutput"),vt.forEach(r),be.forEach(r),pe=u(e),S=n(e,"DIV",{class:!0});var $e=o(S);N(U.$$.fragment,$e),Ke=u($e),z=n($e,"P",{});var Se=o(z);Qe=d(Se,"Base class for the output of a scheduler\u2019s "),ne=n(Se,"CODE",{});var _t=o(ne);Xe=d(_t,"step"),_t.forEach(r),Ye=d(Se," function."),Se.forEach(r),$e.forEach(r),this.h()},h(){i(m,"name","hf:doc:metadata"),i(m,"content",JSON.stringify(It)),i(y,"id","ipndmscheduler"),i(y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(y,"href","#ipndmscheduler"),i(g,"class","relative group"),i(L,"href","https://github.com/crowsonkb/v-diffusion-pytorch/blob/987f8985e38208345c1959b0ea767a625831cc9b/diffusion/sampling.py#L296"),i(L,"rel","nofollow"),i(P,"id","diffusers.IPNDMScheduler"),i(P,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(P,"href","#diffusers.IPNDMScheduler"),i(_,"class","relative group"),i(G,"href","/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin"),i(J,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin"),i(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(M,"id","diffusers.schedulers.scheduling_utils.SchedulerOutput"),i(M,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(M,"href","#diffusers.schedulers.scheduling_utils.SchedulerOutput"),i($,"class","relative group"),i(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,p){t(document.head,m),f(e,ae,p),f(e,g,p),t(g,y),t(y,W),x(A,W,null),t(g,ye),t(g,j),t(j,Pe),f(e,de,p),f(e,v,p),t(v,K),t(K,we),t(v,De),t(v,L),t(L,Ie),t(v,Me),f(e,le,p),f(e,_,p),t(_,P),t(P,Q),x(C,Q,null),t(_,Ee),t(_,X),t(X,Ne),f(e,ue,p),f(e,c,p),x(F,c,null),t(c,xe),t(c,Y),t(Y,Te),t(c,Oe),t(c,b),t(b,ke),t(b,G),t(G,Ae),t(b,Le),t(b,J),t(J,Ce),t(b,Fe),t(c,Ve),t(c,w),x(V,w,null),t(w,qe),t(w,Z),t(Z,Be),t(c,He),t(c,D),x(q,D,null),t(D,Ue),t(D,ee),t(ee,ze),t(c,Ge),t(c,I),x(B,I,null),t(I,Je),t(I,te),t(te,Re),f(e,ce,p),f(e,$,p),t($,M),t(M,re),x(H,re,null),t($,We),t($,se),t(se,je),f(e,pe,p),f(e,S,p),x(U,S,null),t(S,Ke),t(S,z),t(z,Qe),t(z,ne),t(ne,Xe),t(z,Ye),he=!0},p:Pt,i(e){he||(T(A.$$.fragment,e),T(C.$$.fragment,e),T(F.$$.fragment,e),T(V.$$.fragment,e),T(q.$$.fragment,e),T(B.$$.fragment,e),T(H.$$.fragment,e),T(U.$$.fragment,e),he=!0)},o(e){O(A.$$.fragment,e),O(C.$$.fragment,e),O(F.$$.fragment,e),O(V.$$.fragment,e),O(q.$$.fragment,e),O(B.$$.fragment,e),O(H.$$.fragment,e),O(U.$$.fragment,e),he=!1},d(e){r(m),e&&r(ae),e&&r(g),k(A),e&&r(de),e&&r(v),e&&r(le),e&&r(_),k(C),e&&r(ue),e&&r(c),k(F),k(V),k(q),k(B),e&&r(ce),e&&r($),k(H),e&&r(pe),e&&r(S),k(U)}}}const It={local:"ipndmscheduler",sections:[{local:"diffusers.IPNDMScheduler",title:"IPNDMScheduler"},{local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",title:"SchedulerOutput"}],title:"IPNDMScheduler"};function Mt(et){return wt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tt extends bt{constructor(m){super();$t(this,m,Mt,Dt,St,{})}}export{Tt as default,It as metadata};
