code: from collections import OrderedDict
  from typing import Mapping
  
  from packaging import version
  
  from ...configuration_utils import PretrainedConfig
  from ...onnx import OnnxConfig
  from ...utils import logging
  
  
  lowercase__    :       Optional[int]						=			logging.get_logger(__name__)
  
  lowercase__    :       List[str]						=			{
      '''MBZUAI/swiftformer-xs''': '''https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json''',
  }
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      Tuple     =       """swiftformer"""
  
  
  	def __init__(							self	,    __SCREAMING_SNAKE_CASE=3	,    __SCREAMING_SNAKE_CASE=[3, 3, 6, 4]	,    __SCREAMING_SNAKE_CASE=[48, 56, 112, 220]	,    __SCREAMING_SNAKE_CASE=4	,    __SCREAMING_SNAKE_CASE=[True, True, True, True]	,    __SCREAMING_SNAKE_CASE="gelu"	,    __SCREAMING_SNAKE_CASE=3	,    __SCREAMING_SNAKE_CASE=2	,    __SCREAMING_SNAKE_CASE=1	,    __SCREAMING_SNAKE_CASE=0.0	,    __SCREAMING_SNAKE_CASE=True	,    __SCREAMING_SNAKE_CASE=1e-5	,    __SCREAMING_SNAKE_CASE=1e-5	,    **__SCREAMING_SNAKE_CASE	,    )		->Dict:
  								super().__init__(**__SCREAMING_SNAKE_CASE       )
  								lowerCAmelCase				=	num_channels
  								lowerCAmelCase				=	depths
  								lowerCAmelCase				=	embed_dims
  								lowerCAmelCase				=	mlp_ratio
  								lowerCAmelCase				=	downsamples
  								lowerCAmelCase				=	hidden_act
  								lowerCAmelCase				=	down_patch_size
  								lowerCAmelCase				=	down_stride
  								lowerCAmelCase				=	down_pad
  								lowerCAmelCase				=	drop_path_rate
  								lowerCAmelCase				=	use_layer_scale
  								lowerCAmelCase				=	layer_scale_init_value
  								lowerCAmelCase				=	batch_norm_eps
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      List[Any]     =       version.parse("""1.11"""		)
  
  
  	@property
  	def     SCREAMING_SNAKE_CASE_       (							self       )		->Mapping[str, Mapping[int, str]]:
  								return OrderedDict(
  								    [
  								        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
  								    ]       )
  
  
  
  
  	@property
  	def     SCREAMING_SNAKE_CASE_       (							self       )		->float:
  								return 1e-4
  
  
  
  
style_context: from dataclasses import dataclass
  from typing import List, Optional, Union
  
  import numpy as np
  import PIL
  
  from ...utils import BaseOutput, is_invisible_watermark_available, is_torch_available, is_transformers_available
  
  
  
  
  @dataclass
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      Union[List[PIL.Image.Image], np.ndarray]
  
  
  if is_transformers_available() and is_torch_available() and is_invisible_watermark_available():
  	from .pipeline_stable_diffusion_xl import StableDiffusionXLPipeline
  	from .pipeline_stable_diffusion_xl_imgaimg import StableDiffusionXLImgaImgPipeline
  
  
  
  