import{s as kt,n as Nt,o as zt}from"../chunks/scheduler.53228c21.js";import{S as Vt,i as Ft,e as o,s as r,c as u,h as At,a as i,d as s,b as n,f as S,g as m,j as c,k as v,l as t,m as p,n as f,t as h,o as g,p as _}from"../chunks/index.100fac89.js";import{C as Ut}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{D as b}from"../chunks/Docstring.db856a1e.js";import{H as Be,E as Wt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function jt(gt){let $,Se,_e,be,E,xe,H,$e,q,_t='<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.',De,k,vt=`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.`,ye,N,St='The original implementation can be found at <a href="https://github.com/LuChengTHU/dpm-solver" rel="nofollow">LuChengTHU/dpm-solver</a>.',Te,z,Me,V,bt="It is recommended to set <code>solver_order</code> to 2 for guide sampling, and <code>solver_order=3</code> for unconditional sampling.",Pe,F,xt=`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.`,we,A,Ce,l,U,Ge,re,$t="<code>DPMSolverSinglestepScheduler</code> is a fast dedicated high-order solver for diffusion ODEs.",Ye,ne,Dt=`This model inherits from <a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin">ConfigMixin</a>. Check the superclass documentation for the generic
methods the library implements for all schedulers such as loading and saving.`,Je,x,W,Ke,oe,yt=`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.`,Re,j,Tt=`<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>`,Ze,y,B,Qe,ie,Mt="One step for the first-order DPMSolver (equivalent to DDIM).",Xe,T,G,et,de,Pt="Computes the solver order at each time step.",tt,M,Y,st,le,wt=`Ensures interchangeability with schedulers that need to scale the denoising model input depending on the
current timestep.`,rt,P,J,nt,ae,Ct="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",ot,w,K,it,pe,Lt="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",dt,C,R,lt,ce,Ot=`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>.`,at,L,Z,pt,ue,It=`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>.`,ct,O,Q,ut,me,Et="One step for the singlestep DPMSolver.",mt,I,X,ft,fe,Ht=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with
the singlestep DPMSolver.`,Le,ee,Oe,D,te,ht,he,qt="Base class for the output of a scheduler’s <code>step</code> function.",Ie,se,Ee,ve,He;return E=new Ut({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),H=new Be({props:{title:"DPMSolverSinglestepScheduler",local:"dpmsolversinglestepscheduler",headingTag:"h1"}}),z=new Be({props:{title:"Tips",local:"tips",headingTag:"h2"}}),A=new Be({props:{title:"DPMSolverSinglestepScheduler",local:"diffusers.DPMSolverSinglestepScheduler",headingTag:"h2"}}),U=new b({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:": typing.Optional[numpy.ndarray] = 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:": typing.Optional[bool] = False"},{name:"use_exponential_sigmas",val:": typing.Optional[bool] = False"},{name:"use_beta_sigmas",val:": typing.Optional[bool] = False"},{name:"use_flow_sigmas",val:": typing.Optional[bool] = False"},{name:"flow_shift",val:": typing.Optional[float] = 1.0"},{name:"final_sigmas_type",val:": typing.Optional[str] = 'zero'"},{name:"lambda_min_clipped",val:": float = -inf"},{name:"variance_type",val:": typing.Optional[str] = None"},{name:"use_dynamic_shifting",val:": bool = False"},{name:"time_shift_type",val:": str = 'exponential'"}],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> 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.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.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.DPMSolverSinglestepScheduler.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.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#L80"}}),W=new b({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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L559",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),B=new b({props:{name:"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:"noise",val:": typing.Optional[torch.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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L655",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),G=new b({props:{name:"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#L237"}}),Y=new b({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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L1119",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>
`}}),J=new b({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#L292"}}),K=new b({props:{name:"set_timesteps",anchor:"diffusers.DPMSolverSinglestepScheduler.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.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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L302"}}),R=new b({props:{name:"singlestep_dpm_solver_second_order_update",anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_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.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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L719",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>
`}}),Z=new b({props:{name:"singlestep_dpm_solver_third_order_update",anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_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.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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L830",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),Q=new b({props:{name:"singlestep_dpm_solver_update",anchor:"diffusers.DPMSolverSinglestepScheduler.singlestep_dpm_solver_update",parameters:[{name:"model_output_list",val:": typing.List[torch.Tensor]"},{name:"*args",val:""},{name:"sample",val:": Tensor = None"},{name:"order",val:": int = None"},{name:"noise",val:": typing.Optional[torch.Tensor] = 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/main/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py#L952",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 b({props:{name:"step",anchor:"diffusers.DPMSolverSinglestepScheduler.step",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": typing.Union[int, torch.Tensor]"},{name:"sample",val:": Tensor"},{name:"generator",val:" = None"},{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/main/en/api/schedulers/edm_multistep_dpm_solver#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#L1048",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/edm_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/main/en/api/schedulers/edm_multistep_dpm_solver#diffusers.schedulers.scheduling_utils.SchedulerOutput"
>SchedulerOutput</a> or <code>tuple</code></p>
`}}),ee=new Be({props:{title:"SchedulerOutput",local:"diffusers.schedulers.scheduling_utils.SchedulerOutput",headingTag:"h2"}}),te=new b({props:{name:"class diffusers.schedulers.scheduling_utils.SchedulerOutput",anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput",parameters:[{name:"prev_sample",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_utils.SchedulerOutput.prev_sample",description:`<strong>prev_sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code> for images) &#x2014;
Computed sample <code>(x_{t-1})</code> of previous timestep. <code>prev_sample</code> should be used as next model input in the
denoising loop.`,name:"prev_sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_utils.py#L62"}}),se=new Wt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/singlestep_dpm_solver.md"}}),{c(){$=o("meta"),Se=r(),_e=o("p"),be=r(),u(E.$$.fragment),xe=r(),u(H.$$.fragment),$e=r(),q=o("p"),q.innerHTML=_t,De=r(),k=o("p"),k.textContent=vt,ye=r(),N=o("p"),N.innerHTML=St,Te=r(),u(z.$$.fragment),Me=r(),V=o("p"),V.innerHTML=bt,Pe=r(),F=o("p"),F.innerHTML=xt,we=r(),u(A.$$.fragment),Ce=r(),l=o("div"),u(U.$$.fragment),Ge=r(),re=o("p"),re.innerHTML=$t,Ye=r(),ne=o("p"),ne.innerHTML=Dt,Je=r(),x=o("div"),u(W.$$.fragment),Ke=r(),oe=o("p"),oe.textContent=yt,Re=r(),j=o("blockquote"),j.innerHTML=Tt,Ze=r(),y=o("div"),u(B.$$.fragment),Qe=r(),ie=o("p"),ie.textContent=Mt,Xe=r(),T=o("div"),u(G.$$.fragment),et=r(),de=o("p"),de.textContent=Pt,tt=r(),M=o("div"),u(Y.$$.fragment),st=r(),le=o("p"),le.textContent=wt,rt=r(),P=o("div"),u(J.$$.fragment),nt=r(),ae=o("p"),ae.textContent=Ct,ot=r(),w=o("div"),u(K.$$.fragment),it=r(),pe=o("p"),pe.textContent=Lt,dt=r(),C=o("div"),u(R.$$.fragment),lt=r(),ce=o("p"),ce.innerHTML=Ot,at=r(),L=o("div"),u(Z.$$.fragment),pt=r(),ue=o("p"),ue.innerHTML=It,ct=r(),O=o("div"),u(Q.$$.fragment),ut=r(),me=o("p"),me.textContent=Et,mt=r(),I=o("div"),u(X.$$.fragment),ft=r(),fe=o("p"),fe.textContent=Ht,Le=r(),u(ee.$$.fragment),Oe=r(),D=o("div"),u(te.$$.fragment),ht=r(),he=o("p"),he.innerHTML=qt,Ie=r(),u(se.$$.fragment),Ee=r(),ve=o("p"),this.h()},l(e){const d=At("svelte-u9bgzb",document.head);$=i(d,"META",{name:!0,content:!0}),d.forEach(s),Se=n(e),_e=i(e,"P",{}),S(_e).forEach(s),be=n(e),m(E.$$.fragment,e),xe=n(e),m(H.$$.fragment,e),$e=n(e),q=i(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-zw7rt6"&&(q.innerHTML=_t),De=n(e),k=i(e,"P",{"data-svelte-h":!0}),c(k)!=="svelte-l6rv24"&&(k.textContent=vt),ye=n(e),N=i(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-1mk5p6f"&&(N.innerHTML=St),Te=n(e),m(z.$$.fragment,e),Me=n(e),V=i(e,"P",{"data-svelte-h":!0}),c(V)!=="svelte-pt2glg"&&(V.innerHTML=bt),Pe=n(e),F=i(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-18sd27c"&&(F.innerHTML=xt),we=n(e),m(A.$$.fragment,e),Ce=n(e),l=i(e,"DIV",{class:!0});var a=S(l);m(U.$$.fragment,a),Ge=n(a),re=i(a,"P",{"data-svelte-h":!0}),c(re)!=="svelte-1g2jbmp"&&(re.innerHTML=$t),Ye=n(a),ne=i(a,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-linuuh"&&(ne.innerHTML=Dt),Je=n(a),x=i(a,"DIV",{class:!0});var ge=S(x);m(W.$$.fragment,ge),Ke=n(ge),oe=i(ge,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-1st02i8"&&(oe.textContent=yt),Re=n(ge),j=i(ge,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c(j)!=="svelte-lwd2ft"&&(j.innerHTML=Tt),ge.forEach(s),Ze=n(a),y=i(a,"DIV",{class:!0});var qe=S(y);m(B.$$.fragment,qe),Qe=n(qe),ie=i(qe,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-4nw43d"&&(ie.textContent=Mt),qe.forEach(s),Xe=n(a),T=i(a,"DIV",{class:!0});var ke=S(T);m(G.$$.fragment,ke),et=n(ke),de=i(ke,"P",{"data-svelte-h":!0}),c(de)!=="svelte-13tpuy9"&&(de.textContent=Pt),ke.forEach(s),tt=n(a),M=i(a,"DIV",{class:!0});var Ne=S(M);m(Y.$$.fragment,Ne),st=n(Ne),le=i(Ne,"P",{"data-svelte-h":!0}),c(le)!=="svelte-1rkfgpx"&&(le.textContent=wt),Ne.forEach(s),rt=n(a),P=i(a,"DIV",{class:!0});var ze=S(P);m(J.$$.fragment,ze),nt=n(ze),ae=i(ze,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-1k141rk"&&(ae.textContent=Ct),ze.forEach(s),ot=n(a),w=i(a,"DIV",{class:!0});var Ve=S(w);m(K.$$.fragment,Ve),it=n(Ve),pe=i(Ve,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-1vzm9q"&&(pe.textContent=Lt),Ve.forEach(s),dt=n(a),C=i(a,"DIV",{class:!0});var Fe=S(C);m(R.$$.fragment,Fe),lt=n(Fe),ce=i(Fe,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-1rmndna"&&(ce.innerHTML=Ot),Fe.forEach(s),at=n(a),L=i(a,"DIV",{class:!0});var Ae=S(L);m(Z.$$.fragment,Ae),pt=n(Ae),ue=i(Ae,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-17kajtk"&&(ue.innerHTML=It),Ae.forEach(s),ct=n(a),O=i(a,"DIV",{class:!0});var Ue=S(O);m(Q.$$.fragment,Ue),ut=n(Ue),me=i(Ue,"P",{"data-svelte-h":!0}),c(me)!=="svelte-zgpbva"&&(me.textContent=Et),Ue.forEach(s),mt=n(a),I=i(a,"DIV",{class:!0});var We=S(I);m(X.$$.fragment,We),ft=n(We),fe=i(We,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-7earhm"&&(fe.textContent=Ht),We.forEach(s),a.forEach(s),Le=n(e),m(ee.$$.fragment,e),Oe=n(e),D=i(e,"DIV",{class:!0});var je=S(D);m(te.$$.fragment,je),ht=n(je),he=i(je,"P",{"data-svelte-h":!0}),c(he)!=="svelte-6ojmkw"&&(he.innerHTML=qt),je.forEach(s),Ie=n(e),m(se.$$.fragment,e),Ee=n(e),ve=i(e,"P",{}),S(ve).forEach(s),this.h()},h(){v($,"name","hf:doc:metadata"),v($,"content",Bt),v(j,"class","tip"),v(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(y,"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(M,"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(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(I,"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(D,"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,$),p(e,Se,d),p(e,_e,d),p(e,be,d),f(E,e,d),p(e,xe,d),f(H,e,d),p(e,$e,d),p(e,q,d),p(e,De,d),p(e,k,d),p(e,ye,d),p(e,N,d),p(e,Te,d),f(z,e,d),p(e,Me,d),p(e,V,d),p(e,Pe,d),p(e,F,d),p(e,we,d),f(A,e,d),p(e,Ce,d),p(e,l,d),f(U,l,null),t(l,Ge),t(l,re),t(l,Ye),t(l,ne),t(l,Je),t(l,x),f(W,x,null),t(x,Ke),t(x,oe),t(x,Re),t(x,j),t(l,Ze),t(l,y),f(B,y,null),t(y,Qe),t(y,ie),t(l,Xe),t(l,T),f(G,T,null),t(T,et),t(T,de),t(l,tt),t(l,M),f(Y,M,null),t(M,st),t(M,le),t(l,rt),t(l,P),f(J,P,null),t(P,nt),t(P,ae),t(l,ot),t(l,w),f(K,w,null),t(w,it),t(w,pe),t(l,dt),t(l,C),f(R,C,null),t(C,lt),t(C,ce),t(l,at),t(l,L),f(Z,L,null),t(L,pt),t(L,ue),t(l,ct),t(l,O),f(Q,O,null),t(O,ut),t(O,me),t(l,mt),t(l,I),f(X,I,null),t(I,ft),t(I,fe),p(e,Le,d),f(ee,e,d),p(e,Oe,d),p(e,D,d),f(te,D,null),t(D,ht),t(D,he),p(e,Ie,d),f(se,e,d),p(e,Ee,d),p(e,ve,d),He=!0},p:Nt,i(e){He||(h(E.$$.fragment,e),h(H.$$.fragment,e),h(z.$$.fragment,e),h(A.$$.fragment,e),h(U.$$.fragment,e),h(W.$$.fragment,e),h(B.$$.fragment,e),h(G.$$.fragment,e),h(Y.$$.fragment,e),h(J.$$.fragment,e),h(K.$$.fragment,e),h(R.$$.fragment,e),h(Z.$$.fragment,e),h(Q.$$.fragment,e),h(X.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(se.$$.fragment,e),He=!0)},o(e){g(E.$$.fragment,e),g(H.$$.fragment,e),g(z.$$.fragment,e),g(A.$$.fragment,e),g(U.$$.fragment,e),g(W.$$.fragment,e),g(B.$$.fragment,e),g(G.$$.fragment,e),g(Y.$$.fragment,e),g(J.$$.fragment,e),g(K.$$.fragment,e),g(R.$$.fragment,e),g(Z.$$.fragment,e),g(Q.$$.fragment,e),g(X.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(se.$$.fragment,e),He=!1},d(e){e&&(s(Se),s(_e),s(be),s(xe),s($e),s(q),s(De),s(k),s(ye),s(N),s(Te),s(Me),s(V),s(Pe),s(F),s(we),s(Ce),s(l),s(Le),s(Oe),s(D),s(Ie),s(Ee),s(ve)),s($),_(E,e),_(H,e),_(z,e),_(A,e),_(U),_(W),_(B),_(G),_(Y),_(J),_(K),_(R),_(Z),_(Q),_(X),_(ee,e),_(te),_(se,e)}}}const Bt='{"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 Gt(gt){return zt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qt extends Vt{constructor($){super(),Ft(this,$,Gt,jt,kt,{})}}export{Qt as component};
