code: def _preload_ov(pretrained_model_name_or_path, device, precision):
      from bigdl.nano.diffusion.diffusers.modules import NanoUNet
  
      unet = load_optimized_unet(
          cache_dir=os.path.join(pretrained_model_name_or_path, "unet"),
          device=device,
          precision=precision,
      )
      wrapped_unet = NanoUNet(unet)
      vae_decoder = load_optimized_vae_decoder(
          cache_dir=os.path.join(pretrained_model_name_or_path, "vae"),
          device=device,
          precision=precision,
      )
      return wrapped_unet, vae_decoder
  
imports: import os
  import functools
  import diffusers
  from huggingface_hub import snapshot_download
  from transformers import CLIPFeatureExtractor, CLIPTextModel, CLIPTokenizer
  from diffusers import DiffusionPipeline, StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
  from diffusers import AutoencoderKL, UNet2DConditionModel
  from bigdl.nano.diffusion.utils.paths import *
  from bigdl.nano.pytorch import InferenceOptimizer
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.diffusion.common.optimize import load_optimized_unet, load_optimized_vae_decoder
label_desc: Use image node_id 2 for calling a global function with example usage: _preload_ov(pretrained_model_name_or_path, device, precision) and returns: wrapped_unet,  vae_decoder