docstr: # below is used for continuous t, uncomment & modify for your needs if you want to
  t_next = t + 1 / self.num_train_timesteps
  t_n, t_n_next = sampler.t[np.digitize(t, sampler.t)], sampler.t[np.digitize(t+1/self.num_train_timesteps, sampler.t)]
  t_n_next = t_n + self.stride
  log_alpha_n, log_alpha_n_next = self.alpha[t].log(), self.alpha[t_next].log()
  log_alpha_t = log_alpha_n + (log_alpha_n_next-log_alpha_n)/(t_n_next-t_n) * (t-t_n)
docstr_tok: ["#","below","is","used","for","continuous","t",",","uncomment","&","modify","for","your","needs","if","you","want","to","t_next","=","t","+","1","\/","self.num_train_timesteps","t_n",",","t_n_next","=","sampler.t","[","np.digitize","(","t",",","sampler.t",")","]",",","sampler.t","[","np.digitize","(","t+1\/self.num_train_timesteps",",","sampler.t",")","]","t_n_next","=","t_n","+","self.stride","log_alpha_n",",","log_alpha_n_next","=","self.alpha","[","t","]",".log","(",")",",","self.alpha","[","t_next","]",".log","(",")","log_alpha_t","=","log_alpha_n","+","(","log_alpha_n_next-log_alpha_n",")","\/","(","t_n_next-t_n",")","*","(","t-t_n",")"]
code: def get_coeffs(self, t):
      # appendix b.1 for alphas, sigmas, lambdas
      """# below is used for continuous t, uncomment & modify for your needs if you want to
      t_next = t + 1 / self.num_train_timesteps
      t_n, t_n_next = sampler.t[np.digitize(t, sampler.t)], sampler.t[np.digitize(t+1/self.num_train_timesteps, sampler.t)]
      t_n_next = t_n + self.stride
      log_alpha_n, log_alpha_n_next = self.alpha[t].log(), self.alpha[t_next].log()
      log_alpha_t = log_alpha_n + (log_alpha_n_next-log_alpha_n)/(t_n_next-t_n) * (t-t_n)
      """
      log_alpha_t = self.alpha[
          t
      ].log()  # comment this out if above is uncommented
      alpha_t = log_alpha_t.exp()
      sigma_t = (1 - alpha_t**2).sqrt()
      log_sigma_t = sigma_t.log()
      lambda_t = log_alpha_t - log_sigma_t
      return alpha_t, sigma_t, lambda_t
  
file_path: diffusion-for-beginners/samplers/dpm_solver_plus_plus.py
imports: import torch
  import numpy
  import utils
label_desc: Use image node_id 3 for calling the DPMPlusPlusSampler obj's underlying member method code with example usage: obj.get_coeffs(t) and returns: alpha_t,  sigma_t,  lambda_t