import{s as te,n as se,o as ne}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 n,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,x,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,_,G,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).`,z,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:": Optional = 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:": Union"},{name:"sample",val:": FloatTensor"},{name:"generator",val:": Optional = 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(),x=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),G=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,z=o(),C=d("p"),this.h()},l(e){const s=ce("svelte-u9bgzb",document.head);a=i(s,"META",{name:!0,content:!0}),s.forEach(t),H=c(e),x=i(e,"P",{}),S(x).forEach(t),M=c(e),w(m.$$.fragment,e),O=c(e),h=i(e,"P",{"data-svelte-h":!0}),q(h)!=="svelte-c0tz5b"&&(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 D=S(r);w(_.$$.fragment,D),G=c(D),u=i(D,"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(D),p=i(D,"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),D.forEach(t),z=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,s){l(document.head,a),n(e,H,s),n(e,x,s),n(e,M,s),E(m,e,s),n(e,O,s),n(e,h,s),n(e,I,s),n(e,f,s),n(e,V,s),E(g,e,s),n(e,k,s),n(e,r,s),E(_,r,null),l(r,G),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),n(e,z,s),n(e,C,s),N=!0},p:se,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(x),t(M),t(O),t(h),t(I),t(f),t(V),t(k),t(r),t(z),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 ne(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class he extends re{constructor(a){super(),oe(this,a,ae,de,te,{})}}export{he as component};
