

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


_UpperCAmelCase	:     Optional[Any]		       = logging.get_logger(__name__)

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







class 				lowercase       ( lowercase_			,						lowercase_    ):
				__SCREAMING_SNAKE_CASE      :				str     =    '''convnextv2'''




				def __init__(      self   ,     snake_case=3   ,     snake_case=4   ,     snake_case=4   ,     snake_case=None   ,     snake_case=None   ,     snake_case="gelu"   ,     snake_case=0.02   ,     snake_case=1e-1_2   ,     snake_case=0.0   ,     snake_case=224   ,     snake_case=None   ,     snake_case=None   ,     **snake_case   ,     ):
											super().__init__(**snake_case )

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







# NOTE: This file is deprecated and will be removed in a future version.
# It only exists so that temporarely `from diffusers.pipelines import DiffusionPipeline` works
from ...utils import deprecate
from ..controlnet.multicontrolnet import MultiControlNetModel  # noqa: F401
from ..controlnet.pipeline_controlnet import StableDiffusionControlNetPipeline  # noqa: F401


deprecate(
    """stable diffusion controlnet""",
    """0.22.0""",
    """Importing `StableDiffusionControlNetPipeline` or `MultiControlNetModel` from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet is deprecated. Please import `from diffusers import StableDiffusionControlNetPipeline` instead.""",
    standard_warn=False,
    stacklevel=3,
)




