code: 
  
  
  
  
  """simple docstring"""
  
  
  
  
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import BatchEncoding
  class 							lowerCamelCase		( _UpperCAmelCase				):
     lowercase       :  List[Any]      =				['image_processor', 'tokenizer']
     lowercase       :  Union[str, Any]      =				'EfficientNetImageProcessor'
     lowercase       :  Optional[Any]      =				('BertTokenizer', 'BertTokenizerFast')
  
  
  
  
  
  
  
     def __init__(							self    ,      SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_ ):
         super().__init__(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_ )
  
  
  
  
  
  
  
     def __call__(							self    ,      SCREAMING_SNAKE_CASE_=None    ,      SCREAMING_SNAKE_CASE_=None    ,      SCREAMING_SNAKE_CASE_="max_length"    ,      SCREAMING_SNAKE_CASE_=64    ,      SCREAMING_SNAKE_CASE_=None    ,      **SCREAMING_SNAKE_CASE_ ):
         if text is None and images is None:
             raise ValueError("""You have to specify either text or images. Both cannot be none.""" )
  
         if text is not None:
             UpperCamelCase				:   Tuple          =							self.tokenizer(
                 SCREAMING_SNAKE_CASE_    ,      padding=SCREAMING_SNAKE_CASE_    ,      max_length=SCREAMING_SNAKE_CASE_    ,      return_tensors=SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_ )
  
         if images is not None:
             UpperCamelCase				:   Dict          =							self.image_processor(SCREAMING_SNAKE_CASE_    ,      return_tensors=SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_ )
  
         if text is not None and images is not None:
             UpperCamelCase				:   Dict          =							image_features.pixel_values
             return encoding
         elif text is not None:
             return encoding
         else:
             return BatchEncoding(data=dict(**SCREAMING_SNAKE_CASE_ )    ,      tensor_type=SCREAMING_SNAKE_CASE_ )
  
  
  
  
  
  
  
     def       a_							(							self    ,      *SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_ ):
         return self.tokenizer.batch_decode(*SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_ )
  
  
  
  
  
  
  
     def       a_							(							self    ,      *SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_ ):
         return self.tokenizer.decode(*SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_ )
  
  
  
  
  
  
  
     @property
     def       a_							(							self ):
         UpperCamelCase				:   Dict          =							self.tokenizer.model_input_names
         UpperCamelCase				:   Any          =							self.image_processor.model_input_names
         return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names ) )
  
  
  
  
  
style_context: 
  
  
  
  
  """simple docstring"""
  
  
  
  
  from ...utils import is_transformers_available
  from .pipeline_latent_diffusion_superresolution import LDMSuperResolutionPipeline
  
  
  if is_transformers_available():
    from .pipeline_latent_diffusion import LDMBertModel, LDMTextToImagePipeline
  
  
  
  
  