class_docstr: Pipeline for upscaling Stable Diffusion output image resolution by a factor of 2.
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
  implemented for all pipelines (downloading, saving, running on a particular device, etc.).
  
  Args:
      vae ([`AutoencoderKL`]):
          Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.
      text_encoder ([`~transformers.CLIPTextModel`]):
          Frozen text-encoder ([clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14)).
      tokenizer ([`~transformers.CLIPTokenizer`]):
          A `CLIPTokenizer` to tokenize text.
      unet ([`UNet2DConditionModel`]):
          A `UNet2DConditionModel` to denoise the encoded image latents.
      scheduler ([`SchedulerMixin`]):
          A [`EulerDiscreteScheduler`] to be used in combination with `unet` to denoise the encoded image latents.
class_docstr_tok: ["Pipeline","for","upscaling","Stable","Diffusion","output","image","resolution","by","a","factor","of","2",".","This","model","inherits","from","[","`","DiffusionPipeline","`","]",".","Check","the","superclass","documentation","for","the","generic","methods","implemented","for","all","pipelines","(","downloading",",","saving",",","running","on","a","particular","device",",","etc.",")",".","Args",":","vae","(","[","`","AutoencoderKL","`","]",")",":","Variational","Auto-Encoder","(","VAE",")","model","to","encode","and","decode","images","to","and","from","latent","representations",".","text_encoder","(","[","`","~transformers.CLIPTextModel","`","]",")",":","Frozen","text-encoder","(","[","clip-vit-large-patch14","]","(","https",":","\/\/huggingface.co\/openai\/clip-vit-large-patch14",")",")",".","tokenizer","(","[","`","~transformers.CLIPTokenizer","`","]",")",":","A","`","CLIPTokenizer","`","to","tokenize","text",".","unet","(","[","`","UNet2DConditionModel","`","]",")",":","A","`","UNet2DConditionModel","`","to","denoise","the","encoded","image","latents",".","scheduler","(","[","`","SchedulerMixin","`","]",")",":","A","[","`","EulerDiscreteScheduler","`","]","to","be","used","in","combination","with","`","unet","`","to","denoise","the","encoded","image","latents","."]
code: def check_inputs(self, prompt, image, callback_steps):
      if not isinstance(prompt, str) and not isinstance(prompt, list):
          raise ValueError(
              f"`prompt` has to be of type `str` or `list` but is {type(prompt)}"
          )
  
      if (
          not isinstance(image, torch.Tensor)
          and not isinstance(image, PIL.Image.Image)
          and not isinstance(image, list)
      ):
          raise ValueError(
              f"`image` has to be of type `torch.Tensor`, `PIL.Image.Image` or `list` but is {type(image)}"
          )
  
      # verify batch size of prompt and image are same if image is a list or tensor
      if isinstance(image, list) or isinstance(image, torch.Tensor):
          if isinstance(prompt, str):
              batch_size = 1
          else:
              batch_size = len(prompt)
          if isinstance(image, list):
              image_batch_size = len(image)
          else:
              image_batch_size = (
                  image.shape[0] if image.ndim == 4 else 1
              )
          if batch_size != image_batch_size:
              raise ValueError(
                  f"`prompt` has batch size {batch_size} and `image` has batch size {image_batch_size}."
                  " Please make sure that passed `prompt` matches the batch size of `image`."
              )
  
      if (callback_steps is None) or (
          callback_steps is not None
          and (
              not isinstance(callback_steps, int) or callback_steps <= 0
          )
      ):
          raise ValueError(
              f"`callback_steps` has to be a positive integer but is {callback_steps} of type"
              f" {type(callback_steps)}."
          )
  
imports: import warnings
  from typing import Callable, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  import torch.nn.functional
  from transformers import CLIPTextModel, CLIPTokenizer
  from ...image_processor import PipelineImageInput, VaeImageProcessor
  from ...loaders import FromSingleFileMixin
  from ...models import AutoencoderKL, UNet2DConditionModel
  from ...schedulers import EulerDiscreteScheduler
  from ...utils import deprecate, logging
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
label_desc: Use image node_id 4 for calling the StableDiffusionLatentUpscalePipeline obj's underlying member method code with example usage: obj.check_inputs(prompt, image, callback_steps) without return types