import{s as $e,n as xe,o as Se}from"../chunks/scheduler.182ea377.js";import{S as Pe,i as De,g as d,s as i,r as g,A as Me,h as a,f as t,c as o,j as C,u as _,x as L,k as O,y as r,a as u,v,d as b,t as $,w as x}from"../chunks/index.abf12888.js";import{D as U}from"../chunks/Docstring.93f6f462.js";import{H as le}from"../chunks/Heading.16916d63.js";function Te(pe){let l,j,z,B,S,R,P,me='<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>.',W,D,G,n,M,se,E,fe="A fourth-order Improved Pseudo Linear Multistep scheduler.",re,F,he=`This model inherits from <a href="/docs/diffusers/v0.26.3/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/v0.26.3/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.`,ne,m,T,ie,k,ge=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,oe,f,I,de,H,_e="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",ae,h,w,ue,A,ve=`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.`,J,y,K,p,N,ce,V,be="Base class for the output of a scheduler’s <code>step</code> function.",Q,q,X;return S=new le({props:{title:"IPNDMScheduler",local:"ipndmscheduler",headingTag:"h1"}}),D=new le({props:{title:"IPNDMScheduler",local:"diffusers.IPNDMScheduler",headingTag:"h2"}}),M=new U({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.26.3/src/diffusers/schedulers/scheduling_ipndm.py#L25"}}),T=new U({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.26.3/src/diffusers/schedulers/scheduling_ipndm.py#L170",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>
`}}),I=new U({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.26.3/src/diffusers/schedulers/scheduling_ipndm.py#L67"}}),w=new U({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.26.3/en/api/schedulers/dpm_discrete_ancestral#diffusers.schedulers.scheduling_utils.SchedulerOutput">SchedulerOutput</a> or tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.26.3/src/diffusers/schedulers/scheduling_ipndm.py#L112",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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