code: def _load_mlpackage_controlnet(
      mlpackages_dir, model_version, compute_unit
  ):
      """Load Core ML (mlpackage) models from disk (As exported by torch2coreml.py)"""
      model_name = model_version.replace("/", "_")
  
      logger.info(f"Loading controlnet_{model_name} mlpackage")
  
      fname = f"ControlNet_{model_name}.mlpackage"
  
      mlpackage_path = os.path.join(mlpackages_dir, fname)
  
      if not os.path.exists(mlpackage_path):
          raise FileNotFoundError(
              f"controlnet_{model_name} CoreML model doesn't exist at {mlpackage_path}"
          )
  
      return CoreMLModel(mlpackage_path, compute_unit)
  
file_path: ml-stable-diffusion/python_coreml_stable_diffusion/coreml_model.py
imports: import coremltools
  import logging
  import json
  import numpy
  import os
  import time
label_desc: Use image node_id 3 for calling a global function with example usage: _load_mlpackage_controlnet(mlpackages_dir, model_version, compute_unit) and returns: CoreMLModel