import{s as _t,n as bt,o as vt}from"../chunks/scheduler.53228c21.js";import{S as Tt,i as xt,e as a,s as n,c as u,h as yt,a as d,d as s,b as o,f as b,g as m,j as p,k as v,l as t,m as l,n as h,t as f,o as g,p as _}from"../chunks/index.100fac89.js";import{C as Ct}from"../chunks/CopyLLMTxtMenu.999d3d86.js";import{D as T}from"../chunks/Docstring.46d0934e.js";import{H as Ye,E as $t}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.d27ae4df.js";function Dt(et){let x,le,de,pe,O,ue,E,me,I,tt='<a href="https://huggingface.co/papers/2402.19159" rel="nofollow">Trajectory Consistency Distillation</a> by Jianbin Zheng, Minghui Hu, Zhongyi Fan, Chaoyue Wang, Changxing Ding, Dacheng Tao and Tat-Jen Cham introduced a Strategic Stochastic Sampling (Algorithm 4) that is capable of generating good samples in a small number of steps. Distinguishing it as an advanced iteration of the multistep scheduler (Algorithm 1) in the <a href="https://huggingface.co/papers/2303.01469" rel="nofollow">Consistency Models</a>, Strategic Stochastic Sampling specifically tailored for the trajectory consistency function.',he,N,st="The abstract from the paper is:",fe,H,nt="<em>Latent Consistency Model (LCM) extends the Consistency Model to the latent space and leverages the guided consistency distillation technique to achieve impressive performance in accelerating text-to-image synthesis. However, we observed that LCM struggles to generate images with both clarity and detailed intricacy. To address this limitation, we initially delve into and elucidate the underlying causes. Our investigation identifies that the primary issue stems from errors in three distinct areas. Consequently, we introduce Trajectory Consistency Distillation (TCD), which encompasses trajectory consistency function and strategic stochastic sampling. The trajectory consistency function diminishes the distillation errors by broadening the scope of the self-consistency boundary condition and endowing the TCD with the ability to accurately trace the entire trajectory of the Probability Flow ODE. Additionally, strategic stochastic sampling is specifically designed to circumvent the accumulated errors inherent in multi-step consistency sampling, which is meticulously tailored to complement the TCD model. Experiments demonstrate that TCD not only significantly enhances image quality at low NFEs but also yields more detailed results compared to the teacher model at high NFEs.</em>",ge,q,ot='The original codebase can be found at <a href="https://github.com/jabir-zheng/TCD" rel="nofollow">jabir-zheng/TCD</a>.',_e,z,be,r,j,Ie,K,rt="<code>TCDScheduler</code> incorporates the <code>Strategic Stochastic Sampling</code> introduced by the paper <code>Trajectory Consistency Distillation</code>, extending the original Multistep Consistency Sampling to enable unrestricted trajectory traversal.",Ne,Q,it='This code is based on the official repo of TCD(<a href="https://github.com/jabir-zheng/TCD" rel="nofollow">https://github.com/jabir-zheng/TCD</a>).',He,X,at=`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>. <a href="/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin">~ConfigMixin</a> takes care of storing all config
attributes that are passed in the scheduler’s <code>__init__</code> function, such as <code>num_train_timesteps</code>. They can be
accessed via <code>scheduler.config.num_train_timesteps</code>. <a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> provides general loading and saving
functionality via the <a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin.save_pretrained">SchedulerMixin.save_pretrained()</a> and <a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin.from_pretrained">from_pretrained()</a> functions.`,qe,C,V,ze,Y,dt=`Add noise to the original samples according to the noise magnitude at each timestep (this is the forward
diffusion process).`,je,$,k,Ve,ee,ct="Compute the velocity prediction from the sample and noise according to the velocity formula.",ke,D,F,Fe,te,lt="Find the index of a given timestep in the timestep schedule.",Ae,S,A,We,se,pt="Compute the previous timestep in the diffusion chain.",Ue,w,W,Ge,ne,ut=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,Re,M,U,Je,oe,mt="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",Ze,L,G,Be,re,ht="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",Ke,P,R,Qe,ie,ft=`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).`,ve,J,Te,y,Z,Xe,ae,gt="Output class for the scheduler’s <code>step</code> function output.",xe,B,ye,ce,Ce;return O=new Ct({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),E=new Ye({props:{title:"TCDScheduler",local:"tcdscheduler",headingTag:"h1"}}),z=new Ye({props:{title:"TCDScheduler",local:"diffusers.TCDScheduler",headingTag:"h2"}}),j=new T({props:{name:"class diffusers.TCDScheduler",anchor:"diffusers.TCDScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"beta_start",val:": float = 0.00085"},{name:"beta_end",val:": float = 0.012"},{name:"beta_schedule",val:": str = 'scaled_linear'"},{name:"trained_betas",val:": typing.Union[numpy.ndarray, typing.List[float], NoneType] = None"},{name:"original_inference_steps",val:": int = 50"},{name:"clip_sample",val:": bool = False"},{name:"clip_sample_range",val:": float = 1.0"},{name:"set_alpha_to_one",val:": bool = True"},{name:"steps_offset",val:": int = 0"},{name:"prediction_type",val:": str = 'epsilon'"},{name:"thresholding",val:": bool = False"},{name:"dynamic_thresholding_ratio",val:": float = 0.995"},{name:"sample_max_value",val:": float = 1.0"},{name:"timestep_spacing",val:": str = 'leading'"},{name:"timestep_scaling",val:": float = 10.0"},{name:"rescale_betas_zero_snr",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.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.TCDScheduler.beta_start",description:`<strong>beta_start</strong> (<code>float</code>, defaults to 0.0001) &#x2014;
The starting <code>beta</code> value of inference.`,name:"beta_start"},{anchor:"diffusers.TCDScheduler.beta_end",description:`<strong>beta_end</strong> (<code>float</code>, defaults to 0.02) &#x2014;
The final <code>beta</code> value.`,name:"beta_end"},{anchor:"diffusers.TCDScheduler.beta_schedule",description:`<strong>beta_schedule</strong> (<code>str</code>, defaults to <code>&quot;linear&quot;</code>) &#x2014;
The beta schedule, a mapping from a beta range to a sequence of betas for stepping the model. Choose from
<code>linear</code>, <code>scaled_linear</code>, or <code>squaredcos_cap_v2</code>.`,name:"beta_schedule"},{anchor:"diffusers.TCDScheduler.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"},{anchor:"diffusers.TCDScheduler.original_inference_steps",description:`<strong>original_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The default number of inference steps used to generate a linearly-spaced timestep schedule, from which we
will ultimately take <code>num_inference_steps</code> evenly spaced timesteps to form the final timestep schedule.`,name:"original_inference_steps"},{anchor:"diffusers.TCDScheduler.clip_sample",description:`<strong>clip_sample</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Clip the predicted sample for numerical stability.`,name:"clip_sample"},{anchor:"diffusers.TCDScheduler.clip_sample_range",description:`<strong>clip_sample_range</strong> (<code>float</code>, defaults to 1.0) &#x2014;
The maximum magnitude for sample clipping. Valid only when <code>clip_sample=True</code>.`,name:"clip_sample_range"},{anchor:"diffusers.TCDScheduler.set_alpha_to_one",description:`<strong>set_alpha_to_one</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Each diffusion step uses the alphas product value at that step and at the previous one. For the final step
there is no previous alpha. When this option is <code>True</code> the previous alpha product is fixed to <code>1</code>,
otherwise it uses the alpha value at step 0.`,name:"set_alpha_to_one"},{anchor:"diffusers.TCDScheduler.steps_offset",description:`<strong>steps_offset</strong> (<code>int</code>, defaults to 0) &#x2014;
An offset added to the inference steps, as required by some model families.`,name:"steps_offset"},{anchor:"diffusers.TCDScheduler.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, defaults to <code>epsilon</code>, <em>optional</em>) &#x2014;
Prediction type of the scheduler function; can be <code>epsilon</code> (predicts the noise of the diffusion process),
<code>sample</code> (directly predicts the noisy sample<code>) or </code>v_prediction\` (see section 2.4 of <a href="https://huggingface.co/papers/2210.02303" rel="nofollow">Imagen
Video</a> paper).`,name:"prediction_type"},{anchor:"diffusers.TCDScheduler.thresholding",description:`<strong>thresholding</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to use the &#x201C;dynamic thresholding&#x201D; method. This is unsuitable for latent-space diffusion models such
as Stable Diffusion.`,name:"thresholding"},{anchor:"diffusers.TCDScheduler.dynamic_thresholding_ratio",description:`<strong>dynamic_thresholding_ratio</strong> (<code>float</code>, defaults to 0.995) &#x2014;
The ratio for the dynamic thresholding method. Valid only when <code>thresholding=True</code>.`,name:"dynamic_thresholding_ratio"},{anchor:"diffusers.TCDScheduler.sample_max_value",description:`<strong>sample_max_value</strong> (<code>float</code>, defaults to 1.0) &#x2014;
The threshold value for dynamic thresholding. Valid only when <code>thresholding=True</code>.`,name:"sample_max_value"},{anchor:"diffusers.TCDScheduler.timestep_spacing",description:`<strong>timestep_spacing</strong> (<code>str</code>, defaults to <code>&quot;leading&quot;</code>) &#x2014;
The way the timesteps should be scaled. Refer to Table 2 of the <a href="https://huggingface.co/papers/2305.08891" rel="nofollow">Common Diffusion Noise Schedules and
Sample Steps are Flawed</a> for more information.`,name:"timestep_spacing"},{anchor:"diffusers.TCDScheduler.timestep_scaling",description:`<strong>timestep_scaling</strong> (<code>float</code>, defaults to 10.0) &#x2014;
The factor the timesteps will be multiplied by when calculating the consistency model boundary conditions
<code>c_skip</code> and <code>c_out</code>. Increasing this will decrease the approximation error (although the approximation
error at the default of <code>10.0</code> is already pretty small).`,name:"timestep_scaling"},{anchor:"diffusers.TCDScheduler.rescale_betas_zero_snr",description:`<strong>rescale_betas_zero_snr</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to rescale the betas to have zero terminal SNR. This enables the model to generate very bright and
dark samples instead of limiting it to samples with medium brightness. Loosely related to
<a href="https://github.com/huggingface/diffusers/blob/74fd735eb073eb1d774b1ab4154a0876eb82f055/examples/dreambooth/train_dreambooth.py#L506" rel="nofollow"><code>--offset_noise</code></a>.`,name:"rescale_betas_zero_snr"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L134"}}),V=new T({props:{name:"add_noise",anchor:"diffusers.TCDScheduler.add_noise",parameters:[{name:"original_samples",val:": Tensor"},{name:"noise",val:": Tensor"},{name:"timesteps",val:": IntTensor"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.add_noise.original_samples",description:`<strong>original_samples</strong> (<code>torch.Tensor</code>) &#x2014;
The original samples to which noise will be added.`,name:"original_samples"},{anchor:"diffusers.TCDScheduler.add_noise.noise",description:`<strong>noise</strong> (<code>torch.Tensor</code>) &#x2014;
The noise to add to the samples.`,name:"noise"},{anchor:"diffusers.TCDScheduler.add_noise.timesteps",description:`<strong>timesteps</strong> (<code>torch.IntTensor</code>) &#x2014;
The timesteps indicating the noise level for each sample.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L683",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The noisy samples.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),k=new T({props:{name:"get_velocity",anchor:"diffusers.TCDScheduler.get_velocity",parameters:[{name:"sample",val:": Tensor"},{name:"noise",val:": Tensor"},{name:"timesteps",val:": IntTensor"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.get_velocity.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The input sample.`,name:"sample"},{anchor:"diffusers.TCDScheduler.get_velocity.noise",description:`<strong>noise</strong> (<code>torch.Tensor</code>) &#x2014;
The noise tensor.`,name:"noise"},{anchor:"diffusers.TCDScheduler.get_velocity.timesteps",description:`<strong>timesteps</strong> (<code>torch.IntTensor</code>) &#x2014;
The timesteps for velocity computation.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L726",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The computed velocity.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),F=new T({props:{name:"index_for_timestep",anchor:"diffusers.TCDScheduler.index_for_timestep",parameters:[{name:"timestep",val:": typing.Union[float, torch.Tensor]"},{name:"schedule_timesteps",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.index_for_timestep.timestep",description:`<strong>timestep</strong> (<code>float</code> or <code>torch.Tensor</code>) &#x2014;
The timestep value to find in the schedule.`,name:"timestep"},{anchor:"diffusers.TCDScheduler.index_for_timestep.schedule_timesteps",description:`<strong>schedule_timesteps</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
The timestep schedule to search in. If <code>None</code>, uses <code>self.timesteps</code>.`,name:"schedule_timesteps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L256",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The index of the timestep in the schedule. For the very first step, returns the second index if
multiple matches exist to avoid skipping a sigma when starting mid-schedule (e.g., for image-to-image).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),A=new T({props:{name:"previous_timestep",anchor:"diffusers.TCDScheduler.previous_timestep",parameters:[{name:"timestep",val:""}],parametersDescription:[{anchor:"diffusers.TCDScheduler.previous_timestep.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current timestep.`,name:"timestep"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L764",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The previous timestep.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),W=new T({props:{name:"scale_model_input",anchor:"diffusers.TCDScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"timestep",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The input sample.`,name:"sample"},{anchor:"diffusers.TCDScheduler.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_tcd.py#L324",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>
`}}),U=new T({props:{name:"set_begin_index",anchor:"diffusers.TCDScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.set_begin_index.begin_index",description:`<strong>begin_index</strong> (<code>int</code>, defaults to <code>0</code>) &#x2014;
The begin index for the scheduler.`,name:"begin_index"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L314"}}),G=new T({props:{name:"set_timesteps",anchor:"diffusers.TCDScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": typing.Optional[int] = None"},{name:"device",val:": typing.Union[str, torch.device] = None"},{name:"original_inference_steps",val:": typing.Optional[int] = None"},{name:"timesteps",val:": typing.Optional[typing.List[int]] = None"},{name:"strength",val:": float = 1.0"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.set_timesteps.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of diffusion steps used when generating samples with a pre-trained model. If used,
<code>timesteps</code> must be <code>None</code>.`,name:"num_inference_steps"},{anchor:"diffusers.TCDScheduler.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"},{anchor:"diffusers.TCDScheduler.set_timesteps.original_inference_steps",description:`<strong>original_inference_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The original number of inference steps, which will be used to generate a linearly-spaced timestep
schedule (which is different from the standard <code>diffusers</code> implementation). We will then take
<code>num_inference_steps</code> timesteps from this schedule, evenly spaced in terms of indices, and use that as
our final timestep schedule. If not set, this will default to the <code>original_inference_steps</code> attribute.`,name:"original_inference_steps"},{anchor:"diffusers.TCDScheduler.set_timesteps.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps used to support arbitrary spacing between timesteps. If <code>None</code>, then the default
timestep spacing strategy of equal spacing between timesteps on the training/distillation timestep
schedule is used. If <code>timesteps</code> is passed, <code>num_inference_steps</code> must be <code>None</code>.`,name:"timesteps"},{anchor:"diffusers.TCDScheduler.set_timesteps.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Used to determine the number of timesteps used for inference when using img2img, inpaint, etc.`,name:"strength"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L414"}}),R=new T({props:{name:"step",anchor:"diffusers.TCDScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": int"},{name:"sample",val:": Tensor"},{name:"eta",val:": float = 0.3"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.TCDScheduler.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.TCDScheduler.step.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.TCDScheduler.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.TCDScheduler.step.eta",description:`<strong>eta</strong> (<code>float</code>) &#x2014;
A stochastic parameter (referred to as <code>gamma</code> in the paper) used to control the stochasticity in every
step. When eta = 0, it represents deterministic sampling, whereas eta = 1 indicates full stochastic
sampling.`,name:"eta"},{anchor:"diffusers.TCDScheduler.step.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A random number generator.`,name:"generator"},{anchor:"diffusers.TCDScheduler.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 <a href="/docs/diffusers/main/en/api/schedulers/tcd#diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput">TCDSchedulerOutput</a> or <code>tuple</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L576",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/tcd#diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput"
>TCDSchedulerOutput</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><code>~schedulers.scheduling_utils.TCDSchedulerOutput</code> or <code>tuple</code></p>
`}}),J=new Ye({props:{title:"TCDSchedulerOutput",local:"diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput",headingTag:"h2"}}),Z=new T({props:{name:"class diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput",anchor:"diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput",parameters:[{name:"prev_sample",val:": Tensor"},{name:"pred_noised_sample",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput.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"},{anchor:"diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput.pred_noised_sample",description:`<strong>pred_noised_sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code> for images) &#x2014;
The predicted noised sample <code>(x_{s})</code> based on the model output from the current timestep.`,name:"pred_noised_sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_tcd.py#L35"}}),B=new $t({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/tcd.md"}}),{c(){x=a("meta"),le=n(),de=a("p"),pe=n(),u(O.$$.fragment),ue=n(),u(E.$$.fragment),me=n(),I=a("p"),I.innerHTML=tt,he=n(),N=a("p"),N.textContent=st,fe=n(),H=a("p"),H.innerHTML=nt,ge=n(),q=a("p"),q.innerHTML=ot,_e=n(),u(z.$$.fragment),be=n(),r=a("div"),u(j.$$.fragment),Ie=n(),K=a("p"),K.innerHTML=rt,Ne=n(),Q=a("p"),Q.innerHTML=it,He=n(),X=a("p"),X.innerHTML=at,qe=n(),C=a("div"),u(V.$$.fragment),ze=n(),Y=a("p"),Y.textContent=dt,je=n(),$=a("div"),u(k.$$.fragment),Ve=n(),ee=a("p"),ee.textContent=ct,ke=n(),D=a("div"),u(F.$$.fragment),Fe=n(),te=a("p"),te.textContent=lt,Ae=n(),S=a("div"),u(A.$$.fragment),We=n(),se=a("p"),se.textContent=pt,Ue=n(),w=a("div"),u(W.$$.fragment),Ge=n(),ne=a("p"),ne.textContent=ut,Re=n(),M=a("div"),u(U.$$.fragment),Je=n(),oe=a("p"),oe.textContent=mt,Ze=n(),L=a("div"),u(G.$$.fragment),Be=n(),re=a("p"),re.textContent=ht,Ke=n(),P=a("div"),u(R.$$.fragment),Qe=n(),ie=a("p"),ie.textContent=ft,ve=n(),u(J.$$.fragment),Te=n(),y=a("div"),u(Z.$$.fragment),Xe=n(),ae=a("p"),ae.innerHTML=gt,xe=n(),u(B.$$.fragment),ye=n(),ce=a("p"),this.h()},l(e){const i=yt("svelte-u9bgzb",document.head);x=d(i,"META",{name:!0,content:!0}),i.forEach(s),le=o(e),de=d(e,"P",{}),b(de).forEach(s),pe=o(e),m(O.$$.fragment,e),ue=o(e),m(E.$$.fragment,e),me=o(e),I=d(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-3svyx2"&&(I.innerHTML=tt),he=o(e),N=d(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-1cwsb16"&&(N.textContent=st),fe=o(e),H=d(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-26l4oe"&&(H.innerHTML=nt),ge=o(e),q=d(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-1pz11zl"&&(q.innerHTML=ot),_e=o(e),m(z.$$.fragment,e),be=o(e),r=d(e,"DIV",{class:!0});var c=b(r);m(j.$$.fragment,c),Ie=o(c),K=d(c,"P",{"data-svelte-h":!0}),p(K)!=="svelte-joqxs4"&&(K.innerHTML=rt),Ne=o(c),Q=d(c,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-dg51tf"&&(Q.innerHTML=it),He=o(c),X=d(c,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1wfw14k"&&(X.innerHTML=at),qe=o(c),C=d(c,"DIV",{class:!0});var $e=b(C);m(V.$$.fragment,$e),ze=o($e),Y=d($e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-hqmiev"&&(Y.textContent=dt),$e.forEach(s),je=o(c),$=d(c,"DIV",{class:!0});var De=b($);m(k.$$.fragment,De),Ve=o(De),ee=d(De,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-1aqw5k3"&&(ee.textContent=ct),De.forEach(s),ke=o(c),D=d(c,"DIV",{class:!0});var Se=b(D);m(F.$$.fragment,Se),Fe=o(Se),te=d(Se,"P",{"data-svelte-h":!0}),p(te)!=="svelte-1xn85hs"&&(te.textContent=lt),Se.forEach(s),Ae=o(c),S=d(c,"DIV",{class:!0});var we=b(S);m(A.$$.fragment,we),We=o(we),se=d(we,"P",{"data-svelte-h":!0}),p(se)!=="svelte-jss25y"&&(se.textContent=pt),we.forEach(s),Ue=o(c),w=d(c,"DIV",{class:!0});var Me=b(w);m(W.$$.fragment,Me),Ge=o(Me),ne=d(Me,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1rkfgpx"&&(ne.textContent=ut),Me.forEach(s),Re=o(c),M=d(c,"DIV",{class:!0});var Le=b(M);m(U.$$.fragment,Le),Je=o(Le),oe=d(Le,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-1k141rk"&&(oe.textContent=mt),Le.forEach(s),Ze=o(c),L=d(c,"DIV",{class:!0});var Pe=b(L);m(G.$$.fragment,Pe),Be=o(Pe),re=d(Pe,"P",{"data-svelte-h":!0}),p(re)!=="svelte-1vzm9q"&&(re.textContent=ht),Pe.forEach(s),Ke=o(c),P=d(c,"DIV",{class:!0});var Oe=b(P);m(R.$$.fragment,Oe),Qe=o(Oe),ie=d(Oe,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-hi84tp"&&(ie.textContent=ft),Oe.forEach(s),c.forEach(s),ve=o(e),m(J.$$.fragment,e),Te=o(e),y=d(e,"DIV",{class:!0});var Ee=b(y);m(Z.$$.fragment,Ee),Xe=o(Ee),ae=d(Ee,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-id9kic"&&(ae.innerHTML=gt),Ee.forEach(s),xe=o(e),m(B.$$.fragment,e),ye=o(e),ce=d(e,"P",{}),b(ce).forEach(s),this.h()},h(){v(x,"name","hf:doc:metadata"),v(x,"content",St),v(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(y,"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,i){t(document.head,x),l(e,le,i),l(e,de,i),l(e,pe,i),h(O,e,i),l(e,ue,i),h(E,e,i),l(e,me,i),l(e,I,i),l(e,he,i),l(e,N,i),l(e,fe,i),l(e,H,i),l(e,ge,i),l(e,q,i),l(e,_e,i),h(z,e,i),l(e,be,i),l(e,r,i),h(j,r,null),t(r,Ie),t(r,K),t(r,Ne),t(r,Q),t(r,He),t(r,X),t(r,qe),t(r,C),h(V,C,null),t(C,ze),t(C,Y),t(r,je),t(r,$),h(k,$,null),t($,Ve),t($,ee),t(r,ke),t(r,D),h(F,D,null),t(D,Fe),t(D,te),t(r,Ae),t(r,S),h(A,S,null),t(S,We),t(S,se),t(r,Ue),t(r,w),h(W,w,null),t(w,Ge),t(w,ne),t(r,Re),t(r,M),h(U,M,null),t(M,Je),t(M,oe),t(r,Ze),t(r,L),h(G,L,null),t(L,Be),t(L,re),t(r,Ke),t(r,P),h(R,P,null),t(P,Qe),t(P,ie),l(e,ve,i),h(J,e,i),l(e,Te,i),l(e,y,i),h(Z,y,null),t(y,Xe),t(y,ae),l(e,xe,i),h(B,e,i),l(e,ye,i),l(e,ce,i),Ce=!0},p:bt,i(e){Ce||(f(O.$$.fragment,e),f(E.$$.fragment,e),f(z.$$.fragment,e),f(j.$$.fragment,e),f(V.$$.fragment,e),f(k.$$.fragment,e),f(F.$$.fragment,e),f(A.$$.fragment,e),f(W.$$.fragment,e),f(U.$$.fragment,e),f(G.$$.fragment,e),f(R.$$.fragment,e),f(J.$$.fragment,e),f(Z.$$.fragment,e),f(B.$$.fragment,e),Ce=!0)},o(e){g(O.$$.fragment,e),g(E.$$.fragment,e),g(z.$$.fragment,e),g(j.$$.fragment,e),g(V.$$.fragment,e),g(k.$$.fragment,e),g(F.$$.fragment,e),g(A.$$.fragment,e),g(W.$$.fragment,e),g(U.$$.fragment,e),g(G.$$.fragment,e),g(R.$$.fragment,e),g(J.$$.fragment,e),g(Z.$$.fragment,e),g(B.$$.fragment,e),Ce=!1},d(e){e&&(s(le),s(de),s(pe),s(ue),s(me),s(I),s(he),s(N),s(fe),s(H),s(ge),s(q),s(_e),s(be),s(r),s(ve),s(Te),s(y),s(xe),s(ye),s(ce)),s(x),_(O,e),_(E,e),_(z,e),_(j),_(V),_(k),_(F),_(A),_(W),_(U),_(G),_(R),_(J,e),_(Z),_(B,e)}}}const St='{"title":"TCDScheduler","local":"tcdscheduler","sections":[{"title":"TCDScheduler","local":"diffusers.TCDScheduler","sections":[],"depth":2},{"title":"TCDSchedulerOutput","local":"diffusers.schedulers.scheduling_tcd.TCDSchedulerOutput","sections":[],"depth":2}],"depth":1}';function wt(et){return vt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class It extends Tt{constructor(x){super(),xt(this,x,wt,Dt,_t,{})}}export{It as component};
