import{s as qt,o as Ht,n as kt}from"../chunks/scheduler.8c3d61f6.js";import{S as Vt,i as Nt,g as o,s as r,r as m,A as zt,h as i,f as s,c as n,j as S,u as f,x as c,k as b,y as t,a as p,v as h,d as g,t as _,w as v}from"../chunks/index.589a98e8.js";import{T as At}from"../chunks/Tip.42aa8582.js";import{D as x}from"../chunks/Docstring.27406313.js";import{H as ft,E as Ft}from"../chunks/EditOnGithub.e5a8d9cb.js";function jt(be){let u,H=`The algorithm and model type are decoupled. You can use either DPMSolver or DPMSolver++ for both noise
prediction and data prediction models.`;return{c(){u=o("p"),u.textContent=H},l($){u=i($,"P",{"data-svelte-h":!0}),c(u)!=="svelte-95n5s"&&(u.textContent=H)},m($,ne){p($,u,ne)},p:kt,d($){$&&s(u)}}}function Ut(be){let u,H,$,ne,k,xe,V,ht='<code>DPMSolverSinglestepScheduler</code> is a single step 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,N,gt=`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.`,De,z,_t='The original implementation can be found at <a href="https://github.com/LuChengTHU/dpm-solver" rel="nofollow">LuChengTHU/dpm-solver</a>.',Te,A,Pe,F,vt="It is recommended to set <code>solver_order</code> to 2 for guide sampling, and <code>solver_order=3</code> for unconditional sampling.",Me,j,St=`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 dynamic
thresholding. This thresholding method is unsuitable for latent-space diffusion models such as
Stable Diffusion.`,ye,U,we,l,W,We,oe,bt="<code>DPMSolverSinglestepScheduler</code> is a fast dedicated high-order solver for diffusion ODEs.",Ge,ie,xt=`This model inherits from <a href="/docs/diffusers/pr_8462/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/pr_8462/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.`,Be,D,G,Je,de,$t=`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.`,Ye,P,Ze,M,B,Ke,le,Dt="One step for the first-order DPMSolver (equivalent to DDIM).",Re,y,J,Qe,ae,Tt="Computes the solver order at each time step.",Xe,w,Y,et,pe,Pt=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,tt,C,Z,st,ce,Mt="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",rt,L,K,nt,ue,yt="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",ot,I,R,it,me,wt=`One step for the second-order singlestep DPMSolver that computes the solution at time <code>prev_timestep</code> from the
time <code>timestep_list[-2]</code>.`,dt,O,Q,lt,fe,Ct=`One step for the third-order singlestep DPMSolver that computes the solution at time <code>prev_timestep</code> from the
time <code>timestep_list[-3]</code>.`,at,E,X,pt,he,Lt="One step for the singlestep DPMSolver.",ct,q,ee,ut,ge,It=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the singlestep DPMSolver.`,Ce,te,Ot="## SchedulerOutput[[diffusers.schedulers.scheduling_utils.SchedulerOutput]]",Le,T,se,mt,_e,Et="Base class for the output of a scheduler’s <code>step</code> function.",Ie,re,Oe,Se,Ee;return k=new ft({props:{title:"DPMSolverSinglestepScheduler",local:"dpmsolversinglestepscheduler",headingTag:"h1"}}),A=new ft({props:{title:"Tips",local:"tips",headingTag:"h2"}}),U=new ft({props:{title:"DPMSolverSinglestepScheduler",local:"diffusers.DPMSolverSinglestepScheduler",headingTag:"h2"}}),W=new x({props:{name:"class diffusers.DPMSolverSinglestepScheduler",anchor:"diffusers.DPMSolverSinglestepScheduler",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:": Optional = 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 = False"},{name:"use_karras_sigmas",val:": Optional = False"},{name:"final_sigmas_type",val:": Optional = 'zero'"},{name:"lambda_min_clipped",val:": float = -inf"},{name:"variance_type",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, defaults to <code>epsilon</code>, <em>optional</em>) &#x2014;
Prediction type of the scheduler function; can be <code>epsilon</code> (predicts the noise of the diffusion process),
<code>sample</code> (directly predicts the noisy sample<code>) or </code>v_prediction\` (see section 2.4 of <a href="https://imagen.research.google/video/paper.pdf" rel="nofollow">Imagen
Video</a> paper).`,name:"prediction_type"},{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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> or <code>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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.final_sigmas_type",description:`<strong>final_sigmas_type</strong> (<code>str</code>, <em>optional</em>, 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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L76"}}),G=new x({props:{name:"convert_model_output",anchor:"diffusers.DPMSolverSinglestepScheduler.convert_model_output",parameters:[{name:"model_output",val:": Tensor"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L454",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>
`}}),P=new At({props:{$$slots:{default:[jt]},$$scope:{ctx:be}}}),B=new x({props:{name:"dpm_solver_first_order_update",anchor:"diffusers.DPMSolverSinglestepScheduler.dpm_solver_first_order_update",parameters:[{name:"model_output",val:": Tensor"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.dpm_solver_first_order_update.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DPMSolverSinglestepScheduler.dpm_solver_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.DPMSolverSinglestepScheduler.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/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L543",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 x({props:{name:"get_order_list",anchor:"diffusers.DPMSolverSinglestepScheduler.get_order_list",parameters:[{name:"num_inference_steps",val:": int"}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.get_order_list.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L216"}}),Y=new x({props:{name:"scale_model_input",anchor:"diffusers.DPMSolverSinglestepScheduler.scale_model_input",parameters:[{name:"sample",val:": Tensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L953",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 x({props:{name:"set_begin_index",anchor:"diffusers.DPMSolverSinglestepScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L267"}}),K=new x({props:{name:"set_timesteps",anchor:"diffusers.DPMSolverSinglestepScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int = None"},{name:"device",val:": Union = None"},{name:"timesteps",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.set_timesteps.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps used to support arbitrary spacing between timesteps. If <code>None</code>, then the default
timestep spacing strategy of equal spacing between timesteps schedule is used. If <code>timesteps</code> is
passed, <code>num_inference_steps</code> must be <code>None</code>.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L277"}}),R=new x({props:{name:"singlestep_dpm_solver_second_order_update",anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_second_order_update",parameters:[{name:"model_output_list",val:": List"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_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.DPMSolverSinglestepScheduler.singlestep_dpm_solver_second_order_update.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current and latter discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_second_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.DPMSolverSinglestepScheduler.singlestep_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/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L599",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 x({props:{name:"singlestep_dpm_solver_third_order_update",anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_third_order_update",parameters:[{name:"model_output_list",val:": List"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_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.DPMSolverSinglestepScheduler.singlestep_dpm_solver_third_order_update.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current and latter discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_third_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.DPMSolverSinglestepScheduler.singlestep_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/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L693",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>
`}}),X=new x({props:{name:"singlestep_dpm_solver_update",anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_update",parameters:[{name:"model_output_list",val:": List"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"order",val:": int = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_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.DPMSolverSinglestepScheduler.singlestep_dpm_solver_update.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current and latter discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_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.DPMSolverSinglestepScheduler.singlestep_dpm_solver_update.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
A current instance of a sample created by diffusion process.`,name:"sample"},{anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_update.order",description:`<strong>order</strong> (<code>int</code>) &#x2014;
The solver order at this step.`,name:"order"}],source:"https://github.com/huggingface/diffusers/blob/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L797",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>
`}}),ee=new x({props:{name:"step",anchor:"diffusers.DPMSolverSinglestepScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": int"},{name:"sample",val:": Tensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.step.timestep",description:`<strong>timestep</strong> (<code>int</code>) &#x2014;
The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.DPMSolverSinglestepScheduler.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.DPMSolverSinglestepScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/pr_8462/en/api/schedulers/multistep_dpm_solver#diffusers.schedulers.scheduling_utils.SchedulerOutput">SchedulerOutput</a> or <code>tuple</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_8462/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L892",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If return_dict is <code>True</code>, <a
  href="/docs/diffusers/pr_8462/en/api/schedulers/multistep_dpm_solver#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/pr_8462/en/api/schedulers/multistep_dpm_solver#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),se=new x({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/vr_8462/src/diffusers/schedulers/scheduling_utils.py#L60"}}),re=new Ft({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/singlestep_dpm_solver.md"}}),{c(){u=o("meta"),H=r(),$=o("p"),ne=r(),m(k.$$.fragment),xe=r(),V=o("p"),V.innerHTML=ht,$e=r(),N=o("p"),N.textContent=gt,De=r(),z=o("p"),z.innerHTML=_t,Te=r(),m(A.$$.fragment),Pe=r(),F=o("p"),F.innerHTML=vt,Me=r(),j=o("p"),j.innerHTML=St,ye=r(),m(U.$$.fragment),we=r(),l=o("div"),m(W.$$.fragment),We=r(),oe=o("p"),oe.innerHTML=bt,Ge=r(),ie=o("p"),ie.innerHTML=xt,Be=r(),D=o("div"),m(G.$$.fragment),Je=r(),de=o("p"),de.textContent=$t,Ye=r(),m(P.$$.fragment),Ze=r(),M=o("div"),m(B.$$.fragment),Ke=r(),le=o("p"),le.textContent=Dt,Re=r(),y=o("div"),m(J.$$.fragment),Qe=r(),ae=o("p"),ae.textContent=Tt,Xe=r(),w=o("div"),m(Y.$$.fragment),et=r(),pe=o("p"),pe.textContent=Pt,tt=r(),C=o("div"),m(Z.$$.fragment),st=r(),ce=o("p"),ce.textContent=Mt,rt=r(),L=o("div"),m(K.$$.fragment),nt=r(),ue=o("p"),ue.textContent=yt,ot=r(),I=o("div"),m(R.$$.fragment),it=r(),me=o("p"),me.innerHTML=wt,dt=r(),O=o("div"),m(Q.$$.fragment),lt=r(),fe=o("p"),fe.innerHTML=Ct,at=r(),E=o("div"),m(X.$$.fragment),pt=r(),he=o("p"),he.textContent=Lt,ct=r(),q=o("div"),m(ee.$$.fragment),ut=r(),ge=o("p"),ge.textContent=It,Ce=r(),te=o("p"),te.textContent=Ot,Le=r(),T=o("div"),m(se.$$.fragment),mt=r(),_e=o("p"),_e.innerHTML=Et,Ie=r(),m(re.$$.fragment),Oe=r(),Se=o("p"),this.h()},l(e){const d=zt("svelte-u9bgzb",document.head);u=i(d,"META",{name:!0,content:!0}),d.forEach(s),H=n(e),$=i(e,"P",{}),S($).forEach(s),ne=n(e),f(k.$$.fragment,e),xe=n(e),V=i(e,"P",{"data-svelte-h":!0}),c(V)!=="svelte-zw7rt6"&&(V.innerHTML=ht),$e=n(e),N=i(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-l6rv24"&&(N.textContent=gt),De=n(e),z=i(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-1mk5p6f"&&(z.innerHTML=_t),Te=n(e),f(A.$$.fragment,e),Pe=n(e),F=i(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-pt2glg"&&(F.innerHTML=vt),Me=n(e),j=i(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-18sd27c"&&(j.innerHTML=St),ye=n(e),f(U.$$.fragment,e),we=n(e),l=i(e,"DIV",{class:!0});var a=S(l);f(W.$$.fragment,a),We=n(a),oe=i(a,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-1g2jbmp"&&(oe.innerHTML=bt),Ge=n(a),ie=i(a,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-1q9yak9"&&(ie.innerHTML=xt),Be=n(a),D=i(a,"DIV",{class:!0});var ve=S(D);f(G.$$.fragment,ve),Je=n(ve),de=i(ve,"P",{"data-svelte-h":!0}),c(de)!=="svelte-1st02i8"&&(de.textContent=$t),Ye=n(ve),f(P.$$.fragment,ve),ve.forEach(s),Ze=n(a),M=i(a,"DIV",{class:!0});var qe=S(M);f(B.$$.fragment,qe),Ke=n(qe),le=i(qe,"P",{"data-svelte-h":!0}),c(le)!=="svelte-4nw43d"&&(le.textContent=Dt),qe.forEach(s),Re=n(a),y=i(a,"DIV",{class:!0});var He=S(y);f(J.$$.fragment,He),Qe=n(He),ae=i(He,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-13tpuy9"&&(ae.textContent=Tt),He.forEach(s),Xe=n(a),w=i(a,"DIV",{class:!0});var ke=S(w);f(Y.$$.fragment,ke),et=n(ke),pe=i(ke,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-1rkfgpx"&&(pe.textContent=Pt),ke.forEach(s),tt=n(a),C=i(a,"DIV",{class:!0});var Ve=S(C);f(Z.$$.fragment,Ve),st=n(Ve),ce=i(Ve,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-1k141rk"&&(ce.textContent=Mt),Ve.forEach(s),rt=n(a),L=i(a,"DIV",{class:!0});var Ne=S(L);f(K.$$.fragment,Ne),nt=n(Ne),ue=i(Ne,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-1vzm9q"&&(ue.textContent=yt),Ne.forEach(s),ot=n(a),I=i(a,"DIV",{class:!0});var ze=S(I);f(R.$$.fragment,ze),it=n(ze),me=i(ze,"P",{"data-svelte-h":!0}),c(me)!=="svelte-1rmndna"&&(me.innerHTML=wt),ze.forEach(s),dt=n(a),O=i(a,"DIV",{class:!0});var Ae=S(O);f(Q.$$.fragment,Ae),lt=n(Ae),fe=i(Ae,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-17kajtk"&&(fe.innerHTML=Ct),Ae.forEach(s),at=n(a),E=i(a,"DIV",{class:!0});var Fe=S(E);f(X.$$.fragment,Fe),pt=n(Fe),he=i(Fe,"P",{"data-svelte-h":!0}),c(he)!=="svelte-zgpbva"&&(he.textContent=Lt),Fe.forEach(s),ct=n(a),q=i(a,"DIV",{class:!0});var je=S(q);f(ee.$$.fragment,je),ut=n(je),ge=i(je,"P",{"data-svelte-h":!0}),c(ge)!=="svelte-7earhm"&&(ge.textContent=It),je.forEach(s),a.forEach(s),Ce=n(e),te=i(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-jslqpb"&&(te.textContent=Ot),Le=n(e),T=i(e,"DIV",{class:!0});var Ue=S(T);f(se.$$.fragment,Ue),mt=n(Ue),_e=i(Ue,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-6ojmkw"&&(_e.innerHTML=Et),Ue.forEach(s),Ie=n(e),f(re.$$.fragment,e),Oe=n(e),Se=i(e,"P",{}),S(Se).forEach(s),this.h()},h(){b(u,"name","hf:doc:metadata"),b(u,"content",Wt),b(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(T,"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,u),p(e,H,d),p(e,$,d),p(e,ne,d),h(k,e,d),p(e,xe,d),p(e,V,d),p(e,$e,d),p(e,N,d),p(e,De,d),p(e,z,d),p(e,Te,d),h(A,e,d),p(e,Pe,d),p(e,F,d),p(e,Me,d),p(e,j,d),p(e,ye,d),h(U,e,d),p(e,we,d),p(e,l,d),h(W,l,null),t(l,We),t(l,oe),t(l,Ge),t(l,ie),t(l,Be),t(l,D),h(G,D,null),t(D,Je),t(D,de),t(D,Ye),h(P,D,null),t(l,Ze),t(l,M),h(B,M,null),t(M,Ke),t(M,le),t(l,Re),t(l,y),h(J,y,null),t(y,Qe),t(y,ae),t(l,Xe),t(l,w),h(Y,w,null),t(w,et),t(w,pe),t(l,tt),t(l,C),h(Z,C,null),t(C,st),t(C,ce),t(l,rt),t(l,L),h(K,L,null),t(L,nt),t(L,ue),t(l,ot),t(l,I),h(R,I,null),t(I,it),t(I,me),t(l,dt),t(l,O),h(Q,O,null),t(O,lt),t(O,fe),t(l,at),t(l,E),h(X,E,null),t(E,pt),t(E,he),t(l,ct),t(l,q),h(ee,q,null),t(q,ut),t(q,ge),p(e,Ce,d),p(e,te,d),p(e,Le,d),p(e,T,d),h(se,T,null),t(T,mt),t(T,_e),p(e,Ie,d),h(re,e,d),p(e,Oe,d),p(e,Se,d),Ee=!0},p(e,[d]){const a={};d&2&&(a.$$scope={dirty:d,ctx:e}),P.$set(a)},i(e){Ee||(g(k.$$.fragment,e),g(A.$$.fragment,e),g(U.$$.fragment,e),g(W.$$.fragment,e),g(G.$$.fragment,e),g(P.$$.fragment,e),g(B.$$.fragment,e),g(J.$$.fragment,e),g(Y.$$.fragment,e),g(Z.$$.fragment,e),g(K.$$.fragment,e),g(R.$$.fragment,e),g(Q.$$.fragment,e),g(X.$$.fragment,e),g(ee.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),Ee=!0)},o(e){_(k.$$.fragment,e),_(A.$$.fragment,e),_(U.$$.fragment,e),_(W.$$.fragment,e),_(G.$$.fragment,e),_(P.$$.fragment,e),_(B.$$.fragment,e),_(J.$$.fragment,e),_(Y.$$.fragment,e),_(Z.$$.fragment,e),_(K.$$.fragment,e),_(R.$$.fragment,e),_(Q.$$.fragment,e),_(X.$$.fragment,e),_(ee.$$.fragment,e),_(se.$$.fragment,e),_(re.$$.fragment,e),Ee=!1},d(e){e&&(s(H),s($),s(ne),s(xe),s(V),s($e),s(N),s(De),s(z),s(Te),s(Pe),s(F),s(Me),s(j),s(ye),s(we),s(l),s(Ce),s(te),s(Le),s(T),s(Ie),s(Oe),s(Se)),s(u),v(k,e),v(A,e),v(U,e),v(W),v(G),v(P),v(B),v(J),v(Y),v(Z),v(K),v(R),v(Q),v(X),v(ee),v(se),v(re,e)}}}const Wt='{"title":"DPMSolverSinglestepScheduler","local":"dpmsolversinglestepscheduler","sections":[{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"DPMSolverSinglestepScheduler","local":"diffusers.DPMSolverSinglestepScheduler","sections":[],"depth":2}],"depth":1}';function Gt(be){return Ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rt extends Vt{constructor(u){super(),Nt(this,u,Gt,Ut,qt,{})}}export{Rt as component};
