import{s as xt,n as yt,o as Dt}from"../chunks/scheduler.53228c21.js";import{S as $t,i as Tt,e as i,s as o,c as u,h as Pt,a as d,d as s,b as r,f as b,g as m,j as p,k as v,l as t,m as l,n as f,t as h,o as g,p as _}from"../chunks/index.100fac89.js";import{C as wt}from"../chunks/CopyLLMTxtMenu.494046bd.js";import{D as M}from"../chunks/Docstring.9bbf7d33.js";import{H as Fe,E as Ct}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8999c127.js";function Lt(rt){let x,me,pe,fe,O,he,E,ge,I,nt='<code>DPMSolverMultistepScheduler</code> is a multistep scheduler from <a href="https://huggingface.co/papers/2206.00927" rel="nofollow">DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Steps</a> and <a href="https://huggingface.co/papers/2211.01095" rel="nofollow">DPM-Solver++: Fast Solver for Guided Sampling of Diffusion Probabilistic Models</a> by Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu.',_e,q,it=`DPMSolver (and the improved version DPMSolver++) is a fast dedicated high-order solver for diffusion ODEs with convergence order guarantee. Empirically, DPMSolver sampling with only 20 steps can generate high-quality
samples, and it can generate quite good samples even in 10 steps.`,ve,N,be,z,dt="It is recommended to set <code>solver_order</code> to 2 for guide sampling, and <code>solver_order=3</code> for unconditional sampling.",Se,F,at=`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 both <code>algorithm_type=&quot;dpmsolver++&quot;</code> and <code>thresholding=True</code> to use the dynamic
thresholding. This thresholding method is unsuitable for latent-space diffusion models such as
Stable Diffusion.`,Me,k,lt="The SDE variant of DPMSolver and DPM-Solver++ is also supported, but only for the first and second-order solvers. This is a fast SDE solver for the reverse diffusion SDE. It is recommended to use the second-order <code>sde-dpmsolver++</code>.",xe,H,ye,a,A,ke,X,ct="<code>DPMSolverMultistepScheduler</code> is a fast dedicated high-order solver for diffusion ODEs.",He,ee,pt=`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.`,Ae,S,V,Ve,te,ut=`Convert the model output to the corresponding type the DPMSolver/DPMSolver++ algorithm needs. DPM-Solver is
designed to discretize an integral of the noise prediction model, and DPM-Solver++ is designed to discretize an
integral of the data prediction model.`,We,W,mt=`<p>&gt; The algorithm and model type are decoupled. You can use either DPMSolver or DPMSolver++ for both
noise &gt; prediction and data prediction models.</p>`,Ue,D,U,Re,se,ft="One step for the first-order DPMSolver (equivalent to DDIM).",je,$,R,Be,oe,ht="One step for the second-order multistep DPMSolver.",Ge,T,j,Ye,re,gt="One step for the third-order multistep DPMSolver.",Je,P,B,Ke,ne,_t=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,Ze,w,G,Qe,ie,vt="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",Xe,C,Y,et,de,bt="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",tt,L,J,st,ae,St=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the multistep DPMSolver.`,De,K,$e,y,Z,ot,le,Mt="Base class for the output of a scheduler’s <code>step</code> function.",Te,Q,Pe,ue,we;return O=new wt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),E=new Fe({props:{title:"DPMSolverMultistepScheduler",local:"dpmsolvermultistepscheduler",headingTag:"h1"}}),N=new Fe({props:{title:"Tips",local:"tips",headingTag:"h2"}}),H=new Fe({props:{title:"DPMSolverMultistepScheduler",local:"diffusers.DPMSolverMultistepScheduler",headingTag:"h2"}}),A=new M({props:{name:"class diffusers.DPMSolverMultistepScheduler",anchor:"diffusers.DPMSolverMultistepScheduler",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:": str = 'linear'"},{name:"trained_betas",val:": typing.Union[numpy.ndarray, typing.List[float], NoneType] = None"},{name:"solver_order",val:": int = 2"},{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:"algorithm_type",val:": str = 'dpmsolver++'"},{name:"solver_type",val:": str = 'midpoint'"},{name:"lower_order_final",val:": bool = True"},{name:"euler_at_final",val:": bool = False"},{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_lu_lambdas",val:": typing.Optional[bool] = False"},{name:"use_flow_sigmas",val:": typing.Optional[bool] = False"},{name:"flow_shift",val:": typing.Optional[float] = 1.0"},{name:"final_sigmas_type",val:": typing.Optional[str] = 'zero'"},{name:"lambda_min_clipped",val:": float = -inf"},{name:"variance_type",val:": typing.Optional[str] = None"},{name:"timestep_spacing",val:": str = 'linspace'"},{name:"steps_offset",val:": int = 0"},{name:"rescale_betas_zero_snr",val:": bool = False"},{name:"use_dynamic_shifting",val:": bool = False"},{name:"time_shift_type",val:": str = 'exponential'"}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.solver_order",description:`<strong>solver_order</strong> (<code>int</code>, defaults to 2) &#x2014;
The DPMSolver 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.DPMSolverMultistepScheduler.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>v_prediction</code> (see section 2.4 of <a href="https://imagen.research.google/video/paper.pdf" rel="nofollow">Imagen
Video</a> paper), or <code>flow_prediction</code>.`,name:"prediction_type"},{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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> and
<code>algorithm_type=&quot;dpmsolver++&quot;</code>.`,name:"sample_max_value"},{anchor:"diffusers.DPMSolverMultistepScheduler.algorithm_type",description:`<strong>algorithm_type</strong> (<code>str</code>, defaults to <code>dpmsolver++</code>) &#x2014;
Algorithm type for the solver; can be <code>dpmsolver</code>, <code>dpmsolver++</code>, <code>sde-dpmsolver</code> or <code>sde-dpmsolver++</code>. The
<code>dpmsolver</code> type implements the algorithms in the <a href="https://huggingface.co/papers/2206.00927" rel="nofollow">DPMSolver</a>
paper, and the <code>dpmsolver++</code> type implements the algorithms in the
<a href="https://huggingface.co/papers/2211.01095" rel="nofollow">DPMSolver++</a> paper. It is recommended to use <code>dpmsolver++</code> or
<code>sde-dpmsolver++</code> with <code>solver_order=2</code> for guided sampling like in Stable Diffusion.`,name:"algorithm_type"},{anchor:"diffusers.DPMSolverMultistepScheduler.solver_type",description:`<strong>solver_type</strong> (<code>str</code>, defaults to <code>midpoint</code>) &#x2014;
Solver type for the second-order solver; can be <code>midpoint</code> or <code>heun</code>. The solver type slightly affects the
sample quality, especially for a small number of steps. It is recommended to use <code>midpoint</code> solvers.`,name:"solver_type"},{anchor:"diffusers.DPMSolverMultistepScheduler.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. This can
stabilize the sampling of DPMSolver for steps &lt; 15, especially for steps &lt;= 10.`,name:"lower_order_final"},{anchor:"diffusers.DPMSolverMultistepScheduler.euler_at_final",description:`<strong>euler_at_final</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to use Euler&#x2019;s method in the final step. It is a trade-off between numerical stability and detail
richness. This can stabilize the sampling of the SDE variant of DPMSolver for small number of inference
steps, but sometimes may result in blurring.`,name:"euler_at_final"},{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.use_lu_lambdas",description:`<strong>use_lu_lambdas</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use the uniform-logSNR for step sizes proposed by Lu&#x2019;s DPM-Solver in the noise schedule during
the sampling process. If <code>True</code>, the sigmas and time steps are determined according to a sequence of
<code>lambda(t)</code>.`,name:"use_lu_lambdas"},{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.flow_shift",description:`<strong>flow_shift</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The shift value for the timestep schedule for flow matching.`,name:"flow_shift"},{anchor:"diffusers.DPMSolverMultistepScheduler.final_sigmas_type",description:`<strong>final_sigmas_type</strong> (<code>str</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>zero</code>, the final sigma is set to 0.`,name:"final_sigmas_type"},{anchor:"diffusers.DPMSolverMultistepScheduler.lambda_min_clipped",description:`<strong>lambda_min_clipped</strong> (<code>float</code>, defaults to <code>-inf</code>) &#x2014;
Clipping threshold for the minimum value of <code>lambda(t)</code> for numerical stability. This is critical for the
cosine (<code>squaredcos_cap_v2</code>) noise schedule.`,name:"lambda_min_clipped"},{anchor:"diffusers.DPMSolverMultistepScheduler.variance_type",description:`<strong>variance_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Set to &#x201C;learned&#x201D; or &#x201C;learned_range&#x201D; for diffusion models that predict variance. If set, the model&#x2019;s output
contains the predicted Gaussian variance.`,name:"variance_type"},{anchor:"diffusers.DPMSolverMultistepScheduler.timestep_spacing",description:`<strong>timestep_spacing</strong> (<code>str</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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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_dpmsolver_multistep.py#L115"}}),V=new M({props:{name:"convert_model_output",anchor:"diffusers.DPMSolverMultistepScheduler.convert_model_output",parameters:[{name:"model_output",val:": Tensor"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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_dpmsolver_multistep.py#L631",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>
`}}),U=new M({props:{name:"dpm_solver_first_order_update",anchor:"diffusers.DPMSolverMultistepScheduler.dpm_solver_first_order_update",parameters:[{name:"model_output",val:": Tensor"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"noise",val:": typing.Optional[torch.Tensor] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.dpm_solver_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.DPMSolverMultistepScheduler.dpm_solver_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_dpmsolver_multistep.py#L729",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>
`}}),R=new M({props:{name:"multistep_dpm_solver_second_order_update",anchor:"diffusers.DPMSolverMultistepScheduler.multistep_dpm_solver_second_order_update",parameters:[{name:"model_output_list",val:": typing.List[torch.Tensor]"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"noise",val:": typing.Optional[torch.Tensor] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.multistep_dpm_solver_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.DPMSolverMultistepScheduler.multistep_dpm_solver_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_dpmsolver_multistep.py#L798",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>
`}}),j=new M({props:{name:"multistep_dpm_solver_third_order_update",anchor:"diffusers.DPMSolverMultistepScheduler.multistep_dpm_solver_third_order_update",parameters:[{name:"model_output_list",val:": typing.List[torch.Tensor]"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"noise",val:": typing.Optional[torch.Tensor] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.multistep_dpm_solver_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.DPMSolverMultistepScheduler.multistep_dpm_solver_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_dpmsolver_multistep.py#L921",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>
`}}),B=new M({props:{name:"scale_model_input",anchor:"diffusers.DPMSolverMultistepScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.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_dpmsolver_multistep.py#L1136",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>
`}}),G=new M({props:{name:"set_begin_index",anchor:"diffusers.DPMSolverMultistepScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.set_begin_index.begin_index",description:`<strong>begin_index</strong> (<code>int</code>) &#x2014;
The begin index for the scheduler.`,name:"begin_index"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py#L321"}}),Y=new M({props:{name:"set_timesteps",anchor:"diffusers.DPMSolverMultistepScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int = None"},{name:"device",val:": typing.Union[str, torch.device] = None"},{name:"mu",val:": typing.Optional[float] = None"},{name:"timesteps",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py#L331"}}),J=new M({props:{name:"step",anchor:"diffusers.DPMSolverMultistepScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": typing.Union[int, torch.Tensor]"},{name:"sample",val:": Tensor"},{name:"generator",val:" = None"},{name:"variance_noise",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.step.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DPMSolverMultistepScheduler.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.DPMSolverMultistepScheduler.step.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A random number generator.`,name:"generator"},{anchor:"diffusers.DPMSolverMultistepScheduler.step.variance_noise",description:`<strong>variance_noise</strong> (<code>torch.Tensor</code>) &#x2014;
Alternative to generating noise with <code>generator</code> by directly providing the noise for the variance
itself. Useful for methods such as <code>LEdits++</code>.`,name:"variance_noise"},{anchor:"diffusers.DPMSolverMultistepScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</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_dpmsolver_multistep.py#L1047",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>
`}}),K=new Fe({props:{title:"SchedulerOutput",local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",headingTag:"h2"}}),Z=new M({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"}}),Q=new Ct({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/multistep_dpm_solver.md"}}),{c(){x=i("meta"),me=o(),pe=i("p"),fe=o(),u(O.$$.fragment),he=o(),u(E.$$.fragment),ge=o(),I=i("p"),I.innerHTML=nt,_e=o(),q=i("p"),q.textContent=it,ve=o(),u(N.$$.fragment),be=o(),z=i("p"),z.innerHTML=dt,Se=o(),F=i("p"),F.innerHTML=at,Me=o(),k=i("p"),k.innerHTML=lt,xe=o(),u(H.$$.fragment),ye=o(),a=i("div"),u(A.$$.fragment),ke=o(),X=i("p"),X.innerHTML=ct,He=o(),ee=i("p"),ee.innerHTML=pt,Ae=o(),S=i("div"),u(V.$$.fragment),Ve=o(),te=i("p"),te.textContent=ut,We=o(),W=i("blockquote"),W.innerHTML=mt,Ue=o(),D=i("div"),u(U.$$.fragment),Re=o(),se=i("p"),se.textContent=ft,je=o(),$=i("div"),u(R.$$.fragment),Be=o(),oe=i("p"),oe.textContent=ht,Ge=o(),T=i("div"),u(j.$$.fragment),Ye=o(),re=i("p"),re.textContent=gt,Je=o(),P=i("div"),u(B.$$.fragment),Ke=o(),ne=i("p"),ne.textContent=_t,Ze=o(),w=i("div"),u(G.$$.fragment),Qe=o(),ie=i("p"),ie.textContent=vt,Xe=o(),C=i("div"),u(Y.$$.fragment),et=o(),de=i("p"),de.textContent=bt,tt=o(),L=i("div"),u(J.$$.fragment),st=o(),ae=i("p"),ae.textContent=St,De=o(),u(K.$$.fragment),$e=o(),y=i("div"),u(Z.$$.fragment),ot=o(),le=i("p"),le.innerHTML=Mt,Te=o(),u(Q.$$.fragment),Pe=o(),ue=i("p"),this.h()},l(e){const n=Pt("svelte-u9bgzb",document.head);x=d(n,"META",{name:!0,content:!0}),n.forEach(s),me=r(e),pe=d(e,"P",{}),b(pe).forEach(s),fe=r(e),m(O.$$.fragment,e),he=r(e),m(E.$$.fragment,e),ge=r(e),I=d(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-194x5ku"&&(I.innerHTML=nt),_e=r(e),q=d(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-l6rv24"&&(q.textContent=it),ve=r(e),m(N.$$.fragment,e),be=r(e),z=d(e,"P",{"data-svelte-h":!0}),p(z)!=="svelte-pt2glg"&&(z.innerHTML=dt),Se=r(e),F=d(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-1ng0gyl"&&(F.innerHTML=at),Me=r(e),k=d(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-18n28n2"&&(k.innerHTML=lt),xe=r(e),m(H.$$.fragment,e),ye=r(e),a=d(e,"DIV",{class:!0});var c=b(a);m(A.$$.fragment,c),ke=r(c),X=d(c,"P",{"data-svelte-h":!0}),p(X)!=="svelte-12v1qo2"&&(X.innerHTML=ct),He=r(c),ee=d(c,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-linuuh"&&(ee.innerHTML=pt),Ae=r(c),S=d(c,"DIV",{class:!0});var ce=b(S);m(V.$$.fragment,ce),Ve=r(ce),te=d(ce,"P",{"data-svelte-h":!0}),p(te)!=="svelte-1st02i8"&&(te.textContent=ut),We=r(ce),W=d(ce,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(W)!=="svelte-lwd2ft"&&(W.innerHTML=mt),ce.forEach(s),Ue=r(c),D=d(c,"DIV",{class:!0});var Ce=b(D);m(U.$$.fragment,Ce),Re=r(Ce),se=d(Ce,"P",{"data-svelte-h":!0}),p(se)!=="svelte-4nw43d"&&(se.textContent=ft),Ce.forEach(s),je=r(c),$=d(c,"DIV",{class:!0});var Le=b($);m(R.$$.fragment,Le),Be=r(Le),oe=d(Le,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-1d6o6zu"&&(oe.textContent=ht),Le.forEach(s),Ge=r(c),T=d(c,"DIV",{class:!0});var Oe=b(T);m(j.$$.fragment,Oe),Ye=r(Oe),re=d(Oe,"P",{"data-svelte-h":!0}),p(re)!=="svelte-17nne8p"&&(re.textContent=gt),Oe.forEach(s),Je=r(c),P=d(c,"DIV",{class:!0});var Ee=b(P);m(B.$$.fragment,Ee),Ke=r(Ee),ne=d(Ee,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1rkfgpx"&&(ne.textContent=_t),Ee.forEach(s),Ze=r(c),w=d(c,"DIV",{class:!0});var Ie=b(w);m(G.$$.fragment,Ie),Qe=r(Ie),ie=d(Ie,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-1k141rk"&&(ie.textContent=vt),Ie.forEach(s),Xe=r(c),C=d(c,"DIV",{class:!0});var qe=b(C);m(Y.$$.fragment,qe),et=r(qe),de=d(qe,"P",{"data-svelte-h":!0}),p(de)!=="svelte-1vzm9q"&&(de.textContent=bt),qe.forEach(s),tt=r(c),L=d(c,"DIV",{class:!0});var Ne=b(L);m(J.$$.fragment,Ne),st=r(Ne),ae=d(Ne,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-7jbjgx"&&(ae.textContent=St),Ne.forEach(s),c.forEach(s),De=r(e),m(K.$$.fragment,e),$e=r(e),y=d(e,"DIV",{class:!0});var ze=b(y);m(Z.$$.fragment,ze),ot=r(ze),le=d(ze,"P",{"data-svelte-h":!0}),p(le)!=="svelte-6ojmkw"&&(le.innerHTML=Mt),ze.forEach(s),Te=r(e),m(Q.$$.fragment,e),Pe=r(e),ue=d(e,"P",{}),b(ue).forEach(s),this.h()},h(){v(x,"name","hf:doc:metadata"),v(x,"content",Ot),v(W,"class","tip"),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(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($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(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(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(a,"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,n){t(document.head,x),l(e,me,n),l(e,pe,n),l(e,fe,n),f(O,e,n),l(e,he,n),f(E,e,n),l(e,ge,n),l(e,I,n),l(e,_e,n),l(e,q,n),l(e,ve,n),f(N,e,n),l(e,be,n),l(e,z,n),l(e,Se,n),l(e,F,n),l(e,Me,n),l(e,k,n),l(e,xe,n),f(H,e,n),l(e,ye,n),l(e,a,n),f(A,a,null),t(a,ke),t(a,X),t(a,He),t(a,ee),t(a,Ae),t(a,S),f(V,S,null),t(S,Ve),t(S,te),t(S,We),t(S,W),t(a,Ue),t(a,D),f(U,D,null),t(D,Re),t(D,se),t(a,je),t(a,$),f(R,$,null),t($,Be),t($,oe),t(a,Ge),t(a,T),f(j,T,null),t(T,Ye),t(T,re),t(a,Je),t(a,P),f(B,P,null),t(P,Ke),t(P,ne),t(a,Ze),t(a,w),f(G,w,null),t(w,Qe),t(w,ie),t(a,Xe),t(a,C),f(Y,C,null),t(C,et),t(C,de),t(a,tt),t(a,L),f(J,L,null),t(L,st),t(L,ae),l(e,De,n),f(K,e,n),l(e,$e,n),l(e,y,n),f(Z,y,null),t(y,ot),t(y,le),l(e,Te,n),f(Q,e,n),l(e,Pe,n),l(e,ue,n),we=!0},p:yt,i(e){we||(h(O.$$.fragment,e),h(E.$$.fragment,e),h(N.$$.fragment,e),h(H.$$.fragment,e),h(A.$$.fragment,e),h(V.$$.fragment,e),h(U.$$.fragment,e),h(R.$$.fragment,e),h(j.$$.fragment,e),h(B.$$.fragment,e),h(G.$$.fragment,e),h(Y.$$.fragment,e),h(J.$$.fragment,e),h(K.$$.fragment,e),h(Z.$$.fragment,e),h(Q.$$.fragment,e),we=!0)},o(e){g(O.$$.fragment,e),g(E.$$.fragment,e),g(N.$$.fragment,e),g(H.$$.fragment,e),g(A.$$.fragment,e),g(V.$$.fragment,e),g(U.$$.fragment,e),g(R.$$.fragment,e),g(j.$$.fragment,e),g(B.$$.fragment,e),g(G.$$.fragment,e),g(Y.$$.fragment,e),g(J.$$.fragment,e),g(K.$$.fragment,e),g(Z.$$.fragment,e),g(Q.$$.fragment,e),we=!1},d(e){e&&(s(me),s(pe),s(fe),s(he),s(ge),s(I),s(_e),s(q),s(ve),s(be),s(z),s(Se),s(F),s(Me),s(k),s(xe),s(ye),s(a),s(De),s($e),s(y),s(Te),s(Pe),s(ue)),s(x),_(O,e),_(E,e),_(N,e),_(H,e),_(A),_(V),_(U),_(R),_(j),_(B),_(G),_(Y),_(J),_(K,e),_(Z),_(Q,e)}}}const Ot='{"title":"DPMSolverMultistepScheduler","local":"dpmsolvermultistepscheduler","sections":[{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"DPMSolverMultistepScheduler","local":"diffusers.DPMSolverMultistepScheduler","sections":[],"depth":2},{"title":"SchedulerOutput","local":"diffusers.schedulers.scheduling_utils.SchedulerOutput","sections":[],"depth":2}],"depth":1}';function Et(rt){return Dt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class kt extends $t{constructor(x){super(),Tt(this,x,Et,Lt,xt,{})}}export{kt as component};
