class_docstr: Constructs an InstructBLIP processor which wraps a BLIP image processor and a LLaMa/T5 tokenizer into a single
  processor.
  
  [`InstructBlipProcessor`] offers all the functionalities of [`BlipImageProcessor`] and [`AutoTokenizer`]. See the
  docstring of [`~BlipProcessor.__call__`] and [`~BlipProcessor.decode`] for more information.
  
  Args:
      image_processor (`BlipImageProcessor`):
          An instance of [`BlipImageProcessor`]. The image processor is a required input.
      tokenizer (`AutoTokenizer`):
          An instance of ['PreTrainedTokenizer`]. The tokenizer is a required input.
      qformer_tokenizer (`AutoTokenizer`):
          An instance of ['PreTrainedTokenizer`]. The Q-Former tokenizer is a required input.
class_docstr_tok: ["Constructs","an","InstructBLIP","processor","which","wraps","a","BLIP","image","processor","and","a","LLaMa\/T5","tokenizer","into","a","single","processor",".","[","`","InstructBlipProcessor","`","]","offers","all","the","functionalities","of","[","`","BlipImageProcessor","`","]","and","[","`","AutoTokenizer","`","]",".","See","the","docstring","of","[","`","~BlipProcessor.__call__","`","]","and","[","`","~BlipProcessor.decode","`","]","for","more","information",".","Args",":","image_processor","(","`","BlipImageProcessor","`",")",":","An","instance","of","[","`","BlipImageProcessor","`","]",".","The","image","processor","is","a","required","input",".","tokenizer","(","`","AutoTokenizer","`",")",":","An","instance","of","[","'PreTrainedTokenizer","`","]",".","The","tokenizer","is","a","required","input",".","qformer_tokenizer","(","`","AutoTokenizer","`",")",":","An","instance","of","[","'PreTrainedTokenizer","`","]",".","The","Q-Former","tokenizer","is","a","required","input","."]
docstr: This method uses [`BlipImageProcessor.__call__`] method to prepare image(s) for the model, and
  [`BertTokenizerFast.__call__`] to prepare text for the model.
  
  Please refer to the docstring of the above two methods for more information.
docstr_tok: ["This","method","uses","[","`","BlipImageProcessor.__call__","`","]","method","to","prepare","image","(","s",")","for","the","model",",","and","[","`","BertTokenizerFast.__call__","`","]","to","prepare","text","for","the","model",".","Please","refer","to","the","docstring","of","the","above","two","methods","for","more","information","."]
code: def __call__(
      self,
      images: ImageInput = None,
      text: Union[
          TextInput,
          PreTokenizedInput,
          List[TextInput],
          List[PreTokenizedInput],
      ] = None,
      add_special_tokens: bool = True,
      padding: Union[bool, str, PaddingStrategy] = False,
      truncation: Union[bool, str, TruncationStrategy] = None,
      max_length: Optional[int] = None,
      stride: int = 0,
      pad_to_multiple_of: Optional[int] = None,
      return_attention_mask: Optional[bool] = None,
      return_overflowing_tokens: bool = False,
      return_special_tokens_mask: bool = False,
      return_offsets_mapping: bool = False,
      return_token_type_ids: bool = False,
      return_length: bool = False,
      verbose: bool = True,
      return_tensors: Optional[Union[str, TensorType]] = None,
      **kwargs,
  ) -> BatchFeature:
      """
      This method uses [`BlipImageProcessor.__call__`] method to prepare image(s) for the model, and
      [`BertTokenizerFast.__call__`] to prepare text for the model.
  
      Please refer to the docstring of the above two methods for more information.
      """
      if images is None and text is None:
          raise ValueError(
              "You have to specify at least images or text."
          )
  
      encoding = BatchFeature()
  
      if text is not None:
          text_encoding = self.tokenizer(
              text=text,
              add_special_tokens=add_special_tokens,
              padding=padding,
              truncation=truncation,
              max_length=max_length,
              stride=stride,
              pad_to_multiple_of=pad_to_multiple_of,
              return_attention_mask=return_attention_mask,
              return_overflowing_tokens=return_overflowing_tokens,
              return_special_tokens_mask=return_special_tokens_mask,
              return_offsets_mapping=return_offsets_mapping,
              return_token_type_ids=return_token_type_ids,
              return_length=return_length,
              verbose=verbose,
              return_tensors=return_tensors,
              **kwargs,
          )
          encoding.update(text_encoding)
          qformer_text_encoding = self.qformer_tokenizer(
              text=text,
              add_special_tokens=add_special_tokens,
              padding=padding,
              truncation=truncation,
              max_length=max_length,
              stride=stride,
              pad_to_multiple_of=pad_to_multiple_of,
              return_attention_mask=return_attention_mask,
              return_overflowing_tokens=return_overflowing_tokens,
              return_special_tokens_mask=return_special_tokens_mask,
              return_offsets_mapping=return_offsets_mapping,
              return_token_type_ids=return_token_type_ids,
              return_length=return_length,
              verbose=verbose,
              return_tensors=return_tensors,
              **kwargs,
          )
          encoding["qformer_input_ids"] = qformer_text_encoding.pop(
              "input_ids"
          )
          encoding[
              "qformer_attention_mask"
          ] = qformer_text_encoding.pop("attention_mask")
  
      if images is not None:
          image_encoding = self.image_processor(
              images, return_tensors=return_tensors
          )
          encoding.update(image_encoding)
  
      return encoding
  
file_path: transformers/src/transformers/models/instructblip/processing_instructblip.py
imports: import os
  from typing import List, Optional, Union
  from ...image_processing_utils import BatchFeature
  from ...image_utils import ImageInput
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
  from ...utils import TensorType
  from ..auto import AutoTokenizer
label_desc: Use image node_id 2 for calling the InstructBlipProcessor obj's underlying member method code with example usage: obj.__call__(images, text, add_special_tokens, padding, truncation, max_length, stride, pad_to_multiple_of, return_attention_mask, return_overflowing_tokens, return_special_tokens_mask, return_offsets_mapping, return_token_type_ids, return_length, verbose, return_tensors) and returns: encoding