code: 
  
  
  
  
  """simple docstring"""
  
  
  
  import copy
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  SCREAMING_SNAKE_CASE       = logging.get_logger(__name__)
  
  SCREAMING_SNAKE_CASE       = {
      "facebook/sam-vit-huge": "https://huggingface.co/facebook/sam-vit-huge/resolve/main/config.json",
      "facebook/sam-vit-large": "https://huggingface.co/facebook/sam-vit-large/resolve/main/config.json",
      "facebook/sam-vit-base": "https://huggingface.co/facebook/sam-vit-base/resolve/main/config.json",
  }
  
  
  
  
  class 			UpperCAmelCase_						(		A_							):
  
  
  
  
      def __init__(					self		: Dict			,				snake_case_		: List[str]=256			,				snake_case_		: str=1_024			,				snake_case_		: str=16			,				snake_case_		: Union[str, Any]=16			,				snake_case_		: List[str]=4			,				snake_case_		: str="gelu"			,				snake_case_		: Optional[int]=1e-6			,				**snake_case_		: Optional[Any]			,				)   ->							Optional[Any]:
  
  
  
  
       '''simple docstring'''
  
       super().__init__(**snake_case_   )
       A__ =       hidden_size
       A__ =       image_size
       A__ =       patch_size
       A__ =       image_size // patch_size
       A__ =       mask_input_channels
       A__ =       num_point_embeddings
       A__ =       hidden_act
       A__ =       layer_norm_eps
  
  
  
  
  
  
  class 			UpperCAmelCase_						(		A_							):
  
  
  
  
      def __init__(					self		: Dict			,				snake_case_		: Optional[Any]=256			,				snake_case_		: Tuple="relu"			,				snake_case_		: Union[str, Any]=2_048			,				snake_case_		: Union[str, Any]=2			,				snake_case_		: str=8			,				snake_case_		: Tuple=2			,				snake_case_		: Tuple=3			,				snake_case_		: List[str]=3			,				snake_case_		: List[str]=256			,				snake_case_		: int=1e-6			,				**snake_case_		: Any			,				)   ->							List[str]:
  
  
  
  
       '''simple docstring'''
  
       super().__init__(**snake_case_   )
       A__ =       hidden_size
       A__ =       hidden_act
       A__ =       mlp_dim
       A__ =       num_hidden_layers
       A__ =       num_attention_heads
       A__ =       attention_downsample_rate
       A__ =       num_multimask_outputs
       A__ =       iou_head_depth
       A__ =       iou_head_hidden_dim
       A__ =       layer_norm_eps
  
  
  
  
  
  
  class 			UpperCAmelCase_						(		A_							):
  
  
  
  
      def __init__(					self		: int			,				snake_case_		: List[str]=768			,				snake_case_		: List[Any]=256			,				snake_case_		: Tuple=12			,				snake_case_		: Tuple=12			,				snake_case_		: int=3			,				snake_case_		: Any=1_024			,				snake_case_		: Any=16			,				snake_case_		: Dict="gelu"			,				snake_case_		: Any=1e-06			,				snake_case_		: Tuple=0.0			,				snake_case_		: Optional[int]=1e-10			,				snake_case_		: Tuple=True			,				snake_case_		: str=4.0			,				snake_case_		: Union[str, Any]=True			,				snake_case_		: int=True			,				snake_case_		: Optional[int]=14			,				snake_case_		: Any=[2, 5, 8, 11]			,				snake_case_		: Union[str, Any]=128			,				snake_case_		: Dict=None			,				**snake_case_		: Any			,				)   ->							List[Any]:
  
  
  
  
       '''simple docstring'''
  
       super().__init__(**snake_case_   )
  
       A__ =       hidden_size
       A__ =       output_channels
       A__ =       num_hidden_layers
       A__ =       num_attention_heads
       A__ =       num_channels
       A__ =       image_size
       A__ =       patch_size
       A__ =       hidden_act
       A__ =       layer_norm_eps
       A__ =       attention_dropout
       A__ =       initializer_range
       A__ =       qkv_bias
       A__ =       mlp_ratio
       A__ =       use_abs_pos
       A__ =       use_rel_pos
       A__ =       window_size
       A__ =       global_attn_indexes
       A__ =       num_pos_feats
       A__ =       int(hidden_size * mlp_ratio   ) if mlp_dim is None else mlp_dim
  
  
  
  
  
  
  class 			UpperCAmelCase_						(		A_							):
      lowercase__		      =   '''sam'''
      lowercase__		      =   True
  
  
  
  
      def __init__(					self		: Tuple			,				snake_case_		: Optional[Any]=None			,				snake_case_		: Tuple=None			,				snake_case_		: str=None			,				snake_case_		: Any=0.02			,				**snake_case_		: str			,				)   ->							int:
  
  
  
  
       '''simple docstring'''
  
       super().__init__(**snake_case_   )
       A__ =       vision_config if vision_config is not None else {}
       A__ =       prompt_encoder_config if prompt_encoder_config is not None else {}
       A__ =       mask_decoder_config if mask_decoder_config is not None else {}
  
       if isinstance(snake_case_			,				snake_case_   ):
        A__ =       vision_config.to_dict()
       if isinstance(snake_case_			,				snake_case_   ):
        A__ =       prompt_encoder_config.to_dict()
       if isinstance(snake_case_			,				snake_case_   ):
        A__ =       mask_decoder_config.to_dict()
  
       A__ =       SamVisionConfig(**snake_case_   )
       A__ =       SamPromptEncoderConfig(**snake_case_   )
       A__ =       SamMaskDecoderConfig(**snake_case_   )
       A__ =       initializer_range
  
  
  
  
      def 							__magic_name__							(					self		: Optional[Any]   )   ->							Union[str, Any]:
  
  
  
  
       '''simple docstring'''
  
       A__ =       copy.deepcopy(self.__dict__   )
       A__ =       self.vision_config.to_dict()
       A__ =       self.prompt_encoder_config.to_dict()
       A__ =       self.mask_decoder_config.to_dict()
       A__ =       self.__class__.model_type
       return output
  
  
  
  
  
  
style_context: 
  
  
  
  
  """simple docstring"""
  
  
  
  def 						_SCREAMING_SNAKE_CASE     (							lowercase_		)		->	str:
   return " ".join(sorted(set(sentence.split()		)		)		)
  
  
  if __name__ == "__main__":
        import doctest
  
        doctest.testmod()
  
  
  
  
  
  