


import copy

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


A	:		Optional[int]    =       logging.get_logger(__name__)



class 							A   (	UpperCAmelCase__							):
					'''simple docstring'''






					A__      =			'''encoder-decoder'''
					A__      =			True

					def __init__(self   :						Union[str, Any]				, **_UpperCAmelCase   :						Optional[int]		)						->       Dict:




							"""simple docstring"""


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

							from ..auto.configuration_auto import AutoConfig

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

					@classmethod
					def   lowerCamelCase__					(cls   :						Union[str, Any]				, _UpperCAmelCase   :						PretrainedConfig				, _UpperCAmelCase   :						PretrainedConfig				, **_UpperCAmelCase   :						int		)						->       PretrainedConfig:




							"""simple docstring"""


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

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


					def   lowerCamelCase__					(self   :						int		)						->       Any:




							"""simple docstring"""


							lowercase__					      =		copy.deepcopy(self.__dict__		)
							lowercase__					      =		self.encoder.to_dict()
							lowercase__					      =		self.decoder.to_dict()
							lowercase__					      =		self.__class__.model_type
							return output





import warnings

from ...utils import logging
from .image_processing_clip import CLIPImageProcessor


A	:		List[Any]    =       logging.get_logger(__name__)



class 							A   (	UpperCAmelCase__							):
					'''simple docstring'''






					def __init__(self   :						List[Any]				, *_UpperCAmelCase   :						int				, **_UpperCAmelCase   :						List[str]		)						->       None:




							"""simple docstring"""


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

