code: def check_option(version, device, local_model_path=None):
      """
      when local_model_path is set, will check this path instead of default "models" folder
      and will not use huggingface cache structure
      """
      try:
          if local_model_path is None or local_model_path == "":
              local_model_path = local_model_path.strip('"').strip("'")
              model_dir = get_snapshot_dir_from_model_version(version)
          else:
              model_dir = local_model_path
          pipe = NanoStableDiffusionPipeline()
          input_accelerator = "openvino"
          input_device = "CPU"
          input_precision = "float16"
  
          if device == "CPU FP32":
              input_accelerator = "jit"
              input_precision = "float32"
          elif device == "CPU/iGPU FP16":
              input_device = "GPU"
  
          converted_dir = pipe._get_cache_path(
              model_dir,
              accelerator=input_accelerator,
              ipex=False,
              precision=input_precision,
              low_memory=False,
              device=input_device,
          )
          vae_converted_dir = pipe._get_cache_path(
              model_dir,
              accelerator=input_accelerator,
              ipex=False,
              precision=input_precision,
              low_memory=False,
              device=input_device,
              vae=True,
          )
          if (
              os.path.exists(converted_dir)
              and len(os.listdir(converted_dir)) > 0
          ):
              if vae_converted_dir:
                  if (
                      os.path.exists(vae_converted_dir)
                      and len(os.listdir(vae_converted_dir)) > 0
                  ):
                      return True
              else:
                  return True
      except:
          return False
      return False
  
file_path: BigDL/python/nano/client-application/StableDiffusion/launch.py
imports: import gradio
  import os
  import multiprocessing
  import time
  import psutil
  from stable_diffusion.runner import StableDiffusionRunner
  from stable_diffusion.converter import convert
  from stable_diffusion.pipelines import NanoStableDiffusionPipeline
  from stable_diffusion.utils import get_snapshot_dir_from_model_version
  from stable_diffusion import runner_process
  import click
label_desc: Use image node_id 7 for calling a global function with example usage: check_option(version, device, local_model_path) and returns: False, False, True, True