class_docstr: Stochastic sampling from Karras et al. [1] tailored to the Variance-Expanding (VE) models [2]. Use Algorithm 2 and
  the VE column of Table 1 from [1] for reference.
  
  [1] Karras, Tero, et al. "Elucidating the Design Space of Diffusion-Based Generative Models."
  https://arxiv.org/abs/2206.00364 [2] Song, Yang, et al. "Score-based generative modeling through stochastic
  differential equations." https://arxiv.org/abs/2011.13456
class_docstr_tok: ["Stochastic","sampling","from","Karras","et","al",".","[","1","]","tailored","to","the","Variance-Expanding","(","VE",")","models","[","2","]",".","Use","Algorithm","2","and","the","VE","column","of","Table","1","from","[","1","]","for","reference",".","[","1","]","Karras",",","Tero",",","et","al",".","``","Elucidating","the","Design","Space","of","Diffusion-Based","Generative","Models",".","''","https",":","\/\/arxiv.org\/abs\/2206.00364","[","2","]","Song",",","Yang",",","et","al",".","``","Score-based","generative","modeling","through","stochastic","differential","equations",".","''","https",":","\/\/arxiv.org\/abs\/2011.13456"]
code: def set_timesteps(self, num_inference_steps):
      self.num_inference_steps = num_inference_steps
      self.timesteps = np.arange(0, self.num_inference_steps)[
          ::-1
      ].copy()
      self.schedule = [
          (
              self.sigma_max
              * (self.sigma_min**2 / self.sigma_max**2)
              ** (i / (num_inference_steps - 1))
          )
          for i in self.timesteps
      ]
      self.schedule = np.array(self.schedule, dtype=np.float32)
  
      self.set_format(tensor_format=self.tensor_format)
  
file_path: PaddleHub/modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_karras_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 2 for calling the KarrasVeScheduler obj's underlying member method code with example usage: obj.set_timesteps(num_inference_steps) without return types