


'''simple docstring'''




# 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,
)






'''simple docstring'''




import warnings
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


UpperCAmelCase_      :		int          =		logging.get_logger(__name__)

UpperCAmelCase_      :		Optional[Any]          =		{
    "nvidia/segformer-b0-finetuned-ade-512-512": (
        "https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512/resolve/main/config.json"
    ),
    # See all SegFormer models at https://huggingface.co/models?filter=segformer
}







class 					a			(				snake_case__  ):
 '''simple docstring'''




 __lowerCAmelCase						: List[Any]							  =		"""segformer"""




 def __init__(    self		,      lowerCamelCase_=3		,      lowerCamelCase_=4		,      lowerCamelCase_=[2, 2, 2, 2]		,      lowerCamelCase_=[8, 4, 2, 1]		,      lowerCamelCase_=[3_2, 6_4, 1_6_0, 2_5_6]		,      lowerCamelCase_=[7, 3, 3, 3]		,      lowerCamelCase_=[4, 2, 2, 2]		,      lowerCamelCase_=[1, 2, 5, 8]		,      lowerCamelCase_=[4, 4, 4, 4]		,      lowerCamelCase_="gelu"		,      lowerCamelCase_=0.0		,      lowerCamelCase_=0.0		,      lowerCamelCase_=0.1		,      lowerCamelCase_=0.02		,      lowerCamelCase_=0.1		,      lowerCamelCase_=1e-6		,      lowerCamelCase_=2_5_6		,      lowerCamelCase_=2_5_5		,      **lowerCamelCase_		,      )      ->    Union[str, Any]:
    super().__init__(**lowerCamelCase_      )

    if "reshape_last_stage" in kwargs and kwargs["reshape_last_stage"] is False:
       warnings.warn(
           'Reshape_last_stage is set to False in this config. This argument is deprecated and will soon be'
           ' removed, as the behaviour will default to that of reshape_last_stage = True.'		,      lowerCamelCase_		,      )

    _a					:  Union[str, Any]						=  num_channels
    _a					:  Any						=  num_encoder_blocks
    _a					:  Union[str, Any]						=  depths
    _a					:  int						=  sr_ratios
    _a					:  List[str]						=  hidden_sizes
    _a					:  Tuple						=  patch_sizes
    _a					:  Any						=  strides
    _a					:  List[Any]						=  mlp_ratios
    _a					:  str						=  num_attention_heads
    _a					:  str						=  hidden_act
    _a					:  List[Any]						=  hidden_dropout_prob
    _a					:  int						=  attention_probs_dropout_prob
    _a					:  Any						=  classifier_dropout_prob
    _a					:  Optional[Any]						=  initializer_range
    _a					:  int						=  drop_path_rate
    _a					:  int						=  layer_norm_eps
    _a					:  Optional[Any]						=  decoder_hidden_size
    _a					:  int						=  kwargs.get('reshape_last_stage'		,      lowerCamelCase_      )
    _a					:  str						=  semantic_loss_ignore_index







class 					a			(				snake_case__  ):
 '''simple docstring'''




 __lowerCAmelCase						: Any							  =		version.parse("""1.11"""  )




 @property
 def   __UpperCamelCase   (    self      )      ->    Mapping[str, Mapping[int, str]]:
    return OrderedDict(
        [
            ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
        ]      )




 @property
 def   __UpperCamelCase   (    self      )      ->    float:
    return 1e-4




 @property
 def   __UpperCamelCase   (    self      )      ->    int:
    return 1_2


