

'''simple docstring'''

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


a        =						logging.get_logger(__name__)

a        =						{
    "naver-clova-ix/donut-base": "https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json",
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}







class __a (   _snake_case			):
   __UpperCamelCase   : Union[str, Any]	      =	'donut-swin'

   __UpperCamelCase   : Dict	      =	{
       'num_attention_heads': 'num_heads',
       'num_hidden_layers': 'num_layers',
   }





   def __init__(					self				:			List[str]				,lowerCamelCase				:			List[Any]=224				,lowerCamelCase				:			List[str]=4				,lowerCamelCase				:			str=3				,lowerCamelCase				:			Tuple=96				,lowerCamelCase				:			Dict=[2, 2, 6, 2]				,lowerCamelCase				:			str=[3, 6, 12, 24]				,lowerCamelCase				:			List[str]=7				,lowerCamelCase				:			Dict=4.0				,lowerCamelCase				:			str=True				,lowerCamelCase				:			Union[str, Any]=0.0				,lowerCamelCase				:			Union[str, Any]=0.0				,lowerCamelCase				:			str=0.1				,lowerCamelCase				:			Dict="gelu"				,lowerCamelCase				:			Union[str, Any]=False				,lowerCamelCase				:			Dict=0.02				,lowerCamelCase				:			List[Any]=1E-5				,**lowerCamelCase				:			Any				,):

      '''simple docstring'''

      super().__init__(**lowerCamelCase    )

      __SCREAMING_SNAKE_CASE      							=       image_size
      __SCREAMING_SNAKE_CASE      							=       patch_size
      __SCREAMING_SNAKE_CASE      							=       num_channels
      __SCREAMING_SNAKE_CASE      							=       embed_dim
      __SCREAMING_SNAKE_CASE      							=       depths
      __SCREAMING_SNAKE_CASE      							=       len(lowerCamelCase    )
      __SCREAMING_SNAKE_CASE      							=       num_heads
      __SCREAMING_SNAKE_CASE      							=       window_size
      __SCREAMING_SNAKE_CASE      							=       mlp_ratio
      __SCREAMING_SNAKE_CASE      							=       qkv_bias
      __SCREAMING_SNAKE_CASE      							=       hidden_dropout_prob
      __SCREAMING_SNAKE_CASE      							=       attention_probs_dropout_prob
      __SCREAMING_SNAKE_CASE      							=       drop_path_rate
      __SCREAMING_SNAKE_CASE      							=       hidden_act
      __SCREAMING_SNAKE_CASE      							=       use_absolute_embeddings
      __SCREAMING_SNAKE_CASE      							=       layer_norm_eps
      __SCREAMING_SNAKE_CASE      							=       initializer_range
      # we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
      # this indicates the channel dimension after the last stage of the model
      __SCREAMING_SNAKE_CASE      							=       int(embed_dim * 2 ** (len(lowerCamelCase    ) - 1)    )












'''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





