
    Z j                         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
9\ " S S\5      5       5       rS/rg)    )Literal)strict   )%consolidate_backbone_kwargs_to_config)PreTrainedConfig)auto_docstring   )
AutoConfigz%facebook/dinov3-vitl16-chmv2-dpt-head)
checkpointc                   &  ^  \ 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
'   Sr\\   S-  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\S   \S'   Sr\S   \S'   U 4S jrSrU =r$ )CHMv2Config   a%  
backbone_config (`Union[dict, "PreTrainedConfig"]`, *optional*):
    The configuration of the backbone model. Only DINOv3ViTConfig is currently supported.
patch_size (`int`, *optional*, defaults to 16):
    The patch size used by the backbone vision transformer.
reassemble_factors (`list[float]`, *optional*, defaults to `[4, 2, 1, 0.5]`):
    The up/downsampling factors of the reassemble layers.
post_process_channels (`list[int]`, *optional*, defaults to `[128, 256, 512, 1024]`):
    The output channel sizes of the reassemble stage for each backbone feature level.
fusion_hidden_size (`int`, *optional*, defaults to 256):
    The number of channels before fusion.
head_hidden_size (`int`, *optional*, defaults to 128):
    The number of channels in the hidden layer of the depth estimation head.
number_output_channels (`int`, *optional*, defaults to 256):
    Number of output channels for the CHMv2 head (number of depth bins).
readout_type (`str`, *optional*, defaults to `"project"`):
    Type of readout operation for the CLS token. One of `["ignore", "add", "project"]`.
min_depth (`float`, *optional*, defaults to 0.001):
    The minimum depth value for depth bin calculation.
max_depth (`float`, *optional*, defaults to 96.0):
    The maximum depth value for depth bin calculation.
bins_strategy (`str`, *optional*, defaults to `"chmv2_mixlog"`):
    The strategy for depth bins distribution. One of `["linear", "log", "chmv2_mixlog"]`.
norm_strategy (`str`, *optional*, defaults to `"chmv2_mixlog"`):
    The normalization strategy for depth prediction. One of `["linear", "softmax", "sigmoid", "chmv2_mixlog"]`.

```python
>>> from transformers import CHMv2Config, CHMv2ForDepthEstimation

>>> configuration = CHMv2Config()
>>> model = CHMv2ForDepthEstimation(configuration)
>>> configuration = model.config
```
chmv2backbone_configN   
patch_sizeg{Gz?initializer_rangereassemble_factorspost_process_channels   fusion_hidden_size   head_hidden_sizenumber_output_channelsprojectreadout_typegMbP?	min_depthg      X@	max_depthchmv2_mixlog)linearlogr   bins_strategy)r    softmaxsigmoidr   norm_strategyc                    > U R                   c	  / SQU l         U R                  c	  / SQU l        SSSSSSS	/ S
QS	S	SS	S.n[        SU R                  SUS.UD6u  U l        n[        TU ]  " S0 UD6  g )N)   r	      g      ?)r   r   i      i  r)   i   r      r'   T)         r*   gư>)
image_sizehidden_sizeintermediate_sizenum_attention_headsnum_hidden_layersnum_register_tokenskey_biasout_indicesreshape_hidden_statesapply_layernormlayer_norm_epsreturn_class_token
dinov3_vit)r   default_config_typedefault_config_kwargs )r   r   r   r   super__post_init__)selfkwargsr<   	__class__s      ~/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/chmv2/configuration_chmv2.pyr?   CHMv2Config.__post_init__V   s    ""*&4D#%%-)>D& !%#%!##$*%)#""&!
 (M (
 00 ,"7(
 	(
$f 	''    )r   r   r   ) __name__
__module____qualname____firstlineno____doc__
model_typer
   sub_configsr   dictr   __annotations__r   intr   floatr   listr   r   r   r   r   strr   r   r"   r   r%   r?   __static_attributes____classcell__)rB   s   @rC   r   r      s    !F J$j1K6:OT,,t3:J#u#37US[)D07.249t+2!!c"%C%!L#!IuIu>LM7:;LM[M7IJ[( (rE   r   N)typingr   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   autor
   r   __all__r=   rE   rC   <module>r\      sQ   *  . C 3 #  BCQ(" Q(  DQ(h /rE   