






import copy

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


a_		:    Optional[Any]   							=     logging.get_logger(__name__)

class 		_snake_case	(	A__       ):
			_lowercase		:     int        =				'''encoder-decoder'''
			_lowercase		:     Dict        =				True






			def __init__(							self		,       **a)   ->							List[Any]:
						super().__init__(**a)
						assert (
						    "encoder" in kwargs and "decoder" in kwargs
						), "Config has to be initialized with encoder and decoder config"
						SCREAMING_SNAKE_CASE							=			kwargs.pop('encoder')
						SCREAMING_SNAKE_CASE							=			encoder_config.pop('model_type')
						SCREAMING_SNAKE_CASE							=			kwargs.pop('decoder')
						SCREAMING_SNAKE_CASE							=			decoder_config.pop('model_type')

						from ..auto.configuration_auto import AutoConfig

						SCREAMING_SNAKE_CASE							=			AutoConfig.for_model(a		,       **a)
						SCREAMING_SNAKE_CASE							=			AutoConfig.for_model(a		,       **a)
						SCREAMING_SNAKE_CASE							=			True






			@classmethod
			def  SCREAMING_SNAKE_CASE__     (							cls		,       a		,       a		,       **a)   ->							PretrainedConfig:
						logger.info('Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config')
						SCREAMING_SNAKE_CASE							=			True
						SCREAMING_SNAKE_CASE							=			True

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







			def  SCREAMING_SNAKE_CASE__     (							self)   ->							List[Any]:
						SCREAMING_SNAKE_CASE							=			copy.deepcopy(self.__dict__)
						SCREAMING_SNAKE_CASE							=			self.encoder.to_dict()
						SCREAMING_SNAKE_CASE							=			self.decoder.to_dict()
						SCREAMING_SNAKE_CASE							=			self.__class__.model_type
						return output







a_      =     frozenset(
    [
        'prompt',
        'height',
        'width',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
        'cross_attention_kwargs',
    ]
)

a_      =     frozenset(['prompt', 'negative_prompt'])

a_      =     frozenset([])

a_      =     frozenset(['image'])

a_      =     frozenset(
    [
        'image',
        'height',
        'width',
        'guidance_scale',
    ]
)

a_      =     frozenset(['image'])

a_      =     frozenset(
    [
        'prompt',
        'image',
        'height',
        'width',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
    ]
)

a_      =     frozenset(['prompt', 'image', 'negative_prompt'])

a_      =     frozenset(
    [
        # Text guided image variation with an image mask
        'prompt',
        'image',
        'mask_image',
        'height',
        'width',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
    ]
)

a_      =     frozenset(['prompt', 'image', 'mask_image', 'negative_prompt'])

a_      =     frozenset(
    [
        # image variation with an image mask
        'image',
        'mask_image',
        'height',
        'width',
        'guidance_scale',
    ]
)

a_      =     frozenset(['image', 'mask_image'])

a_      =     frozenset(
    [
        'example_image',
        'image',
        'mask_image',
        'height',
        'width',
        'guidance_scale',
    ]
)

a_      =     frozenset(['example_image', 'image', 'mask_image'])

a_      =     frozenset(['class_labels'])

a_      =     frozenset(['class_labels'])

a_      =     frozenset(['batch_size'])

a_      =     frozenset([])

a_      =     frozenset(['batch_size'])

a_      =     frozenset([])

a_      =     frozenset(
    [
        'prompt',
        'audio_length_in_s',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
        'cross_attention_kwargs',
    ]
)

a_      =     frozenset(['prompt', 'negative_prompt'])
a_      =     frozenset(['input_tokens'])

a_      =     frozenset(['input_tokens'])