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"]
docstr: For more details on the parameters, see the original paper's Appendix E.: "Elucidating the Design Space of
  Diffusion-Based Generative Models." https://arxiv.org/abs/2206.00364. The grid search values used to find the
  optimal {s_noise, s_churn, s_min, s_max} for a specific model are described in Table 5 of the paper.
  
  Args:
      sigma_min (`float`): minimum noise magnitude
      sigma_max (`float`): maximum noise magnitude
      s_noise (`float`): the amount of additional noise to counteract loss of detail during sampling.
          A reasonable range is [1.000, 1.011].
      s_churn (`float`): the parameter controlling the overall amount of stochasticity.
          A reasonable range is [0, 100].
      s_min (`float`): the start value of the sigma range where we add noise (enable stochasticity).
          A reasonable range is [0, 10].
      s_max (`float`): the end value of the sigma range where we add noise.
          A reasonable range is [0.2, 80].
docstr_tok: ["For","more","details","on","the","parameters",",","see","the","original","paper","'s","Appendix","E.",":","``","Elucidating","the","Design","Space","of","Diffusion-Based","Generative","Models",".","''","https",":","\/\/arxiv.org\/abs\/2206.00364",".","The","grid","search","values","used","to","find","the","optimal","{","s_noise",",","s_churn",",","s_min",",","s_max","}","for","a","specific","model","are","described","in","Table","5","of","the","paper",".","Args",":","sigma_min","(","`","float","`",")",":","minimum","noise","magnitude","sigma_max","(","`","float","`",")",":","maximum","noise","magnitude","s_noise","(","`","float","`",")",":","the","amount","of","additional","noise","to","counteract","loss","of","detail","during","sampling",".","A","reasonable","range","is","[","1.000",",","1.011","]",".","s_churn","(","`","float","`",")",":","the","parameter","controlling","the","overall","amount","of","stochasticity",".","A","reasonable","range","is","[","0",",","100","]",".","s_min","(","`","float","`",")",":","the","start","value","of","the","sigma","range","where","we","add","noise","(","enable","stochasticity",")",".","A","reasonable","range","is","[","0",",","10","]",".","s_max","(","`","float","`",")",":","the","end","value","of","the","sigma","range","where","we","add","noise",".","A","reasonable","range","is","[","0.2",",","80","]","."]
code: def __init__(
      self,
      sigma_min=0.02,
      sigma_max=100,
      s_noise=1.007,
      s_churn=80,
      s_min=0.05,
      s_max=50,
      tensor_format="pd",
  ):
      """
      For more details on the parameters, see the original paper's Appendix E.: "Elucidating the Design Space of
      Diffusion-Based Generative Models." https://arxiv.org/abs/2206.00364. The grid search values used to find the
      optimal {s_noise, s_churn, s_min, s_max} for a specific model are described in Table 5 of the paper.
  
      Args:
          sigma_min (`float`): minimum noise magnitude
          sigma_max (`float`): maximum noise magnitude
          s_noise (`float`): the amount of additional noise to counteract loss of detail during sampling.
              A reasonable range is [1.000, 1.011].
          s_churn (`float`): the parameter controlling the overall amount of stochasticity.
              A reasonable range is [0, 100].
          s_min (`float`): the start value of the sigma range where we add noise (enable stochasticity).
              A reasonable range is [0, 10].
          s_max (`float`): the end value of the sigma range where we add noise.
              A reasonable range is [0.2, 80].
      """
      # setable values
      self.num_inference_steps = None
      self.timesteps = None
      self.schedule = None  # sigma(t_i)
  
      self.tensor_format = tensor_format
      self.set_format(tensor_format=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 1 to create a new KarrasVeScheduler object from inherited base classes: SchedulerMixin, ConfigMixin with example: obj = KarrasVeScheduler(sigma_min, sigma_max, s_noise, s_churn, s_min, s_max, tensor_format)