code: def unipc(
      model,
      x,
      timesteps,
      extra_args=None,
      callback=None,
      disable=None,
      is_img2img=False,
  ):
      alphas_cumprod = model.inner_model.inner_model.alphas_cumprod
  
      ns = uni_pc.NoiseScheduleVP(
          "discrete", alphas_cumprod=alphas_cumprod
      )
      t_start = (
          timesteps[-1] / 1000 + 1 / 1000 if is_img2img else None
      )  # this is likely off by a bit - if someone wants to fix it please by all means
      unipc_sampler = UniPCCFG(
          model,
          extra_args,
          callback,
          ns,
          predict_x0=True,
          thresholding=False,
          variant=shared.opts.uni_pc_variant,
      )
      x = unipc_sampler.sample(
          x,
          steps=len(timesteps),
          t_start=t_start,
          skip_type=shared.opts.uni_pc_skip_type,
          method="multistep",
          order=shared.opts.uni_pc_order,
          lower_order_final=shared.opts.uni_pc_lower_order_final,
      )
  
      return x
  
file_path: stable-diffusion-webui/modules/sd_samplers_timesteps_impl.py
imports: import torch
  import tqdm
  import k_diffusion.sampling
  import numpy
  from modules import shared
  from modules.models.diffusion.uni_pc import uni_pc
label_desc: Use image node_id 3 for calling a global function with example usage: unipc(model, x, timesteps, extra_args, callback, disable, is_img2img) and returns: x