class_docstr: Utilities for training and sampling diffusion models.
  
  Original ported from this codebase:
  https://github.com/hojonathanho/diffusion/blob/1e0dceb3b3495bbe19116a5e1b3596cd0706c543/diffusion_tf/diffusion_utils_2.py#L42
  
  :param betas: a 1-D numpy array of betas for each diffusion timestep,
                starting at T and going to 1.
docstr: Generate samples from the model using DDIM.
  
  Same usage as p_sample_loop().
docstr_tok: ["Generate","samples","from","the","model","using","DDIM",".","Same","usage","as","p_sample_loop","(",")","."]
code: def ddim_sample_loop(
      self,
      model,
      shape,
      noise=None,
      clip_denoised=True,
      denoised_fn=None,
      cond_fn=None,
      model_kwargs=None,
      device=None,
      progress=False,
      eta=0.0,
  ):
      """
      Generate samples from the model using DDIM.
  
      Same usage as p_sample_loop().
      """
      final = None
      for sample in self.ddim_sample_loop_progressive(
          model,
          shape,
          noise=noise,
          clip_denoised=clip_denoised,
          denoised_fn=denoised_fn,
          cond_fn=cond_fn,
          model_kwargs=model_kwargs,
          device=device,
          progress=progress,
          eta=eta,
      ):
          final = sample
      return final["sample"]
  
imports: import math
  import numpy
  import torch
label_desc: Use image node_id 15 for calling the GaussianDiffusion obj's underlying member method code with example usage: obj.ddim_sample_loop(model, shape, noise, clip_denoised, denoised_fn, cond_fn, model_kwargs, device, progress, eta) and returns: final