import{s as Ft,o as It,n as Ot}from"../chunks/scheduler.182ea377.js";import{S as Et,i as Ht,g as o,s as r,r as m,A as kt,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.abf12888.js";import{T as qt}from"../chunks/Tip.230e2334.js";import{D as x}from"../chunks/Docstring.93f6f462.js";import{H as je}from"../chunks/Heading.16916d63.js";function Vt(Se){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($,re){p($,u,re)},p:Ot,d($){$&&s(u)}}}function zt(Se){let u,H,$,re,k,be,q,mt='<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.',xe,V,ft=`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.`,$e,z,ht='The original implementation can be found at <a href="https://github.com/LuChengTHU/dpm-solver" rel="nofollow">LuChengTHU/dpm-solver</a>.',De,A,Te,N,gt="It is recommended to set <code>solver_order</code> to 2 for guide sampling, and <code>solver_order=3</code> for unconditional sampling.",Pe,j,_t=`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.`,Me,U,ye,l,W,Ue,ne,vt="<code>DPMSolverSinglestepScheduler</code> is a fast dedicated high-order solver for diffusion ODEs.",We,oe,St=`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.`,Be,D,B,Ge,ie,bt=`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.`,Je,P,Ye,M,G,Ze,de,xt="One step for the first-order DPMSolver (equivalent to DDIM).",Ke,y,J,Re,le,$t="Computes the solver order at each time step.",Qe,w,Y,Xe,ae,Dt=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,et,C,Z,tt,pe,Tt="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",st,L,K,rt,ce,Pt="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",nt,F,R,ot,ue,Mt=`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>.`,it,I,Q,dt,me,yt=`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>.`,lt,O,X,at,fe,wt="One step for the singlestep DPMSolver.",pt,E,ee,ct,he,Ct=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the singlestep DPMSolver.`,we,te,Ce,T,se,ut,ge,Lt="Base class for the output of a scheduler’s <code>step</code> function.",Le,ve,Fe;return k=new je({props:{title:"DPMSolverSinglestepScheduler",local:"dpmsolversinglestepscheduler",headingTag:"h1"}}),A=new je({props:{title:"Tips",local:"tips",headingTag:"h2"}}),U=new je({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 = True"},{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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L76"}}),B=new x({props:{name:"convert_model_output",anchor:"diffusers.DPMSolverSinglestepScheduler.convert_model_output",parameters:[{name:"model_output",val:": FloatTensor"},{name:"*args",val:""},{name:"sample",val:": FloatTensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.convert_model_output.model_output",description:`<strong>model_output</strong> (<code>torch.FloatTensor</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.FloatTensor</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_singlestep.py#L431",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.FloatTensor</code></p>
`}}),P=new qt({props:{$$slots:{default:[Vt]},$$scope:{ctx:Se}}}),G=new x({props:{name:"dpm_solver_first_order_update",anchor:"diffusers.DPMSolverSinglestepScheduler.dpm_solver_first_order_update",parameters:[{name:"model_output",val:": FloatTensor"},{name:"*args",val:""},{name:"sample",val:": FloatTensor = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.dpm_solver_first_order_update.model_output",description:`<strong>model_output</strong> (<code>torch.FloatTensor</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.FloatTensor</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_singlestep.py#L520",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.FloatTensor</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/main/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:": FloatTensor"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.scale_model_input.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014;
The input sample.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L930",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.FloatTensor</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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L265"}}),K=new x({props:{name:"set_timesteps",anchor:"diffusers.DPMSolverSinglestepScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int"},{name:"device",val:": Union = 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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L275"}}),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:": FloatTensor = 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.FloatTensor]</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.FloatTensor</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_singlestep.py#L576",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.FloatTensor</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:": FloatTensor = 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.FloatTensor]</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.FloatTensor</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_singlestep.py#L670",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.FloatTensor</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:": FloatTensor = 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.FloatTensor]</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.FloatTensor</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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L774",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.FloatTensor</code></p>
`}}),ee=new x({props:{name:"step",anchor:"diffusers.DPMSolverSinglestepScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": int"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.DPMSolverSinglestepScheduler.step.model_output",description:`<strong>model_output</strong> (<code>torch.FloatTensor</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.FloatTensor</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/main/en/api/schedulers/multistep_dpm_solver_inverse#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_singlestep.py#L869",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/multistep_dpm_solver_inverse#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/multistep_dpm_solver_inverse#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),te=new je({props:{title:"SchedulerOutput",local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",headingTag:"h2"}}),se=new x({props:{name:"class diffusers.schedulers.scheduling_utils.SchedulerOutput",anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput",parameters:[{name:"prev_sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput.prev_sample",description:`<strong>prev_sample</strong> (<code>torch.FloatTensor</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#L50"}}),{c(){u=o("meta"),H=r(),$=o("p"),re=r(),m(k.$$.fragment),be=r(),q=o("p"),q.innerHTML=mt,xe=r(),V=o("p"),V.textContent=ft,$e=r(),z=o("p"),z.innerHTML=ht,De=r(),m(A.$$.fragment),Te=r(),N=o("p"),N.innerHTML=gt,Pe=r(),j=o("p"),j.innerHTML=_t,Me=r(),m(U.$$.fragment),ye=r(),l=o("div"),m(W.$$.fragment),Ue=r(),ne=o("p"),ne.innerHTML=vt,We=r(),oe=o("p"),oe.innerHTML=St,Be=r(),D=o("div"),m(B.$$.fragment),Ge=r(),ie=o("p"),ie.textContent=bt,Je=r(),m(P.$$.fragment),Ye=r(),M=o("div"),m(G.$$.fragment),Ze=r(),de=o("p"),de.textContent=xt,Ke=r(),y=o("div"),m(J.$$.fragment),Re=r(),le=o("p"),le.textContent=$t,Qe=r(),w=o("div"),m(Y.$$.fragment),Xe=r(),ae=o("p"),ae.textContent=Dt,et=r(),C=o("div"),m(Z.$$.fragment),tt=r(),pe=o("p"),pe.textContent=Tt,st=r(),L=o("div"),m(K.$$.fragment),rt=r(),ce=o("p"),ce.textContent=Pt,nt=r(),F=o("div"),m(R.$$.fragment),ot=r(),ue=o("p"),ue.innerHTML=Mt,it=r(),I=o("div"),m(Q.$$.fragment),dt=r(),me=o("p"),me.innerHTML=yt,lt=r(),O=o("div"),m(X.$$.fragment),at=r(),fe=o("p"),fe.textContent=wt,pt=r(),E=o("div"),m(ee.$$.fragment),ct=r(),he=o("p"),he.textContent=Ct,we=r(),m(te.$$.fragment),Ce=r(),T=o("div"),m(se.$$.fragment),ut=r(),ge=o("p"),ge.innerHTML=Lt,Le=r(),ve=o("p"),this.h()},l(e){const d=kt("svelte-u9bgzb",document.head);u=i(d,"META",{name:!0,content:!0}),d.forEach(s),H=n(e),$=i(e,"P",{}),S($).forEach(s),re=n(e),f(k.$$.fragment,e),be=n(e),q=i(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-zw7rt6"&&(q.innerHTML=mt),xe=n(e),V=i(e,"P",{"data-svelte-h":!0}),c(V)!=="svelte-l6rv24"&&(V.textContent=ft),$e=n(e),z=i(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-1mk5p6f"&&(z.innerHTML=ht),De=n(e),f(A.$$.fragment,e),Te=n(e),N=i(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-pt2glg"&&(N.innerHTML=gt),Pe=n(e),j=i(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-18sd27c"&&(j.innerHTML=_t),Me=n(e),f(U.$$.fragment,e),ye=n(e),l=i(e,"DIV",{class:!0});var a=S(l);f(W.$$.fragment,a),Ue=n(a),ne=i(a,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-1g2jbmp"&&(ne.innerHTML=vt),We=n(a),oe=i(a,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-linuuh"&&(oe.innerHTML=St),Be=n(a),D=i(a,"DIV",{class:!0});var _e=S(D);f(B.$$.fragment,_e),Ge=n(_e),ie=i(_e,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-1st02i8"&&(ie.textContent=bt),Je=n(_e),f(P.$$.fragment,_e),_e.forEach(s),Ye=n(a),M=i(a,"DIV",{class:!0});var Ie=S(M);f(G.$$.fragment,Ie),Ze=n(Ie),de=i(Ie,"P",{"data-svelte-h":!0}),c(de)!=="svelte-4nw43d"&&(de.textContent=xt),Ie.forEach(s),Ke=n(a),y=i(a,"DIV",{class:!0});var Oe=S(y);f(J.$$.fragment,Oe),Re=n(Oe),le=i(Oe,"P",{"data-svelte-h":!0}),c(le)!=="svelte-13tpuy9"&&(le.textContent=$t),Oe.forEach(s),Qe=n(a),w=i(a,"DIV",{class:!0});var Ee=S(w);f(Y.$$.fragment,Ee),Xe=n(Ee),ae=i(Ee,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-1rkfgpx"&&(ae.textContent=Dt),Ee.forEach(s),et=n(a),C=i(a,"DIV",{class:!0});var He=S(C);f(Z.$$.fragment,He),tt=n(He),pe=i(He,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-1k141rk"&&(pe.textContent=Tt),He.forEach(s),st=n(a),L=i(a,"DIV",{class:!0});var ke=S(L);f(K.$$.fragment,ke),rt=n(ke),ce=i(ke,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-1vzm9q"&&(ce.textContent=Pt),ke.forEach(s),nt=n(a),F=i(a,"DIV",{class:!0});var qe=S(F);f(R.$$.fragment,qe),ot=n(qe),ue=i(qe,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-1rmndna"&&(ue.innerHTML=Mt),qe.forEach(s),it=n(a),I=i(a,"DIV",{class:!0});var Ve=S(I);f(Q.$$.fragment,Ve),dt=n(Ve),me=i(Ve,"P",{"data-svelte-h":!0}),c(me)!=="svelte-17kajtk"&&(me.innerHTML=yt),Ve.forEach(s),lt=n(a),O=i(a,"DIV",{class:!0});var ze=S(O);f(X.$$.fragment,ze),at=n(ze),fe=i(ze,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-zgpbva"&&(fe.textContent=wt),ze.forEach(s),pt=n(a),E=i(a,"DIV",{class:!0});var Ae=S(E);f(ee.$$.fragment,Ae),ct=n(Ae),he=i(Ae,"P",{"data-svelte-h":!0}),c(he)!=="svelte-7earhm"&&(he.textContent=Ct),Ae.forEach(s),a.forEach(s),we=n(e),f(te.$$.fragment,e),Ce=n(e),T=i(e,"DIV",{class:!0});var Ne=S(T);f(se.$$.fragment,Ne),ut=n(Ne),ge=i(Ne,"P",{"data-svelte-h":!0}),c(ge)!=="svelte-6ojmkw"&&(ge.innerHTML=Lt),Ne.forEach(s),Le=n(e),ve=i(e,"P",{}),S(ve).forEach(s),this.h()},h(){b(u,"name","hf:doc:metadata"),b(u,"content",At),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(F,"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(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,re,d),h(k,e,d),p(e,be,d),p(e,q,d),p(e,xe,d),p(e,V,d),p(e,$e,d),p(e,z,d),p(e,De,d),h(A,e,d),p(e,Te,d),p(e,N,d),p(e,Pe,d),p(e,j,d),p(e,Me,d),h(U,e,d),p(e,ye,d),p(e,l,d),h(W,l,null),t(l,Ue),t(l,ne),t(l,We),t(l,oe),t(l,Be),t(l,D),h(B,D,null),t(D,Ge),t(D,ie),t(D,Je),h(P,D,null),t(l,Ye),t(l,M),h(G,M,null),t(M,Ze),t(M,de),t(l,Ke),t(l,y),h(J,y,null),t(y,Re),t(y,le),t(l,Qe),t(l,w),h(Y,w,null),t(w,Xe),t(w,ae),t(l,et),t(l,C),h(Z,C,null),t(C,tt),t(C,pe),t(l,st),t(l,L),h(K,L,null),t(L,rt),t(L,ce),t(l,nt),t(l,F),h(R,F,null),t(F,ot),t(F,ue),t(l,it),t(l,I),h(Q,I,null),t(I,dt),t(I,me),t(l,lt),t(l,O),h(X,O,null),t(O,at),t(O,fe),t(l,pt),t(l,E),h(ee,E,null),t(E,ct),t(E,he),p(e,we,d),h(te,e,d),p(e,Ce,d),p(e,T,d),h(se,T,null),t(T,ut),t(T,ge),p(e,Le,d),p(e,ve,d),Fe=!0},p(e,[d]){const a={};d&2&&(a.$$scope={dirty:d,ctx:e}),P.$set(a)},i(e){Fe||(g(k.$$.fragment,e),g(A.$$.fragment,e),g(U.$$.fragment,e),g(W.$$.fragment,e),g(B.$$.fragment,e),g(P.$$.fragment,e),g(G.$$.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(te.$$.fragment,e),g(se.$$.fragment,e),Fe=!0)},o(e){_(k.$$.fragment,e),_(A.$$.fragment,e),_(U.$$.fragment,e),_(W.$$.fragment,e),_(B.$$.fragment,e),_(P.$$.fragment,e),_(G.$$.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),_(te.$$.fragment,e),_(se.$$.fragment,e),Fe=!1},d(e){e&&(s(H),s($),s(re),s(be),s(q),s(xe),s(V),s($e),s(z),s(De),s(Te),s(N),s(Pe),s(j),s(Me),s(ye),s(l),s(we),s(Ce),s(T),s(Le),s(ve)),s(u),v(k,e),v(A,e),v(U,e),v(W),v(B),v(P),v(G),v(J),v(Y),v(Z),v(K),v(R),v(Q),v(X),v(ee),v(te,e),v(se)}}}const At='{"title":"DPMSolverSinglestepScheduler","local":"dpmsolversinglestepscheduler","sections":[{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"DPMSolverSinglestepScheduler","local":"diffusers.DPMSolverSinglestepScheduler","sections":[],"depth":2},{"title":"SchedulerOutput","local":"diffusers.schedulers.scheduling_utils.SchedulerOutput","sections":[],"depth":2}],"depth":1}';function Nt(Se){return It(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jt extends Et{constructor(u){super(),Ht(this,u,Nt,zt,Ft,{})}}export{Jt as component};
