ó
    qyüi�  ã                   ó„   • 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{®Gáz”?Úinitializer_rangeÚreassemble_factorsÚpost_process_channelsé   Úfusion_hidden_sizeé€   Úhead_hidden_sizeÚnumber_output_channelsÚprojectÚreadout_typegü©ñÒMbP?Ú	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      €Új/home/mande/repo/quber/.venv/lib/python3.13/site-packages/transformers/models/chmv2/configuration_chmv2.pyr?   ÚCHMv2Config.__post_init__V   sž   ø€ Ø×"Ñ"Ñ*Ú&4ˆDÔ#Ø×%Ñ%Ñ-Ú)>ˆ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Ð1€Kà6:€O�TÐ,Ñ,¨tÑ3Ó:Ø€J�ÓØ#Ð�uÓ#Ø37Ð˜˜U S™[Ñ)¨DÑ0Ó7Ø.2Ð˜4 ™9 tÑ+Ó2Ø!Ð˜Ó!ØÐ�cÓØ"%Ð˜CÓ%Ø!€L�#Ó!Ø€IˆuÓØ€IˆuÓØ>L€M�7Ð:Ñ;ÓLØM[€M�7Ð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   