import{s as te,n as ne,o as se}from"../chunks/scheduler.182ea377.js";import{S as re,i as oe,g as d,s as o,r as T,A as ce,h as i,f as t,c,j as S,u as w,x as q,k as P,y as l,a as s,v as E,d as L,t as F,w as A}from"../chunks/index.abf12888.js";import{D as J}from"../chunks/Docstring.93f6f462.js";import{H as ee}from"../chunks/Heading.16916d63.js";function de(K){let a,H,D,M,m,O,h,Q='This scheduler is a part of the <code>ConsistencyDecoderPipeline</code> and was introduced in <a href="https://openai.com/dall-e-3" rel="nofollow">DALL-E 3</a>.',I,f,X='The original codebase can be found at <a href="https://github.com/openai/consistency_models" rel="nofollow">openai/consistency_models</a>.',V,g,k,r,_,z,u,y,R,v,Y=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,W,p,$,B,b,Z=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion
process from the learned model outputs (most often the predicted noise).`,G,C,N;return m=new ee({props:{title:"ConsistencyDecoderScheduler",local:"consistencydecoderscheduler",headingTag:"h1"}}),g=new ee({props:{title:"ConsistencyDecoderScheduler",local:"diffusers.schedulers.ConsistencyDecoderScheduler",headingTag:"h2"}}),_=new J({props:{name:"class diffusers.schedulers.ConsistencyDecoderScheduler",anchor:"diffusers.schedulers.ConsistencyDecoderScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1024"},{name:"sigma_data",val:": float = 0.5"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_consistency_decoder.py#L72"}}),y=new J({props:{name:"scale_model_input",anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.scale_model_input",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
The input sample.`,name:"sample"},{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.scale_model_input.timestep",description:`<strong>timestep</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The current timestep in the diffusion chain.`,name:"timestep"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_consistency_decoder.py#L116",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>
`}}),$=new J({props:{name:"step",anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": typing.Union[float, torch.FloatTensor]"},{name:"sample",val:": FloatTensor"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.step.model_output",description:`<strong>model_output</strong> (<code>torch.FloatTensor</code>) &#x2014;
The direct output from the learned diffusion model.`,name:"model_output"},{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.step.timestep",description:`<strong>timestep</strong> (<code>float</code>) &#x2014;
The current timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.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.schedulers.ConsistencyDecoderScheduler.step.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A random number generator.`,name:"generator"},{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a
<code>~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput</code> or <code>tuple</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_consistency_decoder.py#L133",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If return_dict is <code>True</code>,
<code>~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput</code> 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><code>~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput</code> or <code>tuple</code></p>
`}}),{c(){a=d("meta"),H=o(),D=d("p"),M=o(),T(m.$$.fragment),O=o(),h=d("p"),h.innerHTML=Q,I=o(),f=d("p"),f.innerHTML=X,V=o(),T(g.$$.fragment),k=o(),r=d("div"),T(_.$$.fragment),z=o(),u=d("div"),T(y.$$.fragment),R=o(),v=d("p"),v.textContent=Y,W=o(),p=d("div"),T($.$$.fragment),B=o(),b=d("p"),b.textContent=Z,G=o(),C=d("p"),this.h()},l(e){const n=ce("svelte-u9bgzb",document.head);a=i(n,"META",{name:!0,content:!0}),n.forEach(t),H=c(e),D=i(e,"P",{}),S(D).forEach(t),M=c(e),w(m.$$.fragment,e),O=c(e),h=i(e,"P",{"data-svelte-h":!0}),q(h)!=="svelte-134dxf"&&(h.innerHTML=Q),I=c(e),f=i(e,"P",{"data-svelte-h":!0}),q(f)!=="svelte-1ci2nab"&&(f.innerHTML=X),V=c(e),w(g.$$.fragment,e),k=c(e),r=i(e,"DIV",{class:!0});var x=S(r);w(_.$$.fragment,x),z=c(x),u=i(x,"DIV",{class:!0});var U=S(u);w(y.$$.fragment,U),R=c(U),v=i(U,"P",{"data-svelte-h":!0}),q(v)!=="svelte-1rkfgpx"&&(v.textContent=Y),U.forEach(t),W=c(x),p=i(x,"DIV",{class:!0});var j=S(p);w($.$$.fragment,j),B=c(j),b=i(j,"P",{"data-svelte-h":!0}),q(b)!=="svelte-hi84tp"&&(b.textContent=Z),j.forEach(t),x.forEach(t),G=c(e),C=i(e,"P",{}),S(C).forEach(t),this.h()},h(){P(a,"name","hf:doc:metadata"),P(a,"content",ie),P(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(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(e,n){l(document.head,a),s(e,H,n),s(e,D,n),s(e,M,n),E(m,e,n),s(e,O,n),s(e,h,n),s(e,I,n),s(e,f,n),s(e,V,n),E(g,e,n),s(e,k,n),s(e,r,n),E(_,r,null),l(r,z),l(r,u),E(y,u,null),l(u,R),l(u,v),l(r,W),l(r,p),E($,p,null),l(p,B),l(p,b),s(e,G,n),s(e,C,n),N=!0},p:ne,i(e){N||(L(m.$$.fragment,e),L(g.$$.fragment,e),L(_.$$.fragment,e),L(y.$$.fragment,e),L($.$$.fragment,e),N=!0)},o(e){F(m.$$.fragment,e),F(g.$$.fragment,e),F(_.$$.fragment,e),F(y.$$.fragment,e),F($.$$.fragment,e),N=!1},d(e){e&&(t(H),t(D),t(M),t(O),t(h),t(I),t(f),t(V),t(k),t(r),t(G),t(C)),t(a),A(m,e),A(g,e),A(_),A(y),A($)}}}const ie='{"title":"ConsistencyDecoderScheduler","local":"consistencydecoderscheduler","sections":[{"title":"ConsistencyDecoderScheduler","local":"diffusers.schedulers.ConsistencyDecoderScheduler","sections":[],"depth":2}],"depth":1}';function ae(K){return se(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class he extends re{constructor(a){super(),oe(this,a,ae,de,te,{})}}export{he as component};
