



'''simple docstring'''





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


_lowerCAmelCase      						=	logging.get_logger(__name__)

_lowerCAmelCase      						=	{
    '''tiiuae/falcon-40b''': '''https://huggingface.co/tiiuae/falcon-40b/resolve/main/config.json''',
    '''tiiuae/falcon-7b''': '''https://huggingface.co/tiiuae/falcon-7b/resolve/main/config.json''',
}






class        lowerCAmelCase_(				SCREAMING_SNAKE_CASE_     ):
  '''simple docstring'''




  __lowercase							:      Optional[Any]				=      '''falcon'''
  __lowercase							:      Optional[int]				=      ['''past_key_values''']




  def __init__(    self  ,__UpperCAmelCase=6_5024  ,__UpperCAmelCase=4544  ,__UpperCAmelCase=32  ,__UpperCAmelCase=71  ,__UpperCAmelCase=1E-5  ,__UpperCAmelCase=0.0_2  ,__UpperCAmelCase=True  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=None  ,__UpperCAmelCase=False  ,__UpperCAmelCase=False  ,__UpperCAmelCase=True  ,__UpperCAmelCase=True  ,__UpperCAmelCase=False  ,__UpperCAmelCase=11  ,__UpperCAmelCase=11  ,**__UpperCAmelCase  ,)    ->		Union[str, Any]:
      lowerCAmelCase__ :  List[str]							      =					vocab_size
      # Backward compatibility with n_embed kwarg
      lowerCAmelCase__ :  List[str]							      =					kwargs.pop("""n_embed"""  ,__UpperCAmelCase      )
      lowerCAmelCase__ :  List[Any]							      =					hidden_size if n_embed is None else n_embed
      lowerCAmelCase__ :  List[Any]							      =					num_hidden_layers
      lowerCAmelCase__ :  Optional[Any]							      =					num_attention_heads
      lowerCAmelCase__ :  str							      =					layer_norm_epsilon
      lowerCAmelCase__ :  int							      =					initializer_range
      lowerCAmelCase__ :  str							      =					use_cache
      lowerCAmelCase__ :  str							      =					hidden_dropout
      lowerCAmelCase__ :  Tuple							      =					attention_dropout

      lowerCAmelCase__ :  Tuple							      =					bos_token_id
      lowerCAmelCase__ :  Union[str, Any]							      =					eos_token_id
      lowerCAmelCase__ :  Any							      =					num_attention_heads if num_kv_heads is None else num_kv_heads
      lowerCAmelCase__ :  int							      =					alibi
      lowerCAmelCase__ :  Any							      =					new_decoder_architecture
      lowerCAmelCase__ :  Optional[int]							      =					multi_query  # Ignored when new_decoder_architecture is True
      lowerCAmelCase__ :  Union[str, Any]							      =					parallel_attn
      lowerCAmelCase__ :  str							      =					bias

      super().__init__(bos_token_id=__UpperCAmelCase  ,eos_token_id=__UpperCAmelCase  ,**__UpperCAmelCase      )




  @property
  def 							UpperCAmelCase_	(    self      )    ->		str:
      return self.hidden_size // self.num_attention_heads






  @property
  def 							UpperCAmelCase_	(    self      )    ->		Tuple:
      return not self.alibi






'''simple docstring'''
from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
		if not (is_transformers_available() and is_torch_available()):
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
		from .multicontrolnet import MultiControlNetModel
		from .pipeline_controlnet import StableDiffusionControlNetPipeline
		from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
		from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
		from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline