
    Z j                          S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SS	KJr  S
S0r\
" S
S9\ " S S\5      5       5       rSS/rg)zZoeDepth model configuration    )Literal)strict   )%consolidate_backbone_kwargs_to_config)PreTrainedConfig)auto_docstring   )
AutoConfigzIntel/zoedepth-nyuzBhttps://huggingface.co/Intel/zoedepth-nyu/resolve/main/config.json)
checkpointc                   D  ^  \ rS rSr% SrSrS\0rSr\	\
-  S-  \S'   Sr\\S'   Sr\\S	'   S
r\\S'   Sr\S   \S'   Sr\\\-     \\\-  S4   -  \S'   Sr\\   \\S4   -  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\S-  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr \\   \\S4   -  \S '   S!r!\\S"'   S#r"\\S$'   S%r#\\S&'   S'r$\S(   \S)'   S*r%\\S+'   S,r&\\S-'   S.r'\\S/'   Sr(\\	   S-  \S0'   Sr)\S-  \S1'   Sr*\S-  \S2'   Sr+\S-  \S3'   Sr,\S-  \S4'   U 4S5 jr-S6r.U =r/$ )7ZoeDepthConfig   aD  
readout_type (`str`, *optional*, defaults to `"project"`):
    The readout type to use when processing the readout token (CLS token) of the intermediate hidden states of
    the ViT backbone. Can be one of [`"ignore"`, `"add"`, `"project"`].
    - "ignore" simply ignores the CLS token.
    - "add" passes the information from the CLS token to all other tokens by adding the representations.
    - "project" passes information to the other tokens by concatenating the readout to all other tokens before
      projecting the
    representation to the original feature dimension D using a linear layer followed by a GELU non-linearity.
reassemble_factors (`list[int]`, *optional*, defaults to `[4, 2, 1, 0.5]`):
    The up/downsampling factors of the reassemble layers.
neck_hidden_sizes (`list[str]`, *optional*, defaults to `[96, 192, 384, 768]`):
    The hidden sizes to project to for the feature maps of the backbone.
fusion_hidden_size (`int`, *optional*, defaults to 256):
    The number of channels before fusion.
head_in_index (`int`, *optional*, defaults to -1):
    The index of the features to use in the heads.
use_batch_norm_in_fusion_residual (`bool`, *optional*, defaults to `False`):
    Whether to use batch normalization in the pre-activate residual units of the fusion blocks.
use_bias_in_fusion_residual (`bool`, *optional*, defaults to `True`):
    Whether to use bias in the pre-activate residual units of the fusion blocks.
num_relative_features (`int`, *optional*, defaults to 32):
    The number of features to use in the relative depth estimation head.
add_projection (`bool`, *optional*, defaults to `False`):
    Whether to add a projection layer before the depth estimation head.
bottleneck_features (`int`, *optional*, defaults to 256):
    The number of features in the bottleneck layer.
num_attractors (`list[int], *optional*, defaults to `[16, 8, 4, 1]`):
    The number of attractors to use in each stage.
bin_embedding_dim (`int`, *optional*, defaults to 128):
    The dimension of the bin embeddings.
attractor_alpha (`int`, *optional*, defaults to 1000):
    The alpha value to use in the attractor.
attractor_gamma (`int`, *optional*, defaults to 2):
    The gamma value to use in the attractor.
attractor_kind (`str`, *optional*, defaults to `"mean"`):
    The kind of attractor to use. Can be one of [`"mean"`, `"sum"`].
min_temp (`float`, *optional*, defaults to 0.0212):
    The minimum temperature value to consider.
max_temp (`float`, *optional*, defaults to 50.0):
    The maximum temperature value to consider.
bin_centers_type (`str`, *optional*, defaults to `"softplus"`):
    Activation type used for bin centers. Can be "normed" or "softplus". For "normed" bin centers, linear normalization trick
    is applied. This results in bounded bin centers. For "softplus", softplus activation is used and thus are unbounded.
bin_configurations (`list[dict]`, *optional*, defaults to `[{'n_bins': 64, 'min_depth': 0.001, 'max_depth': 10.0}]`):
    Configuration for each of the bin heads.
    Each configuration should consist of the following keys:
    - name (`str`): The name of the bin head - only required in case of multiple bin configurations.
    - `n_bins` (`int`): The number of bins to use.
    - `min_depth` (`float`): The minimum depth value to consider.
    - `max_depth` (`float`): The maximum depth value to consider.
    In case only a single configuration is passed, the model will use a single head with the specified configuration.
    In case multiple configurations are passed, the model will use multiple heads with the specified configurations.
num_patch_transformer_layers (`int`, *optional*):
    The number of transformer layers to use in the patch transformer. Only used in case of multiple bin configurations.
patch_transformer_hidden_size (`int`, *optional*):
    The hidden size to use in the patch transformer. Only used in case of multiple bin configurations.
patch_transformer_intermediate_size (`int`, *optional*):
    The intermediate size to use in the patch transformer. Only used in case of multiple bin configurations.
patch_transformer_num_attention_heads (`int`, *optional*):
    The number of attention heads to use in the patch transformer. Only used in case of multiple bin configurations.

Example:

```python
>>> from transformers import ZoeDepthConfig, ZoeDepthForDepthEstimation

>>> # Initializing a ZoeDepth zoedepth-large style configuration
>>> configuration = ZoeDepthConfig()

>>> # Initializing a model from the zoedepth-large style configuration
>>> model = ZoeDepthForDepthEstimation(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```zoedepthbackbone_configNgelu
hidden_actg{Gz?initializer_rangegh㈵>batch_norm_epsproject)ignoreaddr   readout_type)   r	      g      ?.reassemble_factors)`        i   neck_hidden_sizes   fusion_hidden_sizehead_in_indexF!use_batch_norm_in_fusion_residualuse_bias_in_fusion_residual    num_relative_featuresadd_projectionbottleneck_features)      r   r   num_attractors   bin_embedding_dimi  attractor_alphar	   attractor_gammamean)r1   sumattractor_kindggs?min_tempg      I@max_tempsoftplusbin_centers_typebin_configurationsnum_patch_transformer_layerspatch_transformer_hidden_size#patch_transformer_intermediate_size%patch_transformer_num_attention_headsc                    > [        SU R                  SSSSSSSS/ S	QS
.S.UD6u  U l        nU R                  =(       d    SSSS./U l        [        TU ]  " S0 UD6  g )Nbeitr      i   i   r*   TF)stage6stage12stage18stage24)
image_sizenum_hidden_layershidden_sizeintermediate_sizenum_attention_headsuse_relative_position_biasreshape_hidden_statesout_features)r   default_config_typedefault_config_kwargs@   gMbP?g      $@)n_bins	min_depth	max_depth )r   r   r8   super__post_init__)selfkwargs	__class__s     ڄ/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/zoedepth/configuration_zoedepth.pyrT   ZoeDepthConfig.__post_init__   s~    'L (
 00 &!%'#%)').2). K	#(
 (
$f #'"9"9"tZ_nr>s=t''    )r   r8   )0__name__
__module____qualname____firstlineno____doc__
model_typer
   sub_configsr   dictr   __annotations__r   strr   floatr   r   r   r   listinttupler   r!   r#   r$   boolr%   r'   r(   r)   r,   r.   r/   r0   r3   r4   r5   r7   r8   r9   r:   r;   r<   rT   __static_attributes____classcell__)rW   s   @rX   r   r      s   KZ J$j1K6:OT,,t3:J#u#!NE!8AL'45AFTS5[)E#+s2B,CCT5HtCy5c?2H!!M3.3%t3/33!#3# ND ""2?NDIc3h/? s OSOS-3NGM*3HeHe&c&,0T
T)0/3 #*304!3:46:'t:8<)3:<( (rZ   r   &ZOEDEPTH_PRETRAINED_CONFIG_ARCHIVE_MAPN)r_   typingr   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   auto.configuration_autor
   rl   r   __all__rR   rZ   rX   <module>rt      sg    #  . C 3 # 0 ^* &
 /0(% (  1(D 45E
FrZ   