Ë
    ÛÓ^j�  ã                   óŠ   — d dl mZ d dlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ  e	d	¬
«      e G d„ de«      «       «       ZdgZy)é    )ÚLiteral)Ústricté   )Ú%consolidate_backbone_kwargs_to_config)ÚPreTrainedConfig)Úauto_docstringé   )Ú
AutoConfigz%facebook/dinov3-vitl16-chmv2-dpt-head)Ú
checkpointc                   ó  ‡ — e Zd ZU dZdZdeiZdZee	z  dz  e
d<   dZee
d<   dZee
d<   dZeeez     dz  e
d	<   dZee   dz  e
d
<   dZee
d<   dZee
d<   dZee
d<   dZee
d<   dZee
d<   dZee
d<   dZed   e
d<   dZed   e
d<   ˆ fd„Zˆ xZS )ÚCHMv2Configa¡  
    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                 óÜ   •— | j                   €	g d¢| _         | j                  €	g d¢| _        ddddddd	g d
¢d	d	dd	dœ}t        d| j                  d|dœ|¤Ž\  | _        }t	        ‰| �  di |¤Ž y )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      €úx/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/chmv2/configuration_chmv2.pyr>   zCHMv2Config.__post_init__V   sž   ø€ Ø×"Ñ"Ð*Ú&4ˆDÔ#Ø×%Ñ%Ð-Ú)>ˆDÔ&ð ØØ!%Ø#%Ø!#Ø#$ØÚ*Ø%)Ø#Ø"Ø"&ñ!
Ðô (Mð (
Ø ×0Ñ0Ø ,Ø"7ñ(
ð ñ	(
Ñ$ˆÔ˜fô 	‰ÑÑ' Ó'ó    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer
   Úsub_configsr   Údictr   Ú__annotations__r   Úintr   Úfloatr   Úlistr   r   r   r   r   Ústrr   r   r!   r   r$   r>   Ú__classcell__)rA   s   @rB   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Ó[÷(ð (rC   r   N)Útypingr   Úhuggingface_hub.dataclassesr   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   Úautor
   r   Ú__all__r<   rC   rB   ú<module>rX      sQ   ðõ* å .å CÝ 3Ý #Ý ñ ÐBÔCØôQ(Ð"ó Q(ó ó DðQ(ðh ˆ/�rC   