class_docstr: Test Stable Diffusion text-to-image pipeline for:
  
  - PyTorch to CoreML conversion via coremltools
  - Speed of CoreML runtime across several compute units
  - Integration with `diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.py`
  - Efficacy of the safety_checker
  - Affinity of the generated image with the original prompt via CLIP score
  - The bridge between Python and Swift CLI
  - The signal parity of Swift CLI generated image with that of Python CLI
code: def setUpClass(cls):
      cls.pytorch_pipe = StableDiffusionPipeline.from_pretrained(
          cls.cli_args.model_version,
          use_auth_token=True,
      )
  
      # To be initialized after test_torch_to_coreml_conversion is run
      cls.coreml_pipe = None
      cls.active_compute_unit = None
  
imports: import argparse
  import contextlib
  import coremltools
  from diffusers import StableDiffusionPipeline
  import json
  import logging
  import numpy
  import os
  import unittest
  from PIL import Image
  from statistics import median
  import tempfile
  import time
  import torch
  from python_coreml_stable_diffusion import torch2coreml, pipeline, coreml_model
label_desc: Use image node_id 1 for calling the TestStableDiffusionForTextToImage obj's underlying member method code with example usage: obj.setUpClass(cls) without return types