






import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging


__a:     Any   					=					logging.get_logger(__name__)
class 		SCREAMING_SNAKE_CASE__	(  UpperCAmelCase     ):

  '''simple docstring'''







  _lowerCamelCase    =  '''encoder-decoder'''
  _lowerCamelCase    =  True


  def __init__(      self		:			int       ,				**lowerCamelCase		:			Any							)						->	List[Any]:


         """simple docstring"""
         super().__init__(**lowerCamelCase							)
         assert (
             "encoder" in kwargs and "decoder" in kwargs
         ), "Config has to be initialized with encoder and decoder config"
         _UpperCAmelCase							=    kwargs.pop("""encoder"""							)
         _UpperCAmelCase							=    encoder_config.pop("""model_type"""							)
         _UpperCAmelCase							=    kwargs.pop("""decoder"""							)
         _UpperCAmelCase							=    decoder_config.pop("""model_type"""							)

         from ..auto.configuration_auto import AutoConfig

         _UpperCAmelCase							=    AutoConfig.for_model(lowerCamelCase       ,				**lowerCamelCase							)
         _UpperCAmelCase							=    AutoConfig.for_model(lowerCamelCase       ,				**lowerCamelCase							)
         _UpperCAmelCase							=    True


  @classmethod
  def  lowerCamelCase       (      cls		:			Optional[Any]       ,				lowerCamelCase		:			PretrainedConfig       ,				lowerCamelCase		:			PretrainedConfig       ,				**lowerCamelCase		:			int							)						->	PretrainedConfig:


         """simple docstring"""
         logger.info("""Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"""							)
         _UpperCAmelCase							=    True
         _UpperCAmelCase							=    True

         return cls(encoder=encoder_config.to_dict()       ,				decoder=decoder_config.to_dict()       ,				**lowerCamelCase							)





  def  lowerCamelCase       (      self		:			Tuple							)						->	Optional[int]:


         """simple docstring"""
         _UpperCAmelCase							=    copy.deepcopy(self.__dict__							)
         _UpperCAmelCase							=    self.encoder.to_dict()
         _UpperCAmelCase							=    self.decoder.to_dict()
         _UpperCAmelCase							=    self.__class__.model_type
         return output






'''simple docstring'''






import warnings

from ...utils import logging
from .image_processing_owlvit import OwlViTImageProcessor


__UpperCamelCase					    =	logging.get_logger(__name__)




class  _A (					__lowercase		):

		def __init__(   self					:   int  ,      *__magic_name__					:   Optional[Any]  ,      **__magic_name__					:   Any			)					->    None:


					"""simple docstring"""

					warnings.warn(
					    """The class OwlViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
					    """ use OwlViTImageProcessor instead."""  ,      __magic_name__  ,      )
					super().__init__(*__magic_name__  ,      **__magic_name__			)


