class_docstr: Class for generating images from a Stable Diffusion checkpoint trained using Determined
  AI. Initialize with no arguments in order to run plain Stable Diffusion without any trained
  textual inversion embeddings. Can optionally be run on a Determined cluster through the
  .generate_on_cluster() method for large-scale generation. Only intended for use with a GPU.
code: def _build_hf_pipeline(
      self, disable_progress_bar: bool = True
  ) -> None:
      revision = "fp16" if self.use_fp16 else "main"
      torch_dtype = torch.float16 if self.use_fp16 else None
      self.hf_pipeline = StableDiffusionPipeline.from_pretrained(
          pretrained_model_name_or_path=self.pretrained_model_name_or_path,
          scheduler=self.scheduler,
          use_auth_token=self.use_auth_token,
          revision=revision,
          torch_dtype=torch_dtype,
      ).to(self.device)
      # Disable the progress bar.
      if disable_progress_bar:
          self.hf_pipeline.set_progress_bar_config(disable=True)
  
imports: import json
  import logging
  import os
  import pathlib
  from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, Union
  import torch
  from detsd import defaults, utils
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipeline, StableDiffusionPipelineOutput
  from torch.utils.tensorboard import SummaryWriter
  from torchvision.transforms.functional import pil_to_tensor
  import determined
  from determined.experimental import client
label_desc: Use image node_id 5 for calling the DetSDTextualInversionPipeline obj's underlying member method code with example usage: obj._build_hf_pipeline(disable_progress_bar) without return types