# View Source Bumblebee.Diffusion.PndmScheduler (Bumblebee v0.4.1)

Pseudo numerical methods for diffusion models (PNDMs).

The sampling is based on two numerical methods for solving ODE: the Runge-Kutta method (RK) and the linear multi-step method (LMS). The gradient at each step is computed according to either of these methods, however the transfer part (approximating the next sample based on current sample and gradient) is non-linear. Because of this property, the authors of the paper refer to them as pseudo numerical methods, denoted as PRK and PLMS respectively.

## Configuration

`:num_train_steps`

- the number of diffusion steps used to train the model. Defaults to`1000`

`:beta_schedule`

- the beta schedule type, a mapping from a beta range to a sequence of betas for stepping the model. Either of`:linear`

,`:quadratic`

, or`:squared_cosine`

. Defaults to`:linear`

`:beta_start`

- the start value for the beta schedule. Defaults to`0.0001`

`:beta_end`

- the end value for the beta schedule. Defaults to`0.02`

`:alpha_clip_strategy`

- each step $t$ uses the values of $\bar{\alpha}_t$ and $\bar{\alpha}_{t-1}$, however for $t = 0$ there is no previous alpha. The strategy can be either`:one`

($\bar{\alpha}_{t-1} = 1$) or`:alpha_zero`

($\bar{\alpha}_{t-1} = \bar{\alpha}_0$) . Defaults to`:one`

`:timesteps_offset`

- an offset added to the inference steps. You can use a combination of`timesteps_offset: 1`

and`alpha_clip_strategy: :alpha_zero`

, so that the last step $t = 1$ uses $\bar{\alpha}_1$ and $\bar{\alpha}_0$, as done in stable diffusion . Defaults to`0`

`:reduce_warmup`

- when`true`

, the first few samples are computed using lower-order linear multi-step, rather than the Runge-Kutta method. This results in less forward passes of the model . Defaults to`false`