docstr: Compute the intermediate time steps for sampling.
  Args:
      skip_type: A `str`. The type for the spacing of the time steps. We support three types:
          - 'logSNR': uniform logSNR for the time steps.
          - 'time_uniform': uniform time for the time steps. (**Recommended for high-resolutional data**.)
          - 'time_quadratic': quadratic time for the time steps. (Used in DDIM for low-resolutional data.)
      t_T: A `float`. The starting time of the sampling (default is T).
      t_0: A `float`. The ending time of the sampling (default is epsilon).
      N: A `int`. The total number of the spacing of the time steps.
      device: A torch device.
  Returns:
      A pytorch tensor of the time steps, with the shape (N + 1,).
docstr_tok: ["Compute","the","intermediate","time","steps","for","sampling",".","Args",":","skip_type",":","A","`","str","`",".","The","type","for","the","spacing","of","the","time","steps",".","We","support","three","types",":","-","'logSNR","'",":","uniform","logSNR","for","the","time","steps",".","-","'time_uniform","'",":","uniform","time","for","the","time","steps",".","(","*","*","Recommended","for","high-resolutional","data","*","*",".",")","-","'time_quadratic","'",":","quadratic","time","for","the","time","steps",".","(","Used","in","DDIM","for","low-resolutional","data",".",")","t_T",":","A","`","float","`",".","The","starting","time","of","the","sampling","(","default","is","T",")",".","t_0",":","A","`","float","`",".","The","ending","time","of","the","sampling","(","default","is","epsilon",")",".","N",":","A","`","int","`",".","The","total","number","of","the","spacing","of","the","time","steps",".","device",":","A","torch","device",".","Returns",":","A","pytorch","tensor","of","the","time","steps",",","with","the","shape","(","N","+","1",",",")","."]
code: def get_time_steps(self, skip_type, t_T, t_0, N, device):
      """Compute the intermediate time steps for sampling.
      Args:
          skip_type: A `str`. The type for the spacing of the time steps. We support three types:
              - 'logSNR': uniform logSNR for the time steps.
              - 'time_uniform': uniform time for the time steps. (**Recommended for high-resolutional data**.)
              - 'time_quadratic': quadratic time for the time steps. (Used in DDIM for low-resolutional data.)
          t_T: A `float`. The starting time of the sampling (default is T).
          t_0: A `float`. The ending time of the sampling (default is epsilon).
          N: A `int`. The total number of the spacing of the time steps.
          device: A torch device.
      Returns:
          A pytorch tensor of the time steps, with the shape (N + 1,).
      """
      if skip_type == "logSNR":
          lambda_T = self.noise_schedule.marginal_lambda(
              torch.tensor(t_T).to(device)
          )
          lambda_0 = self.noise_schedule.marginal_lambda(
              torch.tensor(t_0).to(device)
          )
          logSNR_steps = torch.linspace(
              lambda_T.cpu().item(), lambda_0.cpu().item(), N + 1
          ).to(device)
          return self.noise_schedule.inverse_lambda(logSNR_steps)
      elif skip_type == "time_uniform":
          return torch.linspace(t_T, t_0, N + 1).to(device)
      elif skip_type == "time_quadratic":
          t_order = 2
          t = (
              torch.linspace(
                  t_T ** (1.0 / t_order), t_0 ** (1.0 / t_order), N + 1
              )
              .pow(t_order)
              .to(device)
          )
          return t
      else:
          raise ValueError(
              "Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'".format(
                  skip_type
              )
          )
  
imports: import math
  import torch
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling the DPM_Solver obj's underlying member method code with example usage: obj.get_time_steps(skip_type, t_T, t_0, N, device) and returns: self, torch, t