class_docstr: Pipeline for text-to-image generation using Stable Diffusion XL.
  
  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.)
  
  In addition the pipeline inherits the following loading methods:
      - *LoRA*: [`loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights`]
      - *Ckpt*: [`loaders.FromSingleFileMixin.from_single_file`]
  
  as well as the following saving methods:
      - *LoRA*: [`loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights`]
  
  Args:
      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 XL 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.
      text_encoder_2 ([` CLIPTextModelWithProjection`]):
          Second frozen text-encoder. Stable Diffusion XL uses the text and pool portion of
          [CLIP](https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModelWithProjection),
          specifically the
          [laion/CLIP-ViT-bigG-14-laion2B-39B-b160k](https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k)
          variant.
      tokenizer (`CLIPTokenizer`):
          Tokenizer of class
          [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer).
      tokenizer_2 (`CLIPTokenizer`):
          Second 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`].
code: def check_inputs(
      self,
      prompt,
      prompt_2,
      image,
      strength,
      num_inference_steps,
      callback_steps,
      negative_prompt=None,
      negative_prompt_2=None,
      prompt_embeds=None,
      negative_prompt_embeds=None,
      pooled_prompt_embeds=None,
      negative_pooled_prompt_embeds=None,
      controlnet_conditioning_scale=1.0,
      control_guidance_start=0.0,
      control_guidance_end=1.0,
  ):
      if strength < 0 or strength > 1:
          raise ValueError(
              f"The value of strength should in [0.0, 1.0] but is {strength}"
          )
      if num_inference_steps is None:
          raise ValueError("`num_inference_steps` cannot be None.")
      elif (
          not isinstance(num_inference_steps, int)
          or num_inference_steps <= 0
      ):
          raise ValueError(
              f"`num_inference_steps` has to be a positive integer but is {num_inference_steps} of type"
              f" {type(num_inference_steps)}."
          )
      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_2 is not None and prompt_embeds is not None:
          raise ValueError(
              f"Cannot forward both `prompt_2`: {prompt_2} 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)}"
          )
      elif prompt_2 is not None and (
          not isinstance(prompt_2, str)
          and not isinstance(prompt_2, list)
      ):
          raise ValueError(
              f"`prompt_2` has to be of type `str` or `list` but is {type(prompt_2)}"
          )
  
      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."
          )
      elif (
          negative_prompt_2 is not None
          and negative_prompt_embeds is not None
      ):
          raise ValueError(
              f"Cannot forward both `negative_prompt_2`: {negative_prompt_2} 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 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_embeds is not None and pooled_prompt_embeds is None:
          raise ValueError(
              "If `prompt_embeds` are provided, `pooled_prompt_embeds` also have to be passed. Make sure to generate `pooled_prompt_embeds` from the same text encoder that was used to generate `prompt_embeds`."
          )
  
      if (
          negative_prompt_embeds is not None
          and negative_pooled_prompt_embeds is None
      ):
          raise ValueError(
              "If `negative_prompt_embeds` are provided, `negative_pooled_prompt_embeds` also have to be passed. Make sure to generate `negative_pooled_prompt_embeds` from the same text encoder that was used to generate `negative_prompt_embeds`."
          )
  
      # `prompt` needs more sophisticated handling when there are multiple
      # conditionings.
      if isinstance(self.controlnet, MultiControlNetModel):
          if isinstance(prompt, list):
              logger.warning(
                  f"You have {len(self.controlnet.nets)} ControlNets and you have passed {len(prompt)}"
                  " prompts. The conditionings will be fixed across the prompts."
              )
  
      # Check `image`
      is_compiled = hasattr(
          F, "scaled_dot_product_attention"
      ) and isinstance(
          self.controlnet, torch._dynamo.eval_frame.OptimizedModule
      )
      if (
          isinstance(self.controlnet, ControlNetModel)
          or is_compiled
          and isinstance(self.controlnet._orig_mod, ControlNetModel)
      ):
          self.check_image(image, prompt, prompt_embeds)
      elif (
          isinstance(self.controlnet, MultiControlNetModel)
          or is_compiled
          and isinstance(
              self.controlnet._orig_mod, MultiControlNetModel
          )
      ):
          if not isinstance(image, list):
              raise TypeError(
                  "For multiple controlnets: `image` must be type `list`"
              )
  
          # When `image` is a nested list:
          # (e.g. [[canny_image_1, pose_image_1], [canny_image_2, pose_image_2]])
          elif any(isinstance(i, list) for i in image):
              raise ValueError(
                  "A single batch of multiple conditionings are supported at the moment."
              )
          elif len(image) != len(self.controlnet.nets):
              raise ValueError(
                  f"For multiple controlnets: `image` must have the same length as the number of controlnets, but got {len(image)} images and {len(self.controlnet.nets)} ControlNets."
              )
  
          for image_ in image:
              self.check_image(image_, prompt, prompt_embeds)
      else:
          assert False
  
      # Check `controlnet_conditioning_scale`
      if (
          isinstance(self.controlnet, ControlNetModel)
          or is_compiled
          and isinstance(self.controlnet._orig_mod, ControlNetModel)
      ):
          if not isinstance(controlnet_conditioning_scale, float):
              raise TypeError(
                  "For single controlnet: `controlnet_conditioning_scale` must be type `float`."
              )
      elif (
          isinstance(self.controlnet, MultiControlNetModel)
          or is_compiled
          and isinstance(
              self.controlnet._orig_mod, MultiControlNetModel
          )
      ):
          if isinstance(controlnet_conditioning_scale, list):
              if any(
                  isinstance(i, list)
                  for i in controlnet_conditioning_scale
              ):
                  raise ValueError(
                      "A single batch of multiple conditionings are supported at the moment."
                  )
          elif isinstance(controlnet_conditioning_scale, list) and len(
              controlnet_conditioning_scale
          ) != len(self.controlnet.nets):
              raise ValueError(
                  "For multiple controlnets: When `controlnet_conditioning_scale` is specified as `list`, it must have"
                  " the same length as the number of controlnets"
              )
      else:
          assert False
  
      if not isinstance(control_guidance_start, (tuple, list)):
          control_guidance_start = [control_guidance_start]
  
      if not isinstance(control_guidance_end, (tuple, list)):
          control_guidance_end = [control_guidance_end]
  
      if len(control_guidance_start) != len(control_guidance_end):
          raise ValueError(
              f"`control_guidance_start` has {len(control_guidance_start)} elements, but `control_guidance_end` has {len(control_guidance_end)} elements. Make sure to provide the same number of elements to each list."
          )
  
      if isinstance(self.controlnet, MultiControlNetModel):
          if len(control_guidance_start) != len(self.controlnet.nets):
              raise ValueError(
                  f"`control_guidance_start`: {control_guidance_start} has {len(control_guidance_start)} elements but there are {len(self.controlnet.nets)} controlnets available. Make sure to provide {len(self.controlnet.nets)}."
              )
  
      for start, end in zip(
          control_guidance_start, control_guidance_end
      ):
          if start >= end:
              raise ValueError(
                  f"control guidance start: {start} cannot be larger or equal to control guidance end: {end}."
              )
          if start < 0.0:
              raise ValueError(
                  f"control guidance start: {start} can't be smaller than 0."
              )
          if end > 1.0:
              raise ValueError(
                  f"control guidance end: {end} can't be larger than 1.0."
              )
  
imports: import inspect
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import PIL.Image
  import torch
  import torch.nn.functional
  from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer
  from ...image_processor import PipelineImageInput, VaeImageProcessor
  from ...loaders import FromSingleFileMixin, StableDiffusionXLLoraLoaderMixin, TextualInversionLoaderMixin
  from ...models import AutoencoderKL, ControlNetModel, UNet2DConditionModel
  from ...models.attention_processor import AttnProcessor2_0, LoRAAttnProcessor2_0, LoRAXFormersAttnProcessor, XFormersAttnProcessor
  from ...models.lora import adjust_lora_scale_text_encoder
  from ...schedulers import KarrasDiffusionSchedulers
  from ...utils import USE_PEFT_BACKEND, is_invisible_watermark_available, logging, replace_example_docstring, scale_lora_layers, unscale_lora_layers
  from ...utils.torch_utils import is_compiled_module, randn_tensor
  from ..pipeline_utils import DiffusionPipeline
  from ..stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
  from .multicontrolnet import MultiControlNetModel
label_desc: Use image node_id 9 for calling the StableDiffusionXLControlNetInpaintPipeline obj's underlying member method code with example usage: obj.check_inputs(prompt, prompt_2, image, strength, num_inference_steps, callback_steps, negative_prompt, negative_prompt_2, prompt_embeds, negative_prompt_embeds, pooled_prompt_embeds, negative_pooled_prompt_embeds, controlnet_conditioning_scale, control_guidance_start, control_guidance_end) without return types