class_docstr: Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
  https://arxiv.org/abs/2302.08453
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
  library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)
  
  Args:
      adapter ([`T2IAdapter`] or [`MultiAdapter`] or `List[T2IAdapter]`):
          Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
          list, the outputs from each Adapter are added together to create one combined additional conditioning.
      adapter_weights (`List[float]`, *optional*, defaults to None):
          List of floats representing the weight which will be multiply to each adapter's output before adding them
          together.
      vae ([`AutoencoderKL`]):
          Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.
      text_encoder ([`CLIPTextModel`]):
          Frozen text-encoder. Stable Diffusion uses the text portion of
          [CLIP](https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel), specifically
          the [clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14) variant.
      tokenizer (`CLIPTokenizer`):
          Tokenizer of class
          [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer).
      unet ([`UNet2DConditionModel`]): Conditional U-Net architecture to denoise the encoded image latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded image latents. Can be one of
          [`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
      safety_checker ([`StableDiffusionSafetyChecker`]):
          Classification module that estimates whether generated images could be considered offensive or harmful.
          Please, refer to the [model card](https://huggingface.co/runwayml/stable-diffusion-v1-5) for details.
      feature_extractor ([`CLIPFeatureExtractor`]):
          Model that extracts features from generated images to be used as inputs for the `safety_checker`.
code: def _default_height_width(self, height, width, image):
      # NOTE: It is possible that a list of images have different
      # dimensions for each image, so just checking the first image
      # is not _exactly_ correct, but it is simple.
      while isinstance(image, list):
          image = image[0]
  
      if height is None:
          if isinstance(image, PIL.Image.Image):
              height = image.height
          elif isinstance(image, torch.Tensor):
              height = image.shape[-2]
  
          # round down to nearest multiple of `self.adapter.downscale_factor`
          height = (
              height // self.adapter.downscale_factor
          ) * self.adapter.downscale_factor
  
      if width is None:
          if isinstance(image, PIL.Image.Image):
              width = image.width
          elif isinstance(image, torch.Tensor):
              width = image.shape[-1]
  
          # round down to nearest multiple of `self.adapter.downscale_factor`
          width = (
              width // self.adapter.downscale_factor
          ) * self.adapter.downscale_factor
  
      return height, width
  
imports: import inspect
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  from transformers import CLIPFeatureExtractor, CLIPTextModel, CLIPTokenizer
  from ...image_processor import VaeImageProcessor
  from ...loaders import LoraLoaderMixin, TextualInversionLoaderMixin
  from ...models import AutoencoderKL, MultiAdapter, T2IAdapter, UNet2DConditionModel
  from ...models.lora import adjust_lora_scale_text_encoder
  from ...schedulers import KarrasDiffusionSchedulers
  from ...utils import PIL_INTERPOLATION, USE_PEFT_BACKEND, BaseOutput, deprecate, logging, replace_example_docstring, scale_lora_layers, unscale_lora_layers
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline
  from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker
label_desc: Use image node_id 11 for calling the StableDiffusionAdapterPipeline obj's underlying member method code with example usage: obj._default_height_width(height, width, image) and returns: height,  width