code: def run_opt_pipeline(
      self, model_dir, optimization_methods, scheduler, **kwargs
  ):
      version, optimization_methods = optimization_methods.split("/")
      if model_dir is not None and model_dir != "":
          self.model_dir = model_dir
      else:
          self.model_dir = get_snapshot_dir_from_model_version(version)
  
      # fp16 only works with OpenVINO on iGPU
      if "FP16" in optimization_methods:
          precision = "float16"
      elif "INT8" in optimization_methods:
          precision = "int8"
      else:
          precision = "float32"
      device = "GPU" if "iGPU" in optimization_methods else "CPU"
  
      if "OpenVINO" in optimization_methods:
          optimization_methods = "OpenVINO"
  
      if optimization_methods == "IPEX":
          image = self.run_ipex_jit(
              scheduler, version, precision, device, **kwargs
          )
      elif optimization_methods == "JIT":
          image = self.run_jit(
              scheduler, version, precision, device, **kwargs
          )
      elif optimization_methods == "INC INT8":
          image = self.run_inc_int8(
              scheduler, version, precision, device, **kwargs
          )
      elif optimization_methods == "OpenVINO":
          image = self.run_ov(
              scheduler, version, precision, device, **kwargs
          )
      elif optimization_methods == "IPEX Low-memory":
          image = self.run_ipex_jit_lm(
              scheduler, version, precision, device, **kwargs
          )
      else:
          raise Exception(
              f"Optimization method not supported, supported methods are 'IPEX', 'IPEX Low-memory', 'OpenVINO', "
              "'INC INT8', got {optimization_methods}"
          )
  
      return image
  
imports: from typing import ClassVar, Optional
  import torch
  import os
  from bigdl.nano.pytorch import InferenceOptimizer
  from diffusers.schedulers import *
  from .utils import get_snapshot_dir_from_model_version
  from .pipelines import NanoStableDiffusionPipeline
label_desc: Use image node_id 8 for calling the StableDiffusionRunner obj's underlying member method code with example usage: obj.run_opt_pipeline(model_dir, optimization_methods, scheduler) and returns: image