code: def save_vae_if_not_exist(vae, cache_dir=None):
      """
      Saves an optimized VAE to local file system if it's not there
          Parameters:
              unet: the AutoencoderKL instance
              cache_dir: the model path to save the optimized VAE,
                      if None, will use the original VAE path
      """
      opt_vae = optimize_vae(
          vae,
          accelerator="openvino",
          ipex=False,
          precision="float16",
          cache=True,
          inplace=False,
          cache_dir=cache_dir,
          return_model=False,
      )
      del vae
      del opt_vae
  
imports: import os
  import time
  import torch
  import shutil
  from collections import OrderedDict
  from diffusers.models import ControlNetModel
  from huggingface_hub import snapshot_download
  from ..common.load import *
  from ..utils.paths import *
  from bigdl.nano.pytorch import InferenceOptimizer
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 6 for calling a global function with example usage: save_vae_if_not_exist(vae, cache_dir) without return types