class_docstr: Pipeline for text-to-image generation using PixArt-Alpha.
  
  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:
      vae ([`AutoencoderKL`]):
          Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.
      text_encoder ([`T5EncoderModel`]):
          Frozen text-encoder. PixArt-Alpha uses
          [T5](https://huggingface.co/docs/transformers/model_doc/t5#transformers.T5EncoderModel), specifically the
          [t5-v1_1-xxl](https://huggingface.co/PixArt-alpha/PixArt-alpha/tree/main/t5-v1_1-xxl) variant.
      tokenizer (`T5Tokenizer`):
          Tokenizer of class
          [T5Tokenizer](https://huggingface.co/docs/transformers/model_doc/t5#transformers.T5Tokenizer).
      transformer ([`Transformer2DModel`]):
          A text conditioned `Transformer2DModel` to denoise the encoded image latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `transformer` to denoise the encoded image latents.
class_docstr_tok: ["Pipeline","for","text-to-image","generation","using","PixArt-Alpha",".","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",":","vae","(","[","`","AutoencoderKL","`","]",")",":","Variational","Auto-Encoder","(","VAE",")","Model","to","encode","and","decode","images","to","and","from","latent","representations",".","text_encoder","(","[","`","T5EncoderModel","`","]",")",":","Frozen","text-encoder",".","PixArt-Alpha","uses","[","T5","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/model_doc\/t5","#","transformers.T5EncoderModel",")",",","specifically","the","[","t5-v1_1-xxl","]","(","https",":","\/\/huggingface.co\/PixArt-alpha\/PixArt-alpha\/tree\/main\/t5-v1_1-xxl",")","variant",".","tokenizer","(","`","T5Tokenizer","`",")",":","Tokenizer","of","class","[","T5Tokenizer","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/model_doc\/t5","#","transformers.T5Tokenizer",")",".","transformer","(","[","`","Transformer2DModel","`","]",")",":","A","text","conditioned","`","Transformer2DModel","`","to","denoise","the","encoded","image","latents",".","scheduler","(","[","`","SchedulerMixin","`","]",")",":","A","scheduler","to","be","used","in","combination","with","`","transformer","`","to","denoise","the","encoded","image","latents","."]
code: def check_inputs(
      self,
      prompt,
      height,
      width,
      negative_prompt,
      callback_steps,
      prompt_embeds=None,
      negative_prompt_embeds=None,
      prompt_attention_mask=None,
      negative_prompt_attention_mask=None,
  ):
      if height % 8 != 0 or width % 8 != 0:
          raise ValueError(
              f"`height` and `width` have to be divisible by 8 but are {height} and {width}."
          )
  
      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)}."
          )
  
      if prompt is not None and prompt_embeds is not None:
          raise ValueError(
              f"Cannot forward both `prompt`: {prompt} and `prompt_embeds`: {prompt_embeds}. Please make sure to"
              " only forward one of the two."
          )
      elif prompt is None and prompt_embeds is None:
          raise ValueError(
              "Provide either `prompt` or `prompt_embeds`. Cannot leave both `prompt` and `prompt_embeds` undefined."
          )
      elif prompt is not None and (
          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 prompt is not None and negative_prompt_embeds is not None:
          raise ValueError(
              f"Cannot forward both `prompt`: {prompt} and `negative_prompt_embeds`:"
              f" {negative_prompt_embeds}. Please make sure to only forward one of the two."
          )
  
      if (
          negative_prompt is not None
          and negative_prompt_embeds is not None
      ):
          raise ValueError(
              f"Cannot forward both `negative_prompt`: {negative_prompt} and `negative_prompt_embeds`:"
              f" {negative_prompt_embeds}. Please make sure to only forward one of the two."
          )
  
      if prompt_embeds is not None and prompt_attention_mask is None:
          raise ValueError(
              "Must provide `prompt_attention_mask` when specifying `prompt_embeds`."
          )
  
      if (
          negative_prompt_embeds is not None
          and negative_prompt_attention_mask is None
      ):
          raise ValueError(
              "Must provide `negative_prompt_attention_mask` when specifying `negative_prompt_embeds`."
          )
  
      if (
          prompt_embeds is not None
          and negative_prompt_embeds is not None
      ):
          if prompt_embeds.shape != negative_prompt_embeds.shape:
              raise ValueError(
                  "`prompt_embeds` and `negative_prompt_embeds` must have the same shape when passed directly, but"
                  f" got: `prompt_embeds` {prompt_embeds.shape} != `negative_prompt_embeds`"
                  f" {negative_prompt_embeds.shape}."
              )
          if (
              prompt_attention_mask.shape
              != negative_prompt_attention_mask.shape
          ):
              raise ValueError(
                  "`prompt_attention_mask` and `negative_prompt_attention_mask` must have the same shape when passed directly, but"
                  f" got: `prompt_attention_mask` {prompt_attention_mask.shape} != `negative_prompt_attention_mask`"
                  f" {negative_prompt_attention_mask.shape}."
              )
  
imports: import html
  import inspect
  import re
  import urllib.parse
  from typing import Callable, List, Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from transformers import T5EncoderModel, T5Tokenizer
  from ...image_processor import VaeImageProcessor
  from ...models import AutoencoderKL, Transformer2DModel
  from ...schedulers import DPMSolverMultistepScheduler
  from ...utils import BACKENDS_MAPPING, deprecate, is_bs4_available, is_ftfy_available, logging, replace_example_docstring
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
label_desc: Use image node_id 5 for calling the PixArtAlphaPipeline obj's underlying member method code with example usage: obj.check_inputs(prompt, height, width, negative_prompt, callback_steps, prompt_embeds, negative_prompt_embeds, prompt_attention_mask, negative_prompt_attention_mask) without return types