





'''simple docstring'''




import copy

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


__SCREAMING_SNAKE_CASE     :int       =				logging.get_logger(__name__)







class   A_	(  lowerCAmelCase_			):
 _lowerCamelCase  : Tuple           =							"""encoder-decoder"""
 _lowerCamelCase  : Dict           =							True




 def __init__(					self       :    List[Any]	,			**snake_case_       :    Dict    ):
      super().__init__(**snake_case_    )
      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(snake_case_	,			**snake_case_    )
      _UpperCAmelCase     							=   AutoConfig.for_model(snake_case_	,			**snake_case_    )
      _UpperCAmelCase     							=   True




 @classmethod
 def      lowercase	(					cls       :    Tuple	,			snake_case_       :    PretrainedConfig	,			snake_case_       :    PretrainedConfig	,			**snake_case_       :    Any    ):
      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()	,			**snake_case_    )




 def      lowercase	(					self       :    Optional[Any]    ):
      _UpperCAmelCase     							=   copy.deepcopy(self.__dict__    )
      _UpperCAmelCase     							=   self.encoder.to_dict()
      _UpperCAmelCase     							=   self.decoder.to_dict()
      _UpperCAmelCase     							=   self.__class__.model_type
      return output







from diffusers.utils.testing_utils import require_onnxruntime

@require_onnxruntime
class 				UpperCAmelCase_		:
							"""simple docstring"""







							pass



