






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


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

__UpperCamelCase   :   Tuple      =    {
    """google/pegasus-large""": """https://huggingface.co/google/pegasus-large/resolve/main/config.json""",
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}


class 							__UpperCamelCase     (  _lowerCAmelCase ):
	__snake_case						:Tuple =							'pegasus'
	__snake_case						:Optional[int] =							['past_key_values']
	__snake_case						:Tuple =							{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}







	def __init__(	self   :				Tuple							,					_lowerCAmelCase   :				str=5_0265							,					_lowerCAmelCase   :				Union[str, Any]=1024							,					_lowerCAmelCase   :				List[Any]=12							,					_lowerCAmelCase   :				Union[str, Any]=4096							,					_lowerCAmelCase   :				int=16							,					_lowerCAmelCase   :				Dict=12							,					_lowerCAmelCase   :				Optional[int]=4096							,					_lowerCAmelCase   :				List[Any]=16							,					_lowerCAmelCase   :				Optional[int]=0.0							,					_lowerCAmelCase   :				Any=0.0							,					_lowerCAmelCase   :				int=True							,					_lowerCAmelCase   :				Union[str, Any]=True							,					_lowerCAmelCase   :				Any="gelu"							,					_lowerCAmelCase   :				int=1024							,					_lowerCAmelCase   :				Tuple=0.1							,					_lowerCAmelCase   :				int=0.0							,					_lowerCAmelCase   :				Optional[int]=0.0							,					_lowerCAmelCase   :				List[str]=0.02							,					_lowerCAmelCase   :				Any=0							,					_lowerCAmelCase   :				int=False							,					_lowerCAmelCase   :				Optional[int]=0							,					_lowerCAmelCase   :				Union[str, Any]=1							,					_lowerCAmelCase   :				Optional[Any]=1							,					**_lowerCAmelCase   :				Optional[Any]							,					)		->			int:
		"""simple docstring"""







		__lowercase   							=	vocab_size
		__lowercase   							=	max_position_embeddings
		__lowercase   							=	d_model
		__lowercase   							=	encoder_ffn_dim
		__lowercase   							=	encoder_layers
		__lowercase   							=	encoder_attention_heads
		__lowercase   							=	decoder_ffn_dim
		__lowercase   							=	decoder_layers
		__lowercase   							=	decoder_attention_heads
		__lowercase   							=	dropout
		__lowercase   							=	attention_dropout
		__lowercase   							=	activation_dropout
		__lowercase   							=	activation_function
		__lowercase   							=	init_std
		__lowercase   							=	encoder_layerdrop
		__lowercase   							=	decoder_layerdrop
		__lowercase   							=	use_cache
		__lowercase   							=	encoder_layers
		__lowercase   							=	scale_embedding  # scale factor will be sqrt(d_model) if True
		super().__init__(
		    pad_token_id=_lowerCAmelCase							,					eos_token_id=_lowerCAmelCase							,					is_encoder_decoder=_lowerCAmelCase							,					decoder_start_token_id=_lowerCAmelCase							,					forced_eos_token_id=_lowerCAmelCase							,					**_lowerCAmelCase							,					)







	@property
	def 			_a (	self   :				Tuple      )		->			int:
		"""simple docstring"""







		return self.encoder_attention_heads







	@property
	def 			_a (	self   :				str      )		->			int:
		"""simple docstring"""







		return self.d_model





from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
						if not (is_transformers_available() and is_torch_available()):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
						from .pipeline_kandinsky import KandinskyPipeline
						from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
						from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
						from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
						from .text_encoder import MultilingualCLIP


