"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


_A   					=    logging.get_logger(__name__)

_A   					=    {
    'facebook/convnextv2-tiny-1k-224': 'https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json',
}

class lowerCamelCase		(_SCREAMING_SNAKE_CASE    ,    _SCREAMING_SNAKE_CASE      ):






					'''simple docstring'''


					a   	=		"convnextv2"



					def __init__(						self			:				List[Any]   , _snake_case			:				Tuple=3   , _snake_case			:				Tuple=4   , _snake_case			:				Union[str, Any]=4   , _snake_case			:				List[Any]=None   , _snake_case			:				Union[str, Any]=None   , _snake_case			:				List[Any]="gelu"   , _snake_case			:				Union[str, Any]=0.02   , _snake_case			:				Optional[int]=1e-12   , _snake_case			:				List[Any]=0.0   , _snake_case			:				Union[str, Any]=224   , _snake_case			:				Dict=None   , _snake_case			:				str=None   , **_snake_case			:				List[Any]   , )							->       Tuple:
									super().__init__(**_snake_case		)

									SCREAMING_SNAKE_CASE__		  =				num_channels
									SCREAMING_SNAKE_CASE__		  =				patch_size
									SCREAMING_SNAKE_CASE__		  =				num_stages
									SCREAMING_SNAKE_CASE__		  =				[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
									SCREAMING_SNAKE_CASE__		  =				[3, 3, 9, 3] if depths is None else depths
									SCREAMING_SNAKE_CASE__		  =				hidden_act
									SCREAMING_SNAKE_CASE__		  =				initializer_range
									SCREAMING_SNAKE_CASE__		  =				layer_norm_eps
									SCREAMING_SNAKE_CASE__		  =				drop_path_rate
									SCREAMING_SNAKE_CASE__		  =				image_size
									SCREAMING_SNAKE_CASE__		  =				["stem"] + [F"""stage{idx}""" for idx in range(1   , len(self.depths		) + 1		)]
									SCREAMING_SNAKE_CASE__  ,       SCREAMING_SNAKE_CASE__		  =				get_aligned_output_features_output_indices(
									    out_features=_snake_case   , out_indices=_snake_case   , stage_names=self.stage_names		)





"""simple docstring"""






import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


_A   					=    HUGGINGFACE_HUB_CACHE


_A   					=    'config.json'
_A   					=    'diffusion_pytorch_model.bin'
_A   					=    'diffusion_flax_model.msgpack'
_A   					=    'model.onnx'
_A   					=    'diffusion_pytorch_model.safetensors'
_A   					=    'weights.pb'
_A   					=    'https://huggingface.co'
_A   					=    default_cache_path
_A   					=    'diffusers_modules'
_A   					=    os.getenv('HF_MODULES_CACHE', os.path.join(hf_cache_home, 'modules'))
_A   					=    ['fp16', 'non-ema']
_A   					=    '.self_attn'




