



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





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


lowerCamelCase__			= logging.get_logger(__name__)

lowerCamelCase__			= {
    """alibaba-damo/mgp-str-base""": """https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json""",
}






class    SCREAMING_SNAKE_CASE			(							lowerCamelCase__					):
							__lowerCamelCase	:	Dict    ='mgp-str'





							def __init__(   self		:		Optional[Any]      ,				__lowercase		:		Dict=[32, 128]      ,				__lowercase		:		Tuple=4      ,				__lowercase		:		Optional[Any]=3      ,				__lowercase		:		str=27      ,				__lowercase		:		Any=38      ,				__lowercase		:		str=50257      ,				__lowercase		:		List[str]=30522      ,				__lowercase		:		Tuple=768      ,				__lowercase		:		str=12      ,				__lowercase		:		Optional[Any]=12      ,				__lowercase		:		str=4.0      ,				__lowercase		:		Union[str, Any]=True      ,				__lowercase		:		List[Any]=False      ,				__lowercase		:		Union[str, Any]=1E-5      ,				__lowercase		:		Optional[int]=0.0      ,				__lowercase		:		Dict=0.0      ,				__lowercase		:		Union[str, Any]=0.0      ,				__lowercase		:		List[str]=False      ,				__lowercase		:		List[Any]=0.02      ,				**__lowercase		:		List[Any]      ,				):

											'''simple docstring'''
											super().__init__(**__lowercase	)

											__a       =		image_size
											__a       =		patch_size
											__a       =		num_channels
											__a       =		max_token_length
											__a       =		num_character_labels
											__a       =		num_bpe_labels
											__a       =		num_wordpiece_labels
											__a       =		hidden_size
											__a       =		num_hidden_layers
											__a       =		num_attention_heads
											__a       =		mlp_ratio
											__a       =		distilled
											__a       =		layer_norm_eps
											__a       =		drop_rate
											__a       =		qkv_bias
											__a       =		attn_drop_rate
											__a       =		drop_path_rate
											__a       =		output_aa_attentions
											__a       =		initializer_range
