import{s as Ce,n as Le,o as Ee}from"../chunks/scheduler.53228c21.js";import{S as Oe,i as ke,e as d,s as r,c,h as He,a,d as t,b as i,f as P,g as p,j as D,k as y,l as n,m as u,n as m,t as f,o as h,p as g}from"../chunks/index.100fac89.js";import{C as Ve}from"../chunks/CopyLLMTxtMenu.0ee1b69b.js";import{D as R}from"../chunks/Docstring.db856a1e.js";import{H as xe,E as ze}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function Ae(Se){let _,J,W,K,M,Q,T,X,I,Pe='<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>.',Y,w,Z,o,N,le,z,De="A fourth-order Improved Pseudo Linear Multistep scheduler.",ce,A,ye=`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.`,pe,$,C,me,U,Me=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,fe,v,L,he,j,Te="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",ge,x,E,_e,q,Ie="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",be,S,O,$e,B,we=`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.`,ee,k,te,b,H,ve,G,Ne="Base class for the output of a scheduler’s <code>step</code> function.",se,V,ne,F,re;return M=new Ve({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),T=new xe({props:{title:"IPNDMScheduler",local:"ipndmscheduler",headingTag:"h1"}}),w=new xe({props:{title:"IPNDMScheduler",local:"diffusers.IPNDMScheduler",headingTag:"h2"}}),N=new R({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"}}),C=new R({props:{name:"scale_model_input",anchor:"diffusers.IPNDMScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The input sample.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/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.Tensor</code></p>
`}}),L=new R({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/main/src/diffusers/schedulers/scheduling_ipndm.py#L76"}}),E=new R({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#L86"}}),O=new R({props:{name:"step",anchor:"diffusers.IPNDMScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": typing.Union[int, torch.Tensor]"},{name:"sample",val:": Tensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.IPNDMScheduler.step.model_output",description:`<strong>model_output</strong> (<code>torch.Tensor</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.Tensor</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/edm_multistep_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#L138",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/edm_multistep_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:`<script context="module">export const metadata = 'undefined';<\/script>


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