code: def set_beta_schedule(self):
      betas = make_beta_schedule(
          "linear",
          1000,
          linear_start=0.00085,
          linear_end=0.0120,
          cosine_s=0.008,
      )
      alphas = 1.0 - betas
      alphas_cumprod = np.cumprod(alphas, axis=0)
      betas = torch.tensor(betas)
      alphas = torch.tensor(alphas)
      alphas_cumprod = torch.tensor(alphas_cumprod)
      to_torch = (
          lambda x: x.clone()
          .detach()
          .to(torch.float32)
          .to(torch.cuda.current_device())
      )
      self.register_buffer("alphas_cumprod", to_torch(alphas_cumprod))
      self.register_buffer(
          "sqrt_alphas_cumprod", to_torch(np.sqrt(alphas_cumprod.cpu()))
      )
      self.register_buffer(
          "sqrt_one_minus_alphas_cumprod",
          to_torch(np.sqrt(1.0 - alphas_cumprod.cpu())),
      )
      (timesteps,) = betas.shape
      self.num_timesteps = int(timesteps)
  
imports: import logging
  import os
  import tempfile
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from omegaconf import OmegaConf
  from polygraphy import cuda
  from transformers import CLIPTokenizer
  from nemo.collections.multimodal.models.text_to_image.stable_diffusion.ldm.ddpm import LatentDiffusion
  from nemo.collections.multimodal.modules.nerf.guidance.txt2img_guidance_base import Txt2ImgGuidanceBase
  from nemo.collections.multimodal.modules.nerf.utils.trt_engine import Engine, device_view
  from nemo.collections.multimodal.modules.stable_diffusion.diffusionmodules.util import extract_into_tensor, make_beta_schedule
  from nemo.collections.multimodal.parts.stable_diffusion.utils import default
  from nemo.collections.multimodal.parts.utils import randn_like
  from nemo.collections.nlp.parts.nlp_overrides import NLPSaveRestoreConnector
label_desc: Use image node_id 2 for calling the LatentDiffusionWrapper obj's underlying member method code with example usage: obj.set_beta_schedule() without return types