class_docstr: `ScoreSdeVpScheduler` is a variance preserving stochastic differential equation (SDE) scheduler.
  
  This model inherits from [`SchedulerMixin`] and [`ConfigMixin`]. Check the superclass documentation for the generic
  methods the library implements for all schedulers such as loading and saving.
  
  Args:
      num_train_timesteps (`int`, defaults to 2000):
          The number of diffusion steps to train the model.
      beta_min (`int`, defaults to 0.1):
      beta_max (`int`, defaults to 20):
      sampling_eps (`int`, defaults to 1e-3):
          The end value of sampling where timesteps decrease progressively from 1 to epsilon.
class_docstr_tok: ["`","ScoreSdeVpScheduler","`","is","a","variance","preserving","stochastic","differential","equation","(","SDE",")","scheduler",".","This","model","inherits","from","[","`","SchedulerMixin","`","]","and","[","`","ConfigMixin","`","]",".","Check","the","superclass","documentation","for","the","generic","methods","the","library","implements","for","all","schedulers","such","as","loading","and","saving",".","Args",":","num_train_timesteps","(","`","int","`",",","defaults","to","2000",")",":","The","number","of","diffusion","steps","to","train","the","model",".","beta_min","(","`","int","`",",","defaults","to","0.1",")",":","beta_max","(","`","int","`",",","defaults","to","20",")",":","sampling_eps","(","`","int","`",",","defaults","to","1e-3",")",":","The","end","value","of","sampling","where","timesteps","decrease","progressively","from","1","to","epsilon","."]
docstr: Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion
  process from the learned model outputs (most often the predicted noise).
  
  Args:
      score ():
      x ():
      t ():
      generator (`torch.Generator`, *optional*):
          A random number generator.
docstr_tok: ["Predict","the","sample","from","the","previous","timestep","by","reversing","the","SDE",".","This","function","propagates","the","diffusion","process","from","the","learned","model","outputs","(","most","often","the","predicted","noise",")",".","Args",":","score","(",")",":","x","(",")",":","t","(",")",":","generator","(","`","torch.Generator","`",",","*","optional","*",")",":","A","random","number","generator","."]
code: def step_pred(self, score, x, t, generator=None):
      """
      Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion
      process from the learned model outputs (most often the predicted noise).
  
      Args:
          score ():
          x ():
          t ():
          generator (`torch.Generator`, *optional*):
              A random number generator.
      """
      if self.timesteps is None:
          raise ValueError(
              "`self.timesteps` is not set, you need to run 'set_timesteps' after creating the scheduler"
          )
  
      # TODO(Patrick) better comments + non-PyTorch
      # postprocess model score
      log_mean_coeff = (
          -0.25 * t**2 * (self.config.beta_max - self.config.beta_min)
          - 0.5 * t * self.config.beta_min
      )
      std = torch.sqrt(1.0 - torch.exp(2.0 * log_mean_coeff))
      std = std.flatten()
      while len(std.shape) < len(score.shape):
          std = std.unsqueeze(-1)
      score = -score / std
  
      # compute
      dt = -1.0 / len(self.timesteps)
  
      beta_t = self.config.beta_min + t * (
          self.config.beta_max - self.config.beta_min
      )
      beta_t = beta_t.flatten()
      while len(beta_t.shape) < len(x.shape):
          beta_t = beta_t.unsqueeze(-1)
      drift = -0.5 * beta_t * x
  
      diffusion = torch.sqrt(beta_t)
      drift = drift - diffusion**2 * score
      x_mean = x + drift * dt
  
      # add noise
      noise = randn_tensor(
          x.shape,
          layout=x.layout,
          generator=generator,
          device=x.device,
          dtype=x.dtype,
      )
      x = x_mean + diffusion * math.sqrt(-dt) * noise
  
      return x, x_mean
  
file_path: diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py
imports: import math
  from typing import Union
  import torch
  from ...configuration_utils import ConfigMixin, register_to_config
  from ...utils.torch_utils import randn_tensor
  from ..scheduling_utils import SchedulerMixin
label_desc: Use image node_id 3 for calling the ScoreSdeVpScheduler obj's underlying member method code with example usage: obj.step_pred(score, x, t, generator) and returns: x,  x_mean