
'''simple docstring'''



from ..utils import deprecate
from .attention_processor import (  # noqa: F401
    Attention,
    AttentionProcessor,
    AttnAddedKVProcessor,
    AttnProcessor2_0,
    LoRAAttnProcessor,
    LoRALinearLayer,
    LoRAXFormersAttnProcessor,
    SlicedAttnAddedKVProcessor,
    SlicedAttnProcessor,
    XFormersAttnProcessor,
)
from .attention_processor import AttnProcessor as AttnProcessorRename  # noqa: F401


deprecate(
    "cross_attention",
    "0.20.0",
    "Importing from cross_attention is deprecated. Please import from diffusers.models.attention_processor instead.",
    standard_warn=False,
)


UpperCamelCase__ :						Tuple    							=					AttentionProcessor

class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Tuple:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Optional[Any]:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Optional[Any]:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Any:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Optional[int]:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Optional[int]:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     Dict:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )






class 				_a			(lowerCAmelCase__):






       def __init__(							self    ,							*A__    ,							**A__ )      ->     List[str]:
          _SCREAMING_SNAKE_CASE       	=			F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross' ) )} instead."
          deprecate("""cross_attention"""    ,							"""0.20.0"""    ,							UpperCamelCase__    ,							standard_warn=UpperCamelCase__ )
          super().__init__(*UpperCamelCase__    ,							**UpperCamelCase__ )








'''simple docstring'''



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


UpperCamelCase__ :						int    							=					logging.get_logger(__name__)

UpperCamelCase__ :						Any    							=					{
    "openbmb/cpm-ant-10b": "https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json"
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}

class 				_a			(_lowerCamelCase):





       """simple docstring"""




       SCREAMING_SNAKE_CASE =					'cpmant'






       def __init__(							self    ,							A__ = 3_07_20    ,							A__ = 40_96    ,							A__ = 32    ,							A__ = 1_28    ,							A__ = 1_02_40    ,							A__ = 48    ,							A__ = 0.0    ,							A__ = 5_12    ,							A__ = 20_48    ,							A__ = 1E-6    ,							A__ = 1.0    ,							A__ = 32    ,							A__ = 32    ,							A__ = 32    ,							A__ = True    ,							**A__    ,							)      ->     List[Any]:
          super().__init__(**A__ )
          _SCREAMING_SNAKE_CASE       	=			prompt_types
          _SCREAMING_SNAKE_CASE       	=			prompt_length
          _SCREAMING_SNAKE_CASE       	=			segment_types
          _SCREAMING_SNAKE_CASE       	=			hidden_size
          _SCREAMING_SNAKE_CASE       	=			num_attention_heads
          _SCREAMING_SNAKE_CASE       	=			dim_head
          _SCREAMING_SNAKE_CASE       	=			dim_ff
          _SCREAMING_SNAKE_CASE       	=			num_hidden_layers
          _SCREAMING_SNAKE_CASE       	=			position_bias_num_buckets
          _SCREAMING_SNAKE_CASE       	=			position_bias_max_distance
          _SCREAMING_SNAKE_CASE       	=			dropout_p
          _SCREAMING_SNAKE_CASE       	=			eps
          _SCREAMING_SNAKE_CASE       	=			use_cache
          _SCREAMING_SNAKE_CASE       	=			vocab_size
          _SCREAMING_SNAKE_CASE       	=			init_std






