class_docstr: Linear Multistep Scheduler for discrete beta schedules. Based on the original k-diffusion implementation by
  Katherine Crowson:
  https://github.com/crowsonkb/k-diffusion/blob/481677d114f6ea445aa009cf5bd7a9cdee909e47/k_diffusion/sampling.py#L181
  
  [`~ConfigMixin`] takes care of storing all config attributes that are passed in the scheduler's `__init__`
  function, such as `num_train_timesteps`. They can be accessed via `scheduler.config.num_train_timesteps`.
  [`SchedulerMixin`] provides general loading and saving functionality via the [`SchedulerMixin.save_pretrained`] and
  [`~SchedulerMixin.from_pretrained`] functions.
  
  Args:
      num_train_timesteps (`int`): number of diffusion steps used to train the model.
      beta_start (`float`): the starting `beta` value of inference.
      beta_end (`float`): the final `beta` value.
      beta_schedule (`str`):
          the beta schedule, a mapping from a beta range to a sequence of betas for stepping the model. Choose from
          `linear` or `scaled_linear`.
      trained_betas (`jnp.ndarray`, optional):
          option to pass an array of betas directly to the constructor to bypass `beta_start`, `beta_end` etc.
      prediction_type (`str`, default `epsilon`, optional):
          prediction type of the scheduler function, one of `epsilon` (predicting the noise of the diffusion
          process), `sample` (directly predicting the noisy sample`) or `v_prediction` (see section 2.4
          https://imagen.research.google/video/paper.pdf)
      dtype (`jnp.dtype`, *optional*, defaults to `jnp.float32`):
          the `dtype` used for params and computation.
docstr: Scales the denoising model input by `(sigma**2 + 1) ** 0.5` to match the K-LMS algorithm.
  
  Args:
      state (`LMSDiscreteSchedulerState`):
          the `FlaxLMSDiscreteScheduler` state data class instance.
      sample (`jnp.ndarray`):
          current instance of sample being created by diffusion process.
      timestep (`int`):
          current discrete timestep in the diffusion chain.
  
  Returns:
      `jnp.ndarray`: scaled input sample
docstr_tok: ["Scales","the","denoising","model","input","by","`","(","sigma","*","*","2","+","1",")","*","*","0.5","`","to","match","the","K-LMS","algorithm",".","Args",":","state","(","`","LMSDiscreteSchedulerState","`",")",":","the","`","FlaxLMSDiscreteScheduler","`","state","data","class","instance",".","sample","(","`","jnp.ndarray","`",")",":","current","instance","of","sample","being","created","by","diffusion","process",".","timestep","(","`","int","`",")",":","current","discrete","timestep","in","the","diffusion","chain",".","Returns",":","`","jnp.ndarray","`",":","scaled","input","sample"]
code: def scale_model_input(
      self,
      state: LMSDiscreteSchedulerState,
      sample: jnp.ndarray,
      timestep: int,
  ) -> jnp.ndarray:
      """
      Scales the denoising model input by `(sigma**2 + 1) ** 0.5` to match the K-LMS algorithm.
  
      Args:
          state (`LMSDiscreteSchedulerState`):
              the `FlaxLMSDiscreteScheduler` state data class instance.
          sample (`jnp.ndarray`):
              current instance of sample being created by diffusion process.
          timestep (`int`):
              current discrete timestep in the diffusion chain.
  
      Returns:
          `jnp.ndarray`: scaled input sample
      """
      (step_index,) = jnp.where(state.timesteps == timestep, size=1)
      step_index = step_index[0]
  
      sigma = state.sigmas[step_index]
      sample = sample / ((sigma**2 + 1) ** 0.5)
      return sample
  
imports: from dataclasses import dataclass
  from typing import Optional, Tuple, Union
  import flax
  import jax.numpy
  from scipy import integrate
  from ..configuration_utils import ConfigMixin, register_to_config
  from .scheduling_utils_flax import CommonSchedulerState, FlaxKarrasDiffusionSchedulers, FlaxSchedulerMixin, FlaxSchedulerOutput, broadcast_to_shape_from_left
label_desc: Use image node_id 4 for calling the FlaxLMSDiscreteScheduler obj's underlying member method code with example usage: obj.scale_model_input(state, sample, timestep) and returns: sample