class_docstr: The variance exploding stochastic differential equation (SDE) scheduler.
  
  :param snr: coefficient weighting the step from the model_output sample (from the network) to the random noise.
  :param sigma_min: initial noise scale for sigma sequence in sampling procedure. The minimum sigma should mirror the
          distribution of the data.
  :param sigma_max: :param sampling_eps: the end value of sampling, where timesteps decrease progessively from 1 to
  epsilon. :param correct_steps: number of correction steps performed on a produced sample. :param tensor_format:
  "np" or "pd" for the expected format of samples passed to the Scheduler.
class_docstr_tok: ["The","variance","exploding","stochastic","differential","equation","(","SDE",")","scheduler",".",":","param","snr",":","coefficient","weighting","the","step","from","the","model_output","sample","(","from","the","network",")","to","the","random","noise",".",":","param","sigma_min",":","initial","noise","scale","for","sigma","sequence","in","sampling","procedure",".","The","minimum","sigma","should","mirror","the","distribution","of","the","data",".",":","param","sigma_max",":",":","param","sampling_eps",":","the","end","value","of","sampling",",","where","timesteps","decrease","progessively","from","1","to","epsilon",".",":","param","correct_steps",":","number","of","correction","steps","performed","on","a","produced","sample",".",":","param","tensor_format",":","''","np","''","or","``","pd","''","for","the","expected","format","of","samples","passed","to","the","Scheduler","."]
docstr: Correct the predicted sample based on the output model_output of the network. This is often run repeatedly
  after making the prediction for the previous timestep.
docstr_tok: ["Correct","the","predicted","sample","based","on","the","output","model_output","of","the","network",".","This","is","often","run","repeatedly","after","making","the","prediction","for","the","previous","timestep","."]
code: def step_correct(
      self,
      model_output: Union[paddle.Tensor, np.ndarray],
      sample: Union[paddle.Tensor, np.ndarray],
      seed=None,
  ):
      """
      Correct the predicted sample based on the output model_output of the network. This is often run repeatedly
      after making the prediction for the previous timestep.
      """
      if seed is not None:
          self.set_seed(seed)
  
      # For small batch sizes, the paper "suggest replacing norm(z) with sqrt(d), where d is the dim. of z"
      # sample noise for correction
      noise = self.randn_like(sample)
  
      # compute step size from the model_output, the noise, and the snr
      grad_norm = self.norm(model_output)
      noise_norm = self.norm(noise)
      step_size = (self.config.snr * noise_norm / grad_norm) ** 2 * 2
      step_size = step_size * paddle.ones(sample.shape[0])
      # self.repeat_scalar(step_size, sample.shape[0])
  
      # compute corrected sample: model_output term and noise term
      prev_sample_mean = (
          sample + step_size[:, None, None, None] * model_output
      )
      prev_sample = (
          prev_sample_mean
          + ((step_size * 2) ** 0.5)[:, None, None, None] * noise
      )
  
      return {"prev_sample": prev_sample}
  
file_path: PaddleHub/modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_sde_ve.py
imports: from typing import Union
  import numpy
  import paddle
  from ..configuration_utils import ConfigMixin
  from ..configuration_utils import register_to_config
  from .scheduling_utils import SchedulerMixin
label_desc: Use image node_id 7 for calling the ScoreSdeVeScheduler obj's underlying member method code with example usage: obj.step_correct(model_output, sample, seed) and returns: dict