code: 
  
  
  
  
  """simple docstring"""
  
  
  
  
  import copy
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  __A :		Optional[Any]      							=    logging.get_logger(__name__)
  
  __A :		str      							=    {}
  class 							lowerCamelCase		( _UpperCAmelCase				):
     lowercase       :  Any      =				'fsmt_decoder'
  
  
  
  
  
  
  
     def __init__(							self    ,      SCREAMING_SNAKE_CASE_=0    ,      SCREAMING_SNAKE_CASE_=0 ):
         super().__init__()
         UpperCamelCase				:   List[str]          =							vocab_size
         UpperCamelCase				:   Dict          =							bos_token_id
  
  
  class 							lowerCamelCase		( _UpperCAmelCase				):
     lowercase       :  str      =				'fsmt'
     lowercase       :  Dict      =				{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}
  
  
  
  
  
  
  
     def __init__(							self    ,      SCREAMING_SNAKE_CASE_=["en", "de"]    ,      SCREAMING_SNAKE_CASE_=4_2024    ,      SCREAMING_SNAKE_CASE_=4_2024    ,      SCREAMING_SNAKE_CASE_="relu"    ,      SCREAMING_SNAKE_CASE_=1024    ,      SCREAMING_SNAKE_CASE_=200    ,      SCREAMING_SNAKE_CASE_=1024    ,      SCREAMING_SNAKE_CASE_=4096    ,      SCREAMING_SNAKE_CASE_=12    ,      SCREAMING_SNAKE_CASE_=16    ,      SCREAMING_SNAKE_CASE_=0.0    ,      SCREAMING_SNAKE_CASE_=4096    ,      SCREAMING_SNAKE_CASE_=12    ,      SCREAMING_SNAKE_CASE_=16    ,      SCREAMING_SNAKE_CASE_=0.0    ,      SCREAMING_SNAKE_CASE_=0.0    ,      SCREAMING_SNAKE_CASE_=0.1    ,      SCREAMING_SNAKE_CASE_=0.0    ,      SCREAMING_SNAKE_CASE_=0.02    ,      SCREAMING_SNAKE_CASE_=2    ,      SCREAMING_SNAKE_CASE_=True    ,      SCREAMING_SNAKE_CASE_=True    ,      SCREAMING_SNAKE_CASE_=False    ,      SCREAMING_SNAKE_CASE_=5    ,      SCREAMING_SNAKE_CASE_=1.0    ,      SCREAMING_SNAKE_CASE_=False    ,      SCREAMING_SNAKE_CASE_=True    ,      SCREAMING_SNAKE_CASE_=1    ,      SCREAMING_SNAKE_CASE_=0    ,      SCREAMING_SNAKE_CASE_=2    ,      SCREAMING_SNAKE_CASE_=2    ,      **SCREAMING_SNAKE_CASE_    ,      ):
         UpperCamelCase				:   str          =							langs
         UpperCamelCase				:   Tuple          =							src_vocab_size
         UpperCamelCase				:   List[Any]          =							tgt_vocab_size
         UpperCamelCase				:   Optional[int]          =							d_model  # encoder_embed_dim and decoder_embed_dim
  
         UpperCamelCase				:   Union[str, Any]          =							encoder_ffn_dim
         UpperCamelCase				:   Union[str, Any]          =							encoder_layers
         UpperCamelCase				:   List[Any]          =							encoder_attention_heads
         UpperCamelCase				:   str          =							encoder_layerdrop
         UpperCamelCase				:   Optional[Any]          =							decoder_layerdrop
         UpperCamelCase				:   int          =							decoder_ffn_dim
         UpperCamelCase				:   int          =							decoder_layers
         UpperCamelCase				:   Tuple          =							decoder_attention_heads
         UpperCamelCase				:   int          =							max_position_embeddings
         UpperCamelCase				:   Dict          =							init_std  # Normal(0, this parameter)
         UpperCamelCase				:   Union[str, Any]          =							activation_function
  
         UpperCamelCase				:   Dict          =							DecoderConfig(vocab_size=SCREAMING_SNAKE_CASE_    ,      bos_token_id=SCREAMING_SNAKE_CASE_ )
         if "decoder" in common_kwargs:
             del common_kwargs["decoder"]
  
         UpperCamelCase				:   str          =							scale_embedding  # scale factor will be sqrt(d_model) if True
  
         # 3 Types of Dropout
         UpperCamelCase				:   int          =							attention_dropout
         UpperCamelCase				:   Union[str, Any]          =							activation_dropout
         UpperCamelCase				:   Tuple          =							dropout
  
         UpperCamelCase				:   Dict          =							use_cache
         super().__init__(
             pad_token_id=SCREAMING_SNAKE_CASE_    ,      bos_token_id=SCREAMING_SNAKE_CASE_    ,      eos_token_id=SCREAMING_SNAKE_CASE_    ,      decoder_start_token_id=SCREAMING_SNAKE_CASE_    ,      is_encoder_decoder=SCREAMING_SNAKE_CASE_    ,      tie_word_embeddings=SCREAMING_SNAKE_CASE_    ,      forced_eos_token_id=SCREAMING_SNAKE_CASE_    ,      max_length=SCREAMING_SNAKE_CASE_    ,      num_beams=SCREAMING_SNAKE_CASE_    ,      length_penalty=SCREAMING_SNAKE_CASE_    ,      early_stopping=SCREAMING_SNAKE_CASE_    ,      **SCREAMING_SNAKE_CASE_    ,      )
  
  
  
  
  
  
  
     def       a_							(							self ):
         UpperCamelCase				:   str          =							copy.deepcopy(self.__dict__ )
         UpperCamelCase				:   Tuple          =							self.decoder.to_dict()
         UpperCamelCase				:   Tuple          =							self.__class__.model_type
         return output
  
  
  
  
  
style_context: 
  
  
  
  
  """simple docstring"""
  
  
  
  
  from ...utils import is_transformers_available
  from .pipeline_latent_diffusion_superresolution import LDMSuperResolutionPipeline
  
  
  if is_transformers_available():
    from .pipeline_latent_diffusion import LDMBertModel, LDMTextToImagePipeline
  
  
  
  
  