import{s as oe,n as ce,o as ie}from"../chunks/scheduler.53228c21.js";import{S as de,i as ae,e as i,s as r,c as x,h as le,a as d,d as n,b as o,f as O,g as C,j as F,k as A,l,m as s,n as D,t as T,o as S,p as w}from"../chunks/index.100fac89.js";import{C as ue}from"../chunks/CopyLLMTxtMenu.9360b11d.js";import{D as Y}from"../chunks/Docstring.22cc8849.js";import{H as re,E as pe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.c9001d7a.js";function me(Z){let a,I,M,z,m,G,f,V,h,ee='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>.',k,g,te='The original codebase can be found at <a href="https://github.com/openai/consistency_models" rel="nofollow">openai/consistency_models</a>.',N,_,U,c,$,J,u,y,K,E,ne=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,Q,p,b,X,L,se=`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).`,j,v,q,H,R;return m=new ue({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new re({props:{title:"ConsistencyDecoderScheduler",local:"consistencydecoderscheduler",headingTag:"h1"}}),_=new re({props:{title:"ConsistencyDecoderScheduler",local:"diffusers.schedulers.ConsistencyDecoderScheduler",headingTag:"h2"}}),$=new Y({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 Y({props:{name:"scale_model_input",anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"timestep",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.Tensor</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.Tensor</code></p>
`}}),b=new Y({props:{name:"step",anchor:"diffusers.schedulers.ConsistencyDecoderScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": typing.Union[float, torch.Tensor]"},{name:"sample",val:": Tensor"},{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.Tensor</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.Tensor</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>
`}}),v=new pe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/consistency_decoder.md"}}),{c(){a=i("meta"),I=r(),M=i("p"),z=r(),x(m.$$.fragment),G=r(),x(f.$$.fragment),V=r(),h=i("p"),h.innerHTML=ee,k=r(),g=i("p"),g.innerHTML=te,N=r(),x(_.$$.fragment),U=r(),c=i("div"),x($.$$.fragment),J=r(),u=i("div"),x(y.$$.fragment),K=r(),E=i("p"),E.textContent=ne,Q=r(),p=i("div"),x(b.$$.fragment),X=r(),L=i("p"),L.textContent=se,j=r(),x(v.$$.fragment),q=r(),H=i("p"),this.h()},l(e){const t=le("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(n),I=o(e),M=d(e,"P",{}),O(M).forEach(n),z=o(e),C(m.$$.fragment,e),G=o(e),C(f.$$.fragment,e),V=o(e),h=d(e,"P",{"data-svelte-h":!0}),F(h)!=="svelte-c0tz5b"&&(h.innerHTML=ee),k=o(e),g=d(e,"P",{"data-svelte-h":!0}),F(g)!=="svelte-1ci2nab"&&(g.innerHTML=te),N=o(e),C(_.$$.fragment,e),U=o(e),c=d(e,"DIV",{class:!0});var P=O(c);C($.$$.fragment,P),J=o(P),u=d(P,"DIV",{class:!0});var W=O(u);C(y.$$.fragment,W),K=o(W),E=d(W,"P",{"data-svelte-h":!0}),F(E)!=="svelte-1rkfgpx"&&(E.textContent=ne),W.forEach(n),Q=o(P),p=d(P,"DIV",{class:!0});var B=O(p);C(b.$$.fragment,B),X=o(B),L=d(B,"P",{"data-svelte-h":!0}),F(L)!=="svelte-hi84tp"&&(L.textContent=se),B.forEach(n),P.forEach(n),j=o(e),C(v.$$.fragment,e),q=o(e),H=d(e,"P",{}),O(H).forEach(n),this.h()},h(){A(a,"name","hf:doc:metadata"),A(a,"content",fe),A(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(c,"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,t){l(document.head,a),s(e,I,t),s(e,M,t),s(e,z,t),D(m,e,t),s(e,G,t),D(f,e,t),s(e,V,t),s(e,h,t),s(e,k,t),s(e,g,t),s(e,N,t),D(_,e,t),s(e,U,t),s(e,c,t),D($,c,null),l(c,J),l(c,u),D(y,u,null),l(u,K),l(u,E),l(c,Q),l(c,p),D(b,p,null),l(p,X),l(p,L),s(e,j,t),D(v,e,t),s(e,q,t),s(e,H,t),R=!0},p:ce,i(e){R||(T(m.$$.fragment,e),T(f.$$.fragment,e),T(_.$$.fragment,e),T($.$$.fragment,e),T(y.$$.fragment,e),T(b.$$.fragment,e),T(v.$$.fragment,e),R=!0)},o(e){S(m.$$.fragment,e),S(f.$$.fragment,e),S(_.$$.fragment,e),S($.$$.fragment,e),S(y.$$.fragment,e),S(b.$$.fragment,e),S(v.$$.fragment,e),R=!1},d(e){e&&(n(I),n(M),n(z),n(G),n(V),n(h),n(k),n(g),n(N),n(U),n(c),n(j),n(q),n(H)),n(a),w(m,e),w(f,e),w(_,e),w($),w(y),w(b),w(v,e)}}}const fe='{"title":"ConsistencyDecoderScheduler","local":"consistencydecoderscheduler","sections":[{"title":"ConsistencyDecoderScheduler","local":"diffusers.schedulers.ConsistencyDecoderScheduler","sections":[],"depth":2}],"depth":1}';function he(Z){return ie(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ve extends de{constructor(a){super(),ae(this,a,he,me,oe,{})}}export{ve as component};
