code: def get_nano_cache_dir_dict(
      model_info, vae_repo_id=None, vae_subfolder=None
  ):
      cache_dir_dict = {"unet": None, "vae": None}
      if model_info["format"] == "ckpt":
          from ldm.invoke.globals import Globals
  
          invalidInputError(
              "weights" in model_info,
              errMsg="`weights` is not in model_info.",
          )
          checkpoint_path = model_info["weights"]
          if not os.path.isabs(checkpoint_path):
              checkpoint_path = os.path.normpath(
                  os.path.join(Globals.root, checkpoint_path)
              )
          cache_dir = checkpoint_path.split(".")
          cache_dir.pop()
          cache_dir = ".".join(cache_dir)
          os.makedirs(os.path.dirname(cache_dir), exist_ok=True)
          cache_dir_dict["unet"] = os.path.join(cache_dir, "unet")
          if vae_repo_id is None:
              cache_dir_dict["vae"] = os.path.join(cache_dir, "vae")
          else:
              cache_dir_dict["vae"] = get_local_path_from_repo_id(
                  vae_repo_id
              )
      else:
          if vae_repo_id is not None:
              if not os.path.isabs(vae_repo_id):
                  cache_dir_dict["vae"] = get_local_path_from_repo_id(
                      vae_repo_id
                  )
              if vae_subfolder:
                  cache_dir_dict["vae"] = os.path.join(
                      cache_dir_dict["vae"], vae_subfolder
                  )
  
      return cache_dir_dict
  
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 10 for calling a global function with example usage: get_nano_cache_dir_dict(model_info, vae_repo_id, vae_subfolder) and returns: cache_dir_dict