import{s as Te,n as we,o as ye}from"../chunks/scheduler.182ea377.js";import{S as Ne,i as Ce,g as d,s as i,r as m,A as Le,h as a,f as t,c as o,j as P,u as f,x as D,k as M,y as s,a as l,v as h,d as g,t as _,w as v}from"../chunks/index.abf12888.js";import{D as q}from"../chunks/Docstring.93f6f462.js";import{H as _e}from"../chunks/Heading.16916d63.js";function Oe(ve){let c,W,B,G,I,J,T,be='<code>IPNDMScheduler</code> is a fourth-order Improved Pseudo Linear Multistep scheduler. The original implementation can be found at <a href="https://github.com/crowsonkb/v-diffusion-pytorch/blob/987f8985e38208345c1959b0ea767a625831cc9b/diffusion/sampling.py#L296" rel="nofollow">crowsonkb/v-diffusion-pytorch</a>.',K,w,Q,r,y,oe,F,$e="A fourth-order Improved Pseudo Linear Multistep scheduler.",de,H,xe=`This model inherits from <a href="/docs/diffusers/v0.27.2/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/v0.27.2/en/api/configuration#diffusers.ConfigMixin">ConfigMixin</a>. Check the superclass documentation for the generic
methods the library implements for all schedulers such as loading and saving.`,ae,b,N,ue,V,Se=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,le,$,C,ce,A,Pe="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",pe,x,L,me,z,De="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",fe,S,O,he,U,Me=`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.`,X,E,Y,p,k,ge,j,Ie="Base class for the output of a scheduler’s <code>step</code> function.",Z,R,ee;return I=new _e({props:{title:"IPNDMScheduler",local:"ipndmscheduler",headingTag:"h1"}}),w=new _e({props:{title:"IPNDMScheduler",local:"diffusers.IPNDMScheduler",headingTag:"h2"}}),y=new q({props:{name:"class diffusers.IPNDMScheduler",anchor:"diffusers.IPNDMScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"trained_betas",val:": Union = 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/v0.27.2/src/diffusers/schedulers/scheduling_ipndm.py#L25"}}),N=new q({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/v0.27.2/src/diffusers/schedulers/scheduling_ipndm.py#L196",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A scaled input sample.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),C=new q({props:{name:"set_begin_index",anchor:"diffusers.IPNDMScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.set_begin_index.begin_index",description:`<strong>begin_index</strong> (<code>int</code>) &#x2014;
The begin index for the scheduler.`,name:"begin_index"}],source:"https://github.com/huggingface/diffusers/blob/v0.27.2/src/diffusers/schedulers/scheduling_ipndm.py#L76"}}),L=new q({props:{name:"set_timesteps",anchor:"diffusers.IPNDMScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"device",val:": Union = 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/v0.27.2/src/diffusers/schedulers/scheduling_ipndm.py#L86"}}),O=new q({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/v0.27.2/en/api/schedulers/overview#diffusers.schedulers.scheduling_utils.SchedulerOutput">SchedulerOutput</a> or tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.27.2/src/diffusers/schedulers/scheduling_ipndm.py#L138",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If return_dict is <code>True</code>, <a
  href="/docs/diffusers/v0.27.2/en/api/schedulers/overview#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> is returned, otherwise a
tuple is returned where the first element is the sample tensor.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/v0.27.2/en/api/schedulers/overview#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),E=new _e({props:{title:"SchedulerOutput",local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",headingTag:"h2"}}),k=new q({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/v0.27.2/src/diffusers/schedulers/scheduling_utils.py#L51"}}),{c(){c=d("meta"),W=i(),B=d("p"),G=i(),m(I.$$.fragment),J=i(),T=d("p"),T.innerHTML=be,K=i(),m(w.$$.fragment),Q=i(),r=d("div"),m(y.$$.fragment),oe=i(),F=d("p"),F.textContent=$e,de=i(),H=d("p"),H.innerHTML=xe,ae=i(),b=d("div"),m(N.$$.fragment),ue=i(),V=d("p"),V.textContent=Se,le=i(),$=d("div"),m(C.$$.fragment),ce=i(),A=d("p"),A.textContent=Pe,pe=i(),x=d("div"),m(L.$$.fragment),me=i(),z=d("p"),z.textContent=De,fe=i(),S=d("div"),m(O.$$.fragment),he=i(),U=d("p"),U.textContent=Me,X=i(),m(E.$$.fragment),Y=i(),p=d("div"),m(k.$$.fragment),ge=i(),j=d("p"),j.innerHTML=Ie,Z=i(),R=d("p"),this.h()},l(e){const n=Le("svelte-u9bgzb",document.head);c=a(n,"META",{name:!0,content:!0}),n.forEach(t),W=o(e),B=a(e,"P",{}),P(B).forEach(t),G=o(e),f(I.$$.fragment,e),J=o(e),T=a(e,"P",{"data-svelte-h":!0}),D(T)!=="svelte-z0ks0i"&&(T.innerHTML=be),K=o(e),f(w.$$.fragment,e),Q=o(e),r=a(e,"DIV",{class:!0});var u=P(r);f(y.$$.fragment,u),oe=o(u),F=a(u,"P",{"data-svelte-h":!0}),D(F)!=="svelte-uir5v"&&(F.textContent=$e),de=o(u),H=a(u,"P",{"data-svelte-h":!0}),D(H)!=="svelte-50bukd"&&(H.innerHTML=xe),ae=o(u),b=a(u,"DIV",{class:!0});var te=P(b);f(N.$$.fragment,te),ue=o(te),V=a(te,"P",{"data-svelte-h":!0}),D(V)!=="svelte-1rkfgpx"&&(V.textContent=Se),te.forEach(t),le=o(u),$=a(u,"DIV",{class:!0});var se=P($);f(C.$$.fragment,se),ce=o(se),A=a(se,"P",{"data-svelte-h":!0}),D(A)!=="svelte-1k141rk"&&(A.textContent=Pe),se.forEach(t),pe=o(u),x=a(u,"DIV",{class:!0});var re=P(x);f(L.$$.fragment,re),me=o(re),z=a(re,"P",{"data-svelte-h":!0}),D(z)!=="svelte-1vzm9q"&&(z.textContent=De),re.forEach(t),fe=o(u),S=a(u,"DIV",{class:!0});var ne=P(S);f(O.$$.fragment,ne),he=o(ne),U=a(ne,"P",{"data-svelte-h":!0}),D(U)!=="svelte-1n4l8et"&&(U.textContent=Me),ne.forEach(t),u.forEach(t),X=o(e),f(E.$$.fragment,e),Y=o(e),p=a(e,"DIV",{class:!0});var ie=P(p);f(k.$$.fragment,ie),ge=o(ie),j=a(ie,"P",{"data-svelte-h":!0}),D(j)!=="svelte-6ojmkw"&&(j.innerHTML=Ie),ie.forEach(t),Z=o(e),R=a(e,"P",{}),P(R).forEach(t),this.h()},h(){M(c,"name","hf:doc:metadata"),M(c,"content",Ee),M(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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(r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(p,"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,n){s(document.head,c),l(e,W,n),l(e,B,n),l(e,G,n),h(I,e,n),l(e,J,n),l(e,T,n),l(e,K,n),h(w,e,n),l(e,Q,n),l(e,r,n),h(y,r,null),s(r,oe),s(r,F),s(r,de),s(r,H),s(r,ae),s(r,b),h(N,b,null),s(b,ue),s(b,V),s(r,le),s(r,$),h(C,$,null),s($,ce),s($,A),s(r,pe),s(r,x),h(L,x,null),s(x,me),s(x,z),s(r,fe),s(r,S),h(O,S,null),s(S,he),s(S,U),l(e,X,n),h(E,e,n),l(e,Y,n),l(e,p,n),h(k,p,null),s(p,ge),s(p,j),l(e,Z,n),l(e,R,n),ee=!0},p:we,i(e){ee||(g(I.$$.fragment,e),g(w.$$.fragment,e),g(y.$$.fragment,e),g(N.$$.fragment,e),g(C.$$.fragment,e),g(L.$$.fragment,e),g(O.$$.fragment,e),g(E.$$.fragment,e),g(k.$$.fragment,e),ee=!0)},o(e){_(I.$$.fragment,e),_(w.$$.fragment,e),_(y.$$.fragment,e),_(N.$$.fragment,e),_(C.$$.fragment,e),_(L.$$.fragment,e),_(O.$$.fragment,e),_(E.$$.fragment,e),_(k.$$.fragment,e),ee=!1},d(e){e&&(t(W),t(B),t(G),t(J),t(T),t(K),t(Q),t(r),t(X),t(Y),t(p),t(Z),t(R)),t(c),v(I,e),v(w,e),v(y),v(N),v(C),v(L),v(O),v(E,e),v(k)}}}const Ee='{"title":"IPNDMScheduler","local":"ipndmscheduler","sections":[{"title":"IPNDMScheduler","local":"diffusers.IPNDMScheduler","sections":[],"depth":2},{"title":"SchedulerOutput","local":"diffusers.schedulers.scheduling_utils.SchedulerOutput","sections":[],"depth":2}],"depth":1}';function ke(ve){return ye(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ze extends Ne{constructor(c){super(),Ce(this,c,ke,Oe,Te,{})}}export{ze as component};
