code: def p_sample(
      self, x, cond, t, clip_denoised=False, repeat_noise=False
  ):
      b, *_, device = *x.shape, x.device
      model_mean, _, model_log_variance = self.p_mean_variance(
          x=x, cond=cond, t=t, clip_denoised=clip_denoised
      )
      noise = noise_like(x.shape, device, repeat_noise)
      # no noise when t == 0
      nonzero_mask = (1 - (t == 0).float()).reshape(
          b, *((1,) * (len(x.shape) - 1))
      )
      return (
          model_mean
          + nonzero_mask * (0.5 * model_log_variance).exp() * noise
      )
  
imports: from functools import partial
  from inspect import isfunction
  import numpy
  import torch
  from torch import nn, einsum
  import torch.nn.functional
label_desc: Use image node_id 8 for calling the GaussianDiffusion obj's underlying member method code with example usage: obj.p_sample(x, cond, t, clip_denoised, repeat_noise) and returns: unknown