import{s as $e,n as xe,o as Se}from"../chunks/scheduler.182ea377.js";import{S as Pe,i as De,g as a,s as i,r as g,A as Me,h as d,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 j}from"../chunks/Docstring.93f6f462.js";import{H as ce}from"../chunks/Heading.16916d63.js";function Te(pe){let c,q,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/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/main/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,ae,H,_e="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",de,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,le,V,be="Base class for the output of a scheduler’s <code>step</code> function.",Q,U,X;return S=new ce({props:{title:"IPNDMScheduler",local:"ipndmscheduler",headingTag:"h1"}}),D=new ce({props:{title:"IPNDMScheduler",local:"diffusers.IPNDMScheduler",headingTag:"h2"}}),M=new j({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/main/src/diffusers/schedulers/scheduling_ipndm.py#L25"}}),T=new j({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:`<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 j({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/main/src/diffusers/schedulers/scheduling_ipndm.py#L67"}}),w=new j({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/dpm_discrete_ancestral#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:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If return_dict is <code>True</code>, <a
  href="/docs/diffusers/main/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/main/en/api/schedulers/dpm_discrete_ancestral#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),y=new ce({props:{title:"SchedulerOutput",local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",headingTag:"h2"}}),N=new j({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(){c=a("meta"),q=i(),z=a("p"),B=i(),g(S.$$.fragment),R=i(),P=a("p"),P.innerHTML=me,W=i(),g(D.$$.fragment),G=i(),n=a("div"),g(M.$$.fragment),se=i(),E=a("p"),E.textContent=fe,re=i(),F=a("p"),F.innerHTML=he,ne=i(),m=a("div"),g(T.$$.fragment),ie=i(),k=a("p"),k.textContent=ge,oe=i(),f=a("div"),g(I.$$.fragment),ae=i(),H=a("p"),H.textContent=_e,de=i(),h=a("div"),g(w.$$.fragment),ue=i(),A=a("p"),A.textContent=ve,J=i(),g(y.$$.fragment),K=i(),p=a("div"),g(N.$$.fragment),le=i(),V=a("p"),V.innerHTML=be,Q=i(),U=a("p"),this.h()},l(e){const s=Me("svelte-u9bgzb",document.head);c=d(s,"META",{name:!0,content:!0}),s.forEach(t),q=o(e),z=d(e,"P",{}),C(z).forEach(t),B=o(e),_(S.$$.fragment,e),R=o(e),P=d(e,"P",{"data-svelte-h":!0}),L(P)!=="svelte-z0ks0i"&&(P.innerHTML=me),W=o(e),_(D.$$.fragment,e),G=o(e),n=d(e,"DIV",{class:!0});var l=C(n);_(M.$$.fragment,l),se=o(l),E=d(l,"P",{"data-svelte-h":!0}),L(E)!=="svelte-uir5v"&&(E.textContent=fe),re=o(l),F=d(l,"P",{"data-svelte-h":!0}),L(F)!=="svelte-linuuh"&&(F.innerHTML=he),ne=o(l),m=d(l,"DIV",{class:!0});var Y=C(m);_(T.$$.fragment,Y),ie=o(Y),k=d(Y,"P",{"data-svelte-h":!0}),L(k)!=="svelte-1rkfgpx"&&(k.textContent=ge),Y.forEach(t),oe=o(l),f=d(l,"DIV",{class:!0});var Z=C(f);_(I.$$.fragment,Z),ae=o(Z),H=d(Z,"P",{"data-svelte-h":!0}),L(H)!=="svelte-1vzm9q"&&(H.textContent=_e),Z.forEach(t),de=o(l),h=d(l,"DIV",{class:!0});var ee=C(h);_(w.$$.fragment,ee),ue=o(ee),A=d(ee,"P",{"data-svelte-h":!0}),L(A)!=="svelte-1n4l8et"&&(A.textContent=ve),ee.forEach(t),l.forEach(t),J=o(e),_(y.$$.fragment,e),K=o(e),p=d(e,"DIV",{class:!0});var te=C(p);_(N.$$.fragment,te),le=o(te),V=d(te,"P",{"data-svelte-h":!0}),L(V)!=="svelte-6ojmkw"&&(V.innerHTML=be),te.forEach(t),Q=o(e),U=d(e,"P",{}),C(U).forEach(t),this.h()},h(){O(c,"name","hf:doc:metadata"),O(c,"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,c),u(e,q,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,ae),r(f,H),r(n,de),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,le),r(p,V),u(e,Q,s),u(e,U,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(q),t(z),t(B),t(R),t(P),t(W),t(G),t(n),t(J),t(K),t(p),t(Q),t(U)),t(c),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(c){super(),De(this,c,we,Te,$e,{})}}export{Oe as component};
