import{s as tt,n as st,o as rt}from"../chunks/scheduler.53228c21.js";import{S as ot,i as nt,e as i,s,c as u,h as it,a,d as r,b as o,f as b,g as p,j as _,k as v,l as t,m as l,n as m,t as h,o as f,p as g}from"../chunks/index.100fac89.js";import{C as at}from"../chunks/CopyLLMTxtMenu.20a72e0e.js";import{D}from"../chunks/Docstring.49101787.js";import{H as Ae,E as dt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4d82655d.js";function ct(Ue){let y,ne,re,ie,L,ae,O,de,I,We='The Euler scheduler (Algorithm 2) is from the <a href="https://huggingface.co/papers/2206.00364" rel="nofollow">Elucidating the Design Space of Diffusion-Based Generative Models</a> paper by Karras et al. This is a fast scheduler which can often generate good outputs in 20-30 steps. The scheduler is based on the original <a href="https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L51" rel="nofollow">k-diffusion</a> implementation by <a href="https://github.com/crowsonkb/" rel="nofollow">Katherine Crowson</a>.',ce,N,le,n,z,De,R,Ge="Euler scheduler.",Te,K,Re=`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.`,Ee,T,P,Se,B,Ke="Add noise to the original samples according to the noise schedule at the specified timesteps.",qe,x,M,we,j,Be="Compute the velocity prediction for the given sample and noise at the specified timesteps.",Ce,Y,je=`This method implements the velocity prediction used in v-prediction models, which predicts a linear combination
of the sample and noise.`,Le,E,k,Oe,J,Ye="Find the index of a given timestep in the timestep schedule.",Ie,S,F,Ne,Q,Je=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep. Scales the denoising model input by <code>(sigma**2 + 1) ** 0.5</code> to match the Euler algorithm.`,ze,q,H,Pe,X,Qe="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",Me,w,V,ke,Z,Xe="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",Fe,C,A,He,ee,Ze=`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).`,ue,U,pe,$,W,Ve,te,et="Output class for the scheduler’s <code>step</code> function output.",me,G,he,oe,fe;return L=new at({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),O=new Ae({props:{title:"EulerDiscreteScheduler",local:"eulerdiscretescheduler",headingTag:"h1"}}),N=new Ae({props:{title:"EulerDiscreteScheduler",local:"diffusers.EulerDiscreteScheduler",headingTag:"h2"}}),z=new D({props:{name:"class diffusers.EulerDiscreteScheduler",anchor:"diffusers.EulerDiscreteScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"beta_start",val:": float = 0.0001"},{name:"beta_end",val:": float = 0.02"},{name:"beta_schedule",val:": typing.Literal['linear', 'scaled_linear', 'squaredcos_cap_v2'] = 'linear'"},{name:"trained_betas",val:": typing.Union[numpy.ndarray, typing.List[float], NoneType] = None"},{name:"prediction_type",val:": typing.Literal['epsilon', 'sample', 'v_prediction'] = 'epsilon'"},{name:"interpolation_type",val:": typing.Literal['linear', 'log_linear'] = 'linear'"},{name:"use_karras_sigmas",val:": typing.Optional[bool] = False"},{name:"use_exponential_sigmas",val:": typing.Optional[bool] = False"},{name:"use_beta_sigmas",val:": typing.Optional[bool] = False"},{name:"sigma_min",val:": typing.Optional[float] = None"},{name:"sigma_max",val:": typing.Optional[float] = None"},{name:"timestep_spacing",val:": typing.Literal['linspace', 'leading', 'trailing'] = 'linspace'"},{name:"timestep_type",val:": typing.Literal['discrete', 'continuous'] = 'discrete'"},{name:"steps_offset",val:": int = 0"},{name:"rescale_betas_zero_snr",val:": bool = False"},{name:"final_sigmas_type",val:": typing.Literal['zero', 'sigma_min'] = 'zero'"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.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.EulerDiscreteScheduler.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.EulerDiscreteScheduler.beta_schedule",description:`<strong>beta_schedule</strong> (<code>Literal[&quot;linear&quot;, &quot;scaled_linear&quot;, &quot;squaredcos_cap_v2&quot;]</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>&quot;linear&quot;</code>, <code>&quot;scaled_linear&quot;</code>, or <code>&quot;squaredcos_cap_v2&quot;</code>.`,name:"beta_schedule"},{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.prediction_type",description:`<strong>prediction_type</strong> (<code>Literal[&quot;epsilon&quot;, &quot;sample&quot;, &quot;v_prediction&quot;]</code>, defaults to <code>&quot;epsilon&quot;</code>, <em>optional</em>) &#x2014;
Prediction type of the scheduler function; can be <code>&quot;epsilon&quot;</code> (predicts the noise of the diffusion
process), <code>&quot;sample&quot;</code> (directly predicts the noisy sample<code>) or </code>&#x201C;v_prediction&#x201D;\` (see section 2.4 of <a href="https://huggingface.co/papers/2210.02303" rel="nofollow">Imagen
Video</a> paper).`,name:"prediction_type"},{anchor:"diffusers.EulerDiscreteScheduler.interpolation_type",description:`<strong>interpolation_type</strong> (<code>Literal[&quot;linear&quot;, &quot;log_linear&quot;]</code>, defaults to <code>&quot;linear&quot;</code>, <em>optional</em>) &#x2014;
The interpolation type to compute intermediate sigmas for the scheduler denoising steps. Should be one of
<code>&quot;linear&quot;</code> or <code>&quot;log_linear&quot;</code>.`,name:"interpolation_type"},{anchor:"diffusers.EulerDiscreteScheduler.use_karras_sigmas",description:`<strong>use_karras_sigmas</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use Karras sigmas for step sizes in the noise schedule during the sampling process. If <code>True</code>,
the sigmas are determined according to a sequence of noise levels {&#x3C3;i}.`,name:"use_karras_sigmas"},{anchor:"diffusers.EulerDiscreteScheduler.use_exponential_sigmas",description:`<strong>use_exponential_sigmas</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use exponential sigmas for step sizes in the noise schedule during the sampling process.`,name:"use_exponential_sigmas"},{anchor:"diffusers.EulerDiscreteScheduler.use_beta_sigmas",description:`<strong>use_beta_sigmas</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use beta sigmas for step sizes in the noise schedule during the sampling process. Refer to <a href="https://huggingface.co/papers/2407.12173" rel="nofollow">Beta
Sampling is All You Need</a> for more information.`,name:"use_beta_sigmas"},{anchor:"diffusers.EulerDiscreteScheduler.sigma_min",description:`<strong>sigma_min</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The minimum sigma value for the noise schedule. If not provided, defaults to the last sigma in the
schedule.`,name:"sigma_min"},{anchor:"diffusers.EulerDiscreteScheduler.sigma_max",description:`<strong>sigma_max</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The maximum sigma value for the noise schedule. If not provided, defaults to the first sigma in the
schedule.`,name:"sigma_max"},{anchor:"diffusers.EulerDiscreteScheduler.timestep_spacing",description:`<strong>timestep_spacing</strong> (<code>Literal[&quot;linspace&quot;, &quot;leading&quot;, &quot;trailing&quot;]</code>, defaults to <code>&quot;linspace&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.EulerDiscreteScheduler.timestep_type",description:`<strong>timestep_type</strong> (<code>Literal[&quot;discrete&quot;, &quot;continuous&quot;]</code>, defaults to <code>&quot;discrete&quot;</code>) &#x2014;
The type of timesteps to use. Can be <code>&quot;discrete&quot;</code> or <code>&quot;continuous&quot;</code>.`,name:"timestep_type"},{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.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"},{anchor:"diffusers.EulerDiscreteScheduler.final_sigmas_type",description:`<strong>final_sigmas_type</strong> (<code>Literal[&quot;zero&quot;, &quot;sigma_min&quot;]</code>, defaults to <code>&quot;zero&quot;</code>) &#x2014;
The final <code>sigma</code> value for the noise schedule during the sampling process. If <code>&quot;sigma_min&quot;</code>, the final
sigma is the same as the last sigma in the training schedule. If <code>&quot;zero&quot;</code>, the final sigma is set to 0.`,name:"final_sigmas_type"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L136"}}),P=new D({props:{name:"add_noise",anchor:"diffusers.EulerDiscreteScheduler.add_noise",parameters:[{name:"original_samples",val:": Tensor"},{name:"noise",val:": Tensor"},{name:"timesteps",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.add_noise.noise",description:`<strong>noise</strong> (<code>torch.Tensor</code>) &#x2014;
The noise tensor to add to the original samples.`,name:"noise"},{anchor:"diffusers.EulerDiscreteScheduler.add_noise.timesteps",description:`<strong>timesteps</strong> (<code>torch.Tensor</code>) &#x2014;
The timesteps at which to add noise, determining the noise level from the schedule.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L795",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The noisy samples with added noise scaled according to the timestep schedule.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),M=new D({props:{name:"get_velocity",anchor:"diffusers.EulerDiscreteScheduler.get_velocity",parameters:[{name:"sample",val:": Tensor"},{name:"noise",val:": Tensor"},{name:"timesteps",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.get_velocity.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The input sample for which to compute the velocity.`,name:"sample"},{anchor:"diffusers.EulerDiscreteScheduler.get_velocity.noise",description:`<strong>noise</strong> (<code>torch.Tensor</code>) &#x2014;
The noise tensor corresponding to the sample.`,name:"noise"},{anchor:"diffusers.EulerDiscreteScheduler.get_velocity.timesteps",description:`<strong>timesteps</strong> (<code>torch.Tensor</code>) &#x2014;
The timesteps at which to compute the velocity.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L843",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The velocity prediction computed as <code>sqrt(alpha_prod) * noise - sqrt(1 - alpha_prod) * sample</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),k=new D({props:{name:"index_for_timestep",anchor:"diffusers.EulerDiscreteScheduler.index_for_timestep",parameters:[{name:"timestep",val:": typing.Union[float, torch.Tensor]"},{name:"schedule_timesteps",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.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_euler_discrete.py#L633",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>
`}}),F=new D({props:{name:"scale_model_input",anchor:"diffusers.EulerDiscreteScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"timestep",val:": typing.Union[float, torch.Tensor]"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The input sample to be scaled.`,name:"sample"},{anchor:"diffusers.EulerDiscreteScheduler.scale_model_input.timestep",description:`<strong>timestep</strong> (<code>float</code> or <code>torch.Tensor</code>) &#x2014;
The current timestep in the diffusion chain.`,name:"timestep"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L319",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A scaled input sample, divided by <code>(sigma**2 + 1) ** 0.5</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),H=new D({props:{name:"set_begin_index",anchor:"diffusers.EulerDiscreteScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.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_euler_discrete.py#L309"}}),V=new D({props:{name:"set_timesteps",anchor:"diffusers.EulerDiscreteScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": typing.Optional[int] = None"},{name:"device",val:": typing.Union[str, torch.device, NoneType] = None"},{name:"timesteps",val:": typing.Optional[typing.List[int]] = None"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.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 <code>None</code>,
<code>timesteps</code> or <code>sigmas</code> must be provided.`,name:"num_inference_steps"},{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.set_timesteps.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps used to support arbitrary timesteps schedule. If <code>None</code>, timesteps will be generated
based on the <code>timestep_spacing</code> attribute. If <code>timesteps</code> is passed, <code>num_inference_steps</code> and <code>sigmas</code>
must be <code>None</code>, and <code>timestep_spacing</code> attribute will be ignored.`,name:"timesteps"},{anchor:"diffusers.EulerDiscreteScheduler.set_timesteps.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom sigmas used to support arbitrary timesteps schedule. If <code>None</code>, timesteps and sigmas will be
generated based on the relevant scheduler attributes. If <code>sigmas</code> is passed, <code>num_inference_steps</code> and
<code>timesteps</code> must be <code>None</code>, and the timesteps will be generated based on the custom sigmas schedule.`,name:"sigmas"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L343"}}),A=new D({props:{name:"step",anchor:"diffusers.EulerDiscreteScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": typing.Union[float, torch.Tensor]"},{name:"sample",val:": Tensor"},{name:"s_churn",val:": float = 0.0"},{name:"s_tmin",val:": float = 0.0"},{name:"s_tmax",val:": float = inf"},{name:"s_noise",val:": float = 1.0"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.step.timestep",description:`<strong>timestep</strong> (<code>float</code> or <code>torch.Tensor</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.EulerDiscreteScheduler.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.EulerDiscreteScheduler.step.s_churn",description:`<strong>s_churn</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.0</code>) &#x2014;
Stochasticity parameter that controls the amount of noise added during sampling. Higher values increase
randomness.`,name:"s_churn"},{anchor:"diffusers.EulerDiscreteScheduler.step.s_tmin",description:`<strong>s_tmin</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.0</code>) &#x2014;
Minimum timestep threshold for applying stochasticity. Only timesteps above this value will have noise
added.`,name:"s_tmin"},{anchor:"diffusers.EulerDiscreteScheduler.step.s_tmax",description:`<strong>s_tmax</strong> (<code>float</code>, <em>optional</em>, defaults to <code>inf</code>) &#x2014;
Maximum timestep threshold for applying stochasticity. Only timesteps below this value will have noise
added.`,name:"s_tmax"},{anchor:"diffusers.EulerDiscreteScheduler.step.s_noise",description:`<strong>s_noise</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1.0</code>) &#x2014;
Scaling factor for noise added to the sample.`,name:"s_noise"},{anchor:"diffusers.EulerDiscreteScheduler.step.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A random number generator for reproducible sampling.`,name:"generator"},{anchor:"diffusers.EulerDiscreteScheduler.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/euler#diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput">EulerDiscreteSchedulerOutput</a> or
tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L678",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/schedulers/euler#diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput"
>EulerDiscreteSchedulerOutput</a> is
returned, otherwise a tuple is returned where the first element is the sample tensor and the second
element is the predicted original sample.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/schedulers/euler#diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput"
>EulerDiscreteSchedulerOutput</a> or <code>tuple</code></p>
`}}),U=new Ae({props:{title:"EulerDiscreteSchedulerOutput",local:"diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput",headingTag:"h2"}}),W=new D({props:{name:"class diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput",anchor:"diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput",parameters:[{name:"prev_sample",val:": Tensor"},{name:"pred_original_sample",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput.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_euler_discrete.EulerDiscreteSchedulerOutput.pred_original_sample",description:`<strong>pred_original_sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code> for images) &#x2014;
The predicted denoised sample <code>(x_{0})</code> based on the model output from the current timestep.
<code>pred_original_sample</code> can be used to preview progress or for guidance.`,name:"pred_original_sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_euler_discrete.py#L36"}}),G=new dt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/euler.md"}}),{c(){y=i("meta"),ne=s(),re=i("p"),ie=s(),u(L.$$.fragment),ae=s(),u(O.$$.fragment),de=s(),I=i("p"),I.innerHTML=We,ce=s(),u(N.$$.fragment),le=s(),n=i("div"),u(z.$$.fragment),De=s(),R=i("p"),R.textContent=Ge,Te=s(),K=i("p"),K.innerHTML=Re,Ee=s(),T=i("div"),u(P.$$.fragment),Se=s(),B=i("p"),B.textContent=Ke,qe=s(),x=i("div"),u(M.$$.fragment),we=s(),j=i("p"),j.textContent=Be,Ce=s(),Y=i("p"),Y.textContent=je,Le=s(),E=i("div"),u(k.$$.fragment),Oe=s(),J=i("p"),J.textContent=Ye,Ie=s(),S=i("div"),u(F.$$.fragment),Ne=s(),Q=i("p"),Q.innerHTML=Je,ze=s(),q=i("div"),u(H.$$.fragment),Pe=s(),X=i("p"),X.textContent=Qe,Me=s(),w=i("div"),u(V.$$.fragment),ke=s(),Z=i("p"),Z.textContent=Xe,Fe=s(),C=i("div"),u(A.$$.fragment),He=s(),ee=i("p"),ee.textContent=Ze,ue=s(),u(U.$$.fragment),pe=s(),$=i("div"),u(W.$$.fragment),Ve=s(),te=i("p"),te.innerHTML=et,me=s(),u(G.$$.fragment),he=s(),oe=i("p"),this.h()},l(e){const d=it("svelte-u9bgzb",document.head);y=a(d,"META",{name:!0,content:!0}),d.forEach(r),ne=o(e),re=a(e,"P",{}),b(re).forEach(r),ie=o(e),p(L.$$.fragment,e),ae=o(e),p(O.$$.fragment,e),de=o(e),I=a(e,"P",{"data-svelte-h":!0}),_(I)!=="svelte-1gv4s4b"&&(I.innerHTML=We),ce=o(e),p(N.$$.fragment,e),le=o(e),n=a(e,"DIV",{class:!0});var c=b(n);p(z.$$.fragment,c),De=o(c),R=a(c,"P",{"data-svelte-h":!0}),_(R)!=="svelte-rqsn3u"&&(R.textContent=Ge),Te=o(c),K=a(c,"P",{"data-svelte-h":!0}),_(K)!=="svelte-linuuh"&&(K.innerHTML=Re),Ee=o(c),T=a(c,"DIV",{class:!0});var ge=b(T);p(P.$$.fragment,ge),Se=o(ge),B=a(ge,"P",{"data-svelte-h":!0}),_(B)!=="svelte-rz9b5o"&&(B.textContent=Ke),ge.forEach(r),qe=o(c),x=a(c,"DIV",{class:!0});var se=b(x);p(M.$$.fragment,se),we=o(se),j=a(se,"P",{"data-svelte-h":!0}),_(j)!=="svelte-1b4zpzq"&&(j.textContent=Be),Ce=o(se),Y=a(se,"P",{"data-svelte-h":!0}),_(Y)!=="svelte-1vcte17"&&(Y.textContent=je),se.forEach(r),Le=o(c),E=a(c,"DIV",{class:!0});var _e=b(E);p(k.$$.fragment,_e),Oe=o(_e),J=a(_e,"P",{"data-svelte-h":!0}),_(J)!=="svelte-1xn85hs"&&(J.textContent=Ye),_e.forEach(r),Ie=o(c),S=a(c,"DIV",{class:!0});var be=b(S);p(F.$$.fragment,be),Ne=o(be),Q=a(be,"P",{"data-svelte-h":!0}),_(Q)!=="svelte-1hew89w"&&(Q.innerHTML=Je),be.forEach(r),ze=o(c),q=a(c,"DIV",{class:!0});var ve=b(q);p(H.$$.fragment,ve),Pe=o(ve),X=a(ve,"P",{"data-svelte-h":!0}),_(X)!=="svelte-1k141rk"&&(X.textContent=Qe),ve.forEach(r),Me=o(c),w=a(c,"DIV",{class:!0});var xe=b(w);p(V.$$.fragment,xe),ke=o(xe),Z=a(xe,"P",{"data-svelte-h":!0}),_(Z)!=="svelte-1vzm9q"&&(Z.textContent=Xe),xe.forEach(r),Fe=o(c),C=a(c,"DIV",{class:!0});var ye=b(C);p(A.$$.fragment,ye),He=o(ye),ee=a(ye,"P",{"data-svelte-h":!0}),_(ee)!=="svelte-hi84tp"&&(ee.textContent=Ze),ye.forEach(r),c.forEach(r),ue=o(e),p(U.$$.fragment,e),pe=o(e),$=a(e,"DIV",{class:!0});var $e=b($);p(W.$$.fragment,$e),Ve=o($e),te=a($e,"P",{"data-svelte-h":!0}),_(te)!=="svelte-id9kic"&&(te.innerHTML=et),$e.forEach(r),me=o(e),p(G.$$.fragment,e),he=o(e),oe=a(e,"P",{}),b(oe).forEach(r),this.h()},h(){v(y,"name","hf:doc:metadata"),v(y,"content",lt),v(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(E,"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(q,"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(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(n,"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")},m(e,d){t(document.head,y),l(e,ne,d),l(e,re,d),l(e,ie,d),m(L,e,d),l(e,ae,d),m(O,e,d),l(e,de,d),l(e,I,d),l(e,ce,d),m(N,e,d),l(e,le,d),l(e,n,d),m(z,n,null),t(n,De),t(n,R),t(n,Te),t(n,K),t(n,Ee),t(n,T),m(P,T,null),t(T,Se),t(T,B),t(n,qe),t(n,x),m(M,x,null),t(x,we),t(x,j),t(x,Ce),t(x,Y),t(n,Le),t(n,E),m(k,E,null),t(E,Oe),t(E,J),t(n,Ie),t(n,S),m(F,S,null),t(S,Ne),t(S,Q),t(n,ze),t(n,q),m(H,q,null),t(q,Pe),t(q,X),t(n,Me),t(n,w),m(V,w,null),t(w,ke),t(w,Z),t(n,Fe),t(n,C),m(A,C,null),t(C,He),t(C,ee),l(e,ue,d),m(U,e,d),l(e,pe,d),l(e,$,d),m(W,$,null),t($,Ve),t($,te),l(e,me,d),m(G,e,d),l(e,he,d),l(e,oe,d),fe=!0},p:st,i(e){fe||(h(L.$$.fragment,e),h(O.$$.fragment,e),h(N.$$.fragment,e),h(z.$$.fragment,e),h(P.$$.fragment,e),h(M.$$.fragment,e),h(k.$$.fragment,e),h(F.$$.fragment,e),h(H.$$.fragment,e),h(V.$$.fragment,e),h(A.$$.fragment,e),h(U.$$.fragment,e),h(W.$$.fragment,e),h(G.$$.fragment,e),fe=!0)},o(e){f(L.$$.fragment,e),f(O.$$.fragment,e),f(N.$$.fragment,e),f(z.$$.fragment,e),f(P.$$.fragment,e),f(M.$$.fragment,e),f(k.$$.fragment,e),f(F.$$.fragment,e),f(H.$$.fragment,e),f(V.$$.fragment,e),f(A.$$.fragment,e),f(U.$$.fragment,e),f(W.$$.fragment,e),f(G.$$.fragment,e),fe=!1},d(e){e&&(r(ne),r(re),r(ie),r(ae),r(de),r(I),r(ce),r(le),r(n),r(ue),r(pe),r($),r(me),r(he),r(oe)),r(y),g(L,e),g(O,e),g(N,e),g(z),g(P),g(M),g(k),g(F),g(H),g(V),g(A),g(U,e),g(W),g(G,e)}}}const lt='{"title":"EulerDiscreteScheduler","local":"eulerdiscretescheduler","sections":[{"title":"EulerDiscreteScheduler","local":"diffusers.EulerDiscreteScheduler","sections":[],"depth":2},{"title":"EulerDiscreteSchedulerOutput","local":"diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput","sections":[],"depth":2}],"depth":1}';function ut(Ue){return rt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _t extends ot{constructor(y){super(),nt(this,y,ut,ct,tt,{})}}export{_t as component};
