import{s as Ft,n as zt,o as Ht}from"../chunks/scheduler.53228c21.js";import{S as Nt,i as Vt,e as i,s as o,c as p,h as At,a as d,d as s,b as n,f as v,g as m,j as u,k as x,l as t,m as c,n as f,t as h,o as g,p as _}from"../chunks/index.100fac89.js";import{C as Wt}from"../chunks/CopyLLMTxtMenu.999d3d86.js";import{D as b}from"../chunks/Docstring.46d0934e.js";import{H as Be,E as Ut}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.d27ae4df.js";function jt(gt){let S,ve,ge,xe,O,be,P,Se,k,_t='Diffusion Exponential Integrator Sampler (DEIS) is proposed in <a href="https://huggingface.co/papers/2204.13902" rel="nofollow">Fast Sampling of Diffusion Models with Exponential Integrator</a> by Qinsheng Zhang and Yongxin Chen. <code>DEISMultistepScheduler</code> is a fast high order solver for diffusion ordinary differential equations (ODEs).',ye,F,vt="This implementation modifies the polynomial fitting formula in log-rho space instead of the original linear <code>t</code> space in the DEIS paper. The modification enjoys closed-form coefficients for exponential multistep update instead of replying on the numerical solver.",$e,z,xt="The abstract from the paper is:",De,H,bt='<em>The past few years have witnessed the great success of Diffusion models~(DMs) in generating high-fidelity samples in generative modeling tasks. A major limitation of the DM is its notoriously slow sampling procedure which normally requires hundreds to thousands of time discretization steps of the learned diffusion process to reach the desired accuracy. Our goal is to develop a fast sampling method for DMs with a much less number of steps while retaining high sample quality. To this end, we systematically analyze the sampling procedure in DMs and identify key factors that affect the sample quality, among which the method of discretization is most crucial. By carefully examining the learned diffusion process, we propose Diffusion Exponential Integrator Sampler~(DEIS). It is based on the Exponential Integrator designed for discretizing ordinary differential equations (ODEs) and leverages a semilinear structure of the learned diffusion process to reduce the discretization error. The proposed method can be applied to any DMs and can generate high-fidelity samples in as few as 10 steps. In our experiments, it takes about 3 minutes on one A6000 GPU to generate 50k images from CIFAR10. Moreover, by directly using pre-trained DMs, we achieve the state-of-art sampling performance when the number of score function evaluation~(NFE) is limited, e.g., 4.17 FID with 10 NFEs, 3.37 FID, and 9.74 IS with only 15 NFEs on CIFAR10. Code is available at <a href="https://github.com/qsh-zh/deis" rel="nofollow">this https URL</a>.</em>',Te,N,Ie,V,St='It is recommended to set <code>solver_order</code> to 2 or 3, while <code>solver_order=1</code> is equivalent to <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>.',Ee,A,yt=`Dynamic thresholding from <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen</a> is supported, and for pixel-space
diffusion models, you can set <code>thresholding=True</code> to use the dynamic thresholding.`,Me,W,we,a,U,Ge,oe,$t="<code>DEISMultistepScheduler</code> is a fast high order solver for diffusion ordinary differential equations (ODEs).",Ye,ne,Dt=`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.`,Ke,$,j,Qe,re,Tt="Add noise to the original samples according to the noise schedule at the specified timesteps.",Ze,D,R,Je,ie,It="Convert the model output to the corresponding type the DEIS algorithm needs.",Xe,T,B,et,de,Et="One step for the first-order DEIS (equivalent to DDIM).",tt,I,G,st,ae,Mt="Find the index for a given timestep in the schedule.",ot,E,Y,nt,le,wt="One step for the second-order multistep DEIS.",rt,M,K,it,ce,qt="One step for the third-order multistep DEIS.",dt,w,Q,at,ue,Ct=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,lt,q,Z,ct,pe,Lt="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",ut,C,J,pt,me,Ot="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",mt,L,X,ft,fe,Pt=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the multistep DEIS.`,qe,ee,Ce,y,te,ht,he,kt="Base class for the output of a scheduler’s <code>step</code> function.",Le,se,Oe,_e,Pe;return O=new Wt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),P=new Be({props:{title:"DEISMultistepScheduler",local:"deismultistepscheduler",headingTag:"h1"}}),N=new Be({props:{title:"Tips",local:"tips",headingTag:"h2"}}),W=new Be({props:{title:"DEISMultistepScheduler",local:"diffusers.DEISMultistepScheduler",headingTag:"h2"}}),U=new b({props:{name:"class diffusers.DEISMultistepScheduler",anchor:"diffusers.DEISMultistepScheduler",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:"solver_order",val:": int = 2"},{name:"prediction_type",val:": typing.Literal['epsilon', 'sample', 'v_prediction', 'flow_prediction'] = 'epsilon'"},{name:"thresholding",val:": bool = False"},{name:"dynamic_thresholding_ratio",val:": float = 0.995"},{name:"sample_max_value",val:": float = 1.0"},{name:"algorithm_type",val:": typing.Literal['deis'] = 'deis'"},{name:"solver_type",val:": typing.Literal['logrho'] = 'logrho'"},{name:"lower_order_final",val:": bool = True"},{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:"use_flow_sigmas",val:": typing.Optional[bool] = False"},{name:"flow_shift",val:": typing.Optional[float] = 1.0"},{name:"timestep_spacing",val:": typing.Literal['linspace', 'leading', 'trailing'] = 'linspace'"},{name:"steps_offset",val:": int = 0"},{name:"use_dynamic_shifting",val:": bool = False"},{name:"time_shift_type",val:": typing.Literal['exponential'] = 'exponential'"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.num_train_timesteps",description:`<strong>num_train_timesteps</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
The number of diffusion steps to train the model.`,name:"num_train_timesteps"},{anchor:"diffusers.DEISMultistepScheduler.beta_start",description:`<strong>beta_start</strong> (<code>float</code>, defaults to <code>0.0001</code>) &#x2014;
The starting <code>beta</code> value of inference.`,name:"beta_start"},{anchor:"diffusers.DEISMultistepScheduler.beta_end",description:`<strong>beta_end</strong> (<code>float</code>, defaults to <code>0.02</code>) &#x2014;
The final <code>beta</code> value.`,name:"beta_end"},{anchor:"diffusers.DEISMultistepScheduler.beta_schedule",description:`<strong>beta_schedule</strong> (<code>&quot;linear&quot;</code>, <code>&quot;scaled_linear&quot;</code>, or <code>&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>linear</code>, <code>scaled_linear</code>, or <code>squaredcos_cap_v2</code>.`,name:"beta_schedule"},{anchor:"diffusers.DEISMultistepScheduler.trained_betas",description:`<strong>trained_betas</strong> (<code>np.ndarray</code> or <code>List[float]</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.DEISMultistepScheduler.solver_order",description:`<strong>solver_order</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014;
The DEIS order which can be <code>1</code> or <code>2</code> or <code>3</code>. It is recommended to use <code>solver_order=2</code> for guided
sampling, and <code>solver_order=3</code> for unconditional sampling.`,name:"solver_order"},{anchor:"diffusers.DEISMultistepScheduler.prediction_type",description:`<strong>prediction_type</strong> (<code>&quot;epsilon&quot;</code>, <code>&quot;sample&quot;</code>, <code>&quot;v_prediction&quot;</code>, or <code>&quot;flow_prediction&quot;</code>, defaults to <code>&quot;epsilon&quot;</code>) &#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>), </code>v_prediction<code>(see section 2.4 of [Imagen Video](https://huggingface.co/papers/2210.02303) paper), or</code>flow_prediction\`.`,name:"prediction_type"},{anchor:"diffusers.DEISMultistepScheduler.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.DEISMultistepScheduler.dynamic_thresholding_ratio",description:`<strong>dynamic_thresholding_ratio</strong> (<code>float</code>, defaults to <code>0.995</code>) &#x2014;
The ratio for the dynamic thresholding method. Valid only when <code>thresholding=True</code>.`,name:"dynamic_thresholding_ratio"},{anchor:"diffusers.DEISMultistepScheduler.sample_max_value",description:`<strong>sample_max_value</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
The threshold value for dynamic thresholding. Valid only when <code>thresholding=True</code>.`,name:"sample_max_value"},{anchor:"diffusers.DEISMultistepScheduler.algorithm_type",description:`<strong>algorithm_type</strong> (<code>&quot;deis&quot;</code>, defaults to <code>&quot;deis&quot;</code>) &#x2014;
The algorithm type for the solver.`,name:"algorithm_type"},{anchor:"diffusers.DEISMultistepScheduler.solver_type",description:`<strong>solver_type</strong> (<code>&quot;logrho&quot;</code>, defaults to <code>&quot;logrho&quot;</code>) &#x2014;
Solver type for DEIS.`,name:"solver_type"},{anchor:"diffusers.DEISMultistepScheduler.lower_order_final",description:`<strong>lower_order_final</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to use lower-order solvers in the final steps. Only valid for &lt; 15 inference steps.`,name:"lower_order_final"},{anchor:"diffusers.DEISMultistepScheduler.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.DEISMultistepScheduler.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.DEISMultistepScheduler.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.DEISMultistepScheduler.use_flow_sigmas",description:`<strong>use_flow_sigmas</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use flow sigmas for step sizes in the noise schedule during the sampling process.`,name:"use_flow_sigmas"},{anchor:"diffusers.DEISMultistepScheduler.flow_shift",description:`<strong>flow_shift</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1.0</code>) &#x2014;
The flow shift parameter for flow-based models.`,name:"flow_shift"},{anchor:"diffusers.DEISMultistepScheduler.timestep_spacing",description:`<strong>timestep_spacing</strong> (<code>&quot;linspace&quot;</code>, <code>&quot;leading&quot;</code>, or <code>&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.DEISMultistepScheduler.steps_offset",description:`<strong>steps_offset</strong> (<code>int</code>, defaults to <code>0</code>) &#x2014;
An offset added to the inference steps, as required by some model families.`,name:"steps_offset"},{anchor:"diffusers.DEISMultistepScheduler.use_dynamic_shifting",description:`<strong>use_dynamic_shifting</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to use dynamic shifting for the noise schedule.`,name:"use_dynamic_shifting"},{anchor:"diffusers.DEISMultistepScheduler.time_shift_type",description:`<strong>time_shift_type</strong> (<code>&quot;exponential&quot;</code>, defaults to <code>&quot;exponential&quot;</code>) &#x2014;
The type of time shifting to apply.`,name:"time_shift_type"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L79"}}),j=new b({props:{name:"add_noise",anchor:"diffusers.DEISMultistepScheduler.add_noise",parameters:[{name:"original_samples",val:": Tensor"},{name:"noise",val:": Tensor"},{name:"timesteps",val:": IntTensor"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.add_noise.original_samples",description:`<strong>original_samples</strong> (<code>torch.Tensor</code>) &#x2014;
The original samples without noise.`,name:"original_samples"},{anchor:"diffusers.DEISMultistepScheduler.add_noise.noise",description:`<strong>noise</strong> (<code>torch.Tensor</code>) &#x2014;
The noise to add to the samples.`,name:"noise"},{anchor:"diffusers.DEISMultistepScheduler.add_noise.timesteps",description:`<strong>timesteps</strong> (<code>torch.IntTensor</code>) &#x2014;
The timesteps at which to add noise to the samples.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L993",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>
`}}),R=new b({props:{name:"convert_model_output",anchor:"diffusers.DEISMultistepScheduler.convert_model_output",parameters:[{name:"model_output",val:": Tensor"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.convert_model_output.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.DEISMultistepScheduler.convert_model_output.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.convert_model_output.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
A current instance of a sample created by the diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L579",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),B=new b({props:{name:"deis_first_order_update",anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update",parameters:[{name:"model_output",val:": Tensor"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.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.DEISMultistepScheduler.deis_first_order_update.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.prev_timestep",description:`<strong>prev_timestep</strong> (<code>int</code>) &#x2014;
The previous discrete timestep in the diffusion chain.`,name:"prev_timestep"},{anchor:"diffusers.DEISMultistepScheduler.deis_first_order_update.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
A current instance of a sample created by the diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L639",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),G=new b({props:{name:"index_for_timestep",anchor:"diffusers.DEISMultistepScheduler.index_for_timestep",parameters:[{name:"timestep",val:": typing.Union[int, torch.Tensor]"},{name:"schedule_timesteps",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.index_for_timestep.timestep",description:`<strong>timestep</strong> (<code>int</code> or <code>torch.Tensor</code>) &#x2014;
The timestep for which to find the index.`,name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.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_deis_multistep.py#L862",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The index of the timestep in the schedule.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),Y=new b({props:{name:"multistep_deis_second_order_update",anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update",parameters:[{name:"model_output_list",val:": typing.List[torch.Tensor]"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update.model_output_list",description:`<strong>model_output_list</strong> (<code>List[torch.Tensor]</code>) &#x2014;
The direct outputs from learned diffusion model at current and latter timesteps.`,name:"model_output_list"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_second_order_update.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
A current instance of a sample created by the diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L700",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),K=new b({props:{name:"multistep_deis_third_order_update",anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update",parameters:[{name:"model_output_list",val:": typing.List[torch.Tensor]"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update.model_output_list",description:`<strong>model_output_list</strong> (<code>List[torch.Tensor]</code>) &#x2014;
The direct outputs from learned diffusion model at current and latter timesteps.`,name:"model_output_list"},{anchor:"diffusers.DEISMultistepScheduler.multistep_deis_third_order_update.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
A current instance of a sample created by diffusion process.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L773",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),Q=new b({props:{name:"scale_model_input",anchor:"diffusers.DEISMultistepScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The input sample.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L977",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>
`}}),Z=new b({props:{name:"set_begin_index",anchor:"diffusers.DEISMultistepScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.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_deis_multistep.py#L255"}}),J=new b({props:{name:"set_timesteps",anchor:"diffusers.DEISMultistepScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"device",val:": typing.Union[str, torch.device] = None"},{name:"mu",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.set_timesteps.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>) &#x2014;
The number of diffusion steps used when generating samples with a pre-trained model.`,name:"num_inference_steps"},{anchor:"diffusers.DEISMultistepScheduler.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.DEISMultistepScheduler.set_timesteps.mu",description:`<strong>mu</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The mu parameter for dynamic shifting. Only used when <code>use_dynamic_shifting=True</code> and
<code>time_shift_type=&quot;exponential&quot;</code>.`,name:"mu"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L265"}}),X=new b({props:{name:"step",anchor:"diffusers.DEISMultistepScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": typing.Union[int, torch.Tensor]"},{name:"sample",val:": Tensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DEISMultistepScheduler.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.DEISMultistepScheduler.step.timestep",description:`<strong>timestep</strong> (<code>int</code> or <code>torch.Tensor</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DEISMultistepScheduler.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.DEISMultistepScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.schedulers.scheduling_utils.SchedulerOutput">SchedulerOutput</a> or <code>tuple</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_deis_multistep.py#L913",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/pndm#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</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><a
  href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),ee=new Be({props:{title:"SchedulerOutput",local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",headingTag:"h2"}}),te=new b({props:{name:"class diffusers.schedulers.scheduling_utils.SchedulerOutput",anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput",parameters:[{name:"prev_sample",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput.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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_utils.py#L62"}}),se=new Ut({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/deis.md"}}),{c(){S=i("meta"),ve=o(),ge=i("p"),xe=o(),p(O.$$.fragment),be=o(),p(P.$$.fragment),Se=o(),k=i("p"),k.innerHTML=_t,ye=o(),F=i("p"),F.innerHTML=vt,$e=o(),z=i("p"),z.textContent=xt,De=o(),H=i("p"),H.innerHTML=bt,Te=o(),p(N.$$.fragment),Ie=o(),V=i("p"),V.innerHTML=St,Ee=o(),A=i("p"),A.innerHTML=yt,Me=o(),p(W.$$.fragment),we=o(),a=i("div"),p(U.$$.fragment),Ge=o(),oe=i("p"),oe.innerHTML=$t,Ye=o(),ne=i("p"),ne.innerHTML=Dt,Ke=o(),$=i("div"),p(j.$$.fragment),Qe=o(),re=i("p"),re.textContent=Tt,Ze=o(),D=i("div"),p(R.$$.fragment),Je=o(),ie=i("p"),ie.textContent=It,Xe=o(),T=i("div"),p(B.$$.fragment),et=o(),de=i("p"),de.textContent=Et,tt=o(),I=i("div"),p(G.$$.fragment),st=o(),ae=i("p"),ae.textContent=Mt,ot=o(),E=i("div"),p(Y.$$.fragment),nt=o(),le=i("p"),le.textContent=wt,rt=o(),M=i("div"),p(K.$$.fragment),it=o(),ce=i("p"),ce.textContent=qt,dt=o(),w=i("div"),p(Q.$$.fragment),at=o(),ue=i("p"),ue.textContent=Ct,lt=o(),q=i("div"),p(Z.$$.fragment),ct=o(),pe=i("p"),pe.textContent=Lt,ut=o(),C=i("div"),p(J.$$.fragment),pt=o(),me=i("p"),me.textContent=Ot,mt=o(),L=i("div"),p(X.$$.fragment),ft=o(),fe=i("p"),fe.textContent=Pt,qe=o(),p(ee.$$.fragment),Ce=o(),y=i("div"),p(te.$$.fragment),ht=o(),he=i("p"),he.innerHTML=kt,Le=o(),p(se.$$.fragment),Oe=o(),_e=i("p"),this.h()},l(e){const r=At("svelte-u9bgzb",document.head);S=d(r,"META",{name:!0,content:!0}),r.forEach(s),ve=n(e),ge=d(e,"P",{}),v(ge).forEach(s),xe=n(e),m(O.$$.fragment,e),be=n(e),m(P.$$.fragment,e),Se=n(e),k=d(e,"P",{"data-svelte-h":!0}),u(k)!=="svelte-dg2wky"&&(k.innerHTML=_t),ye=n(e),F=d(e,"P",{"data-svelte-h":!0}),u(F)!=="svelte-2kur53"&&(F.innerHTML=vt),$e=n(e),z=d(e,"P",{"data-svelte-h":!0}),u(z)!=="svelte-1cwsb16"&&(z.textContent=xt),De=n(e),H=d(e,"P",{"data-svelte-h":!0}),u(H)!=="svelte-1qgxh8f"&&(H.innerHTML=bt),Te=n(e),m(N.$$.fragment,e),Ie=n(e),V=d(e,"P",{"data-svelte-h":!0}),u(V)!=="svelte-1wcaqyo"&&(V.innerHTML=St),Ee=n(e),A=d(e,"P",{"data-svelte-h":!0}),u(A)!=="svelte-jfe2b1"&&(A.innerHTML=yt),Me=n(e),m(W.$$.fragment,e),we=n(e),a=d(e,"DIV",{class:!0});var l=v(a);m(U.$$.fragment,l),Ge=n(l),oe=d(l,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-1maiz98"&&(oe.innerHTML=$t),Ye=n(l),ne=d(l,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-linuuh"&&(ne.innerHTML=Dt),Ke=n(l),$=d(l,"DIV",{class:!0});var ke=v($);m(j.$$.fragment,ke),Qe=n(ke),re=d(ke,"P",{"data-svelte-h":!0}),u(re)!=="svelte-rz9b5o"&&(re.textContent=Tt),ke.forEach(s),Ze=n(l),D=d(l,"DIV",{class:!0});var Fe=v(D);m(R.$$.fragment,Fe),Je=n(Fe),ie=d(Fe,"P",{"data-svelte-h":!0}),u(ie)!=="svelte-10z04zf"&&(ie.textContent=It),Fe.forEach(s),Xe=n(l),T=d(l,"DIV",{class:!0});var ze=v(T);m(B.$$.fragment,ze),et=n(ze),de=d(ze,"P",{"data-svelte-h":!0}),u(de)!=="svelte-9410ii"&&(de.textContent=Et),ze.forEach(s),tt=n(l),I=d(l,"DIV",{class:!0});var He=v(I);m(G.$$.fragment,He),st=n(He),ae=d(He,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-1c8f4j7"&&(ae.textContent=Mt),He.forEach(s),ot=n(l),E=d(l,"DIV",{class:!0});var Ne=v(E);m(Y.$$.fragment,Ne),nt=n(Ne),le=d(Ne,"P",{"data-svelte-h":!0}),u(le)!=="svelte-4wni6b"&&(le.textContent=wt),Ne.forEach(s),rt=n(l),M=d(l,"DIV",{class:!0});var Ve=v(M);m(K.$$.fragment,Ve),it=n(Ve),ce=d(Ve,"P",{"data-svelte-h":!0}),u(ce)!=="svelte-cktso6"&&(ce.textContent=qt),Ve.forEach(s),dt=n(l),w=d(l,"DIV",{class:!0});var Ae=v(w);m(Q.$$.fragment,Ae),at=n(Ae),ue=d(Ae,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-1rkfgpx"&&(ue.textContent=Ct),Ae.forEach(s),lt=n(l),q=d(l,"DIV",{class:!0});var We=v(q);m(Z.$$.fragment,We),ct=n(We),pe=d(We,"P",{"data-svelte-h":!0}),u(pe)!=="svelte-1k141rk"&&(pe.textContent=Lt),We.forEach(s),ut=n(l),C=d(l,"DIV",{class:!0});var Ue=v(C);m(J.$$.fragment,Ue),pt=n(Ue),me=d(Ue,"P",{"data-svelte-h":!0}),u(me)!=="svelte-1vzm9q"&&(me.textContent=Ot),Ue.forEach(s),mt=n(l),L=d(l,"DIV",{class:!0});var je=v(L);m(X.$$.fragment,je),ft=n(je),fe=d(je,"P",{"data-svelte-h":!0}),u(fe)!=="svelte-vbpl4u"&&(fe.textContent=Pt),je.forEach(s),l.forEach(s),qe=n(e),m(ee.$$.fragment,e),Ce=n(e),y=d(e,"DIV",{class:!0});var Re=v(y);m(te.$$.fragment,Re),ht=n(Re),he=d(Re,"P",{"data-svelte-h":!0}),u(he)!=="svelte-6ojmkw"&&(he.innerHTML=kt),Re.forEach(s),Le=n(e),m(se.$$.fragment,e),Oe=n(e),_e=d(e,"P",{}),v(_e).forEach(s),this.h()},h(){x(S,"name","hf:doc:metadata"),x(S,"content",Rt),x($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(a,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(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,r){t(document.head,S),c(e,ve,r),c(e,ge,r),c(e,xe,r),f(O,e,r),c(e,be,r),f(P,e,r),c(e,Se,r),c(e,k,r),c(e,ye,r),c(e,F,r),c(e,$e,r),c(e,z,r),c(e,De,r),c(e,H,r),c(e,Te,r),f(N,e,r),c(e,Ie,r),c(e,V,r),c(e,Ee,r),c(e,A,r),c(e,Me,r),f(W,e,r),c(e,we,r),c(e,a,r),f(U,a,null),t(a,Ge),t(a,oe),t(a,Ye),t(a,ne),t(a,Ke),t(a,$),f(j,$,null),t($,Qe),t($,re),t(a,Ze),t(a,D),f(R,D,null),t(D,Je),t(D,ie),t(a,Xe),t(a,T),f(B,T,null),t(T,et),t(T,de),t(a,tt),t(a,I),f(G,I,null),t(I,st),t(I,ae),t(a,ot),t(a,E),f(Y,E,null),t(E,nt),t(E,le),t(a,rt),t(a,M),f(K,M,null),t(M,it),t(M,ce),t(a,dt),t(a,w),f(Q,w,null),t(w,at),t(w,ue),t(a,lt),t(a,q),f(Z,q,null),t(q,ct),t(q,pe),t(a,ut),t(a,C),f(J,C,null),t(C,pt),t(C,me),t(a,mt),t(a,L),f(X,L,null),t(L,ft),t(L,fe),c(e,qe,r),f(ee,e,r),c(e,Ce,r),c(e,y,r),f(te,y,null),t(y,ht),t(y,he),c(e,Le,r),f(se,e,r),c(e,Oe,r),c(e,_e,r),Pe=!0},p:zt,i(e){Pe||(h(O.$$.fragment,e),h(P.$$.fragment,e),h(N.$$.fragment,e),h(W.$$.fragment,e),h(U.$$.fragment,e),h(j.$$.fragment,e),h(R.$$.fragment,e),h(B.$$.fragment,e),h(G.$$.fragment,e),h(Y.$$.fragment,e),h(K.$$.fragment,e),h(Q.$$.fragment,e),h(Z.$$.fragment,e),h(J.$$.fragment,e),h(X.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(se.$$.fragment,e),Pe=!0)},o(e){g(O.$$.fragment,e),g(P.$$.fragment,e),g(N.$$.fragment,e),g(W.$$.fragment,e),g(U.$$.fragment,e),g(j.$$.fragment,e),g(R.$$.fragment,e),g(B.$$.fragment,e),g(G.$$.fragment,e),g(Y.$$.fragment,e),g(K.$$.fragment,e),g(Q.$$.fragment,e),g(Z.$$.fragment,e),g(J.$$.fragment,e),g(X.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(se.$$.fragment,e),Pe=!1},d(e){e&&(s(ve),s(ge),s(xe),s(be),s(Se),s(k),s(ye),s(F),s($e),s(z),s(De),s(H),s(Te),s(Ie),s(V),s(Ee),s(A),s(Me),s(we),s(a),s(qe),s(Ce),s(y),s(Le),s(Oe),s(_e)),s(S),_(O,e),_(P,e),_(N,e),_(W,e),_(U),_(j),_(R),_(B),_(G),_(Y),_(K),_(Q),_(Z),_(J),_(X),_(ee,e),_(te),_(se,e)}}}const Rt='{"title":"DEISMultistepScheduler","local":"deismultistepscheduler","sections":[{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"DEISMultistepScheduler","local":"diffusers.DEISMultistepScheduler","sections":[],"depth":2},{"title":"SchedulerOutput","local":"diffusers.schedulers.scheduling_utils.SchedulerOutput","sections":[],"depth":2}],"depth":1}';function Bt(gt){return Ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jt extends Nt{constructor(S){super(),Vt(this,S,Bt,jt,Ft,{})}}export{Jt as component};
