code: def apply_model(orig_func, self, x_noisy, t, cond, **kwargs):
      if isinstance(cond, dict):
          for y in cond.keys():
              if isinstance(cond[y], list):
                  cond[y] = [
                      x.to(devices.dtype_unet)
                      if isinstance(x, torch.Tensor)
                      else x
                      for x in cond[y]
                  ]
              else:
                  cond[y] = (
                      cond[y].to(devices.dtype_unet)
                      if isinstance(cond[y], torch.Tensor)
                      else cond[y]
                  )
  
      with devices.autocast():
          return orig_func(
              self,
              x_noisy.to(devices.dtype_unet),
              t.to(devices.dtype_unet),
              cond,
              **kwargs,
          ).float()
  
file_path: stable-diffusion-webui/modules/sd_hijack_unet.py
imports: import torch
  from packaging import version
  from modules import devices
  from modules.sd_hijack_utils import CondFunc
label_desc: Use image node_id 1 for calling a global function with example usage: apply_model(orig_func, x_noisy, t, cond) and returns: orig_func