class_docstr: Noise schedule for diffusion.
  
  Args:
      beta_t0 (float): Variance of the first diffusion step.
      beta_t1 (float): Variance of the last diffusion step.
      beta_exp (float): Power schedule exponent
      num_steps (int): Number of diffusion step.
      variance (str): choice of the sigma value for the denoising eq. Choices: "beta" or "beta_tilde"
      clip (float): clipping value for the denoising steps
      rescale (float): rescaling value to avoid vanishing signals unused by default (i.e 1)
      repartition (str): shape of the schedule only power schedule is supported
      sample_processor (SampleProcessor): Module that normalize data to match better the gaussian distribution
      noise_scale (float): Scaling factor for the noise
class_docstr_tok: ["Noise","schedule","for","diffusion",".","Args",":","beta_t0","(","float",")",":","Variance","of","the","first","diffusion","step",".","beta_t1","(","float",")",":","Variance","of","the","last","diffusion","step",".","beta_exp","(","float",")",":","Power","schedule","exponent","num_steps","(","int",")",":","Number","of","diffusion","step",".","variance","(","str",")",":","choice","of","the","sigma","value","for","the","denoising","eq",".","Choices",":","``","beta","''","or","``","beta_tilde","''","clip","(","float",")",":","clipping","value","for","the","denoising","steps","rescale","(","float",")",":","rescaling","value","to","avoid","vanishing","signals","unused","by","default","(","i.e","1",")","repartition","(","str",")",":","shape","of","the","schedule","only","power","schedule","is","supported","sample_processor","(","SampleProcessor",")",":","Module","that","normalize","data","to","match","better","the","gaussian","distribution","noise_scale","(","float",")",":","Scaling","factor","for","the","noise"]
docstr: Return 'alpha_bar', either for a given step, or as a tensor with its value for each step.
docstr_tok: ["Return","'alpha_bar","'",",","either","for","a","given","step",",","or","as","a","tensor","with","its","value","for","each","step","."]
code: def get_alpha_bar(
      self, step: tp.Optional[tp.Union[int, torch.Tensor]] = None
  ) -> torch.Tensor:
      """Return 'alpha_bar', either for a given step, or as a tensor with its value for each step."""
      if step is None:
          return (1 - self.betas).cumprod(
              dim=-1
          )  # works for simgle and multi bands
      if type(step) is int:
          return (1 - self.betas[: step + 1]).prod()
      else:
          return (1 - self.betas).cumprod(dim=0)[step].view(-1, 1, 1)
  
imports: from collections import namedtuple
  import random
  import typing
  import julius
  import torch
label_desc: Use image node_id 4 for calling the NoiseSchedule obj's underlying member method code with example usage: obj.get_alpha_bar(step) and returns: unknown, unknown, unknown