code: def __init__(
      self,
      device="cuda:0",
      download_root=os.path.expanduser("~/.cache/clip"),
  ):
      self.n_distilled_steps = 64
      download_target = _download(
          "https://openaipublic.azureedge.net/diff-vae/c9cebd3132dd9c42936d803e33424145a748843c8f716c0814838bdc8a2fe7cb/decoder.pt",
          download_root,
      )
      self.ckpt = torch.jit.load(download_target).to(device)
      self.device = device
      sigma_data = 0.5
      betas = betas_for_alpha_bar(
          1024,
          lambda t: math.cos((t + 0.008) / 1.008 * math.pi / 2) ** 2,
      ).to(device)
      alphas = 1.0 - betas
      alphas_cumprod = torch.cumprod(alphas, dim=0)
      self.sqrt_alphas_cumprod = torch.sqrt(alphas_cumprod)
      self.sqrt_one_minus_alphas_cumprod = torch.sqrt(
          1.0 - alphas_cumprod
      )
      sqrt_recip_alphas_cumprod = torch.sqrt(1.0 / alphas_cumprod)
      sigmas = torch.sqrt(1.0 / alphas_cumprod - 1)
      self.c_skip = (
          sqrt_recip_alphas_cumprod
          * sigma_data**2
          / (sigmas**2 + sigma_data**2)
      )
      self.c_out = (
          sigmas * sigma_data / (sigmas**2 + sigma_data**2) ** 0.5
      )
      self.c_in = (
          sqrt_recip_alphas_cumprod
          / (sigmas**2 + sigma_data**2) ** 0.5
      )
  
file_path: consistencydecoder/consistencydecoder/__init__.py
imports: import hashlib
  import math
  import os
  import urllib
  import warnings
  import torch
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new ConsistencyDecoder object  with example: obj = ConsistencyDecoder(device, download_root)