+
    œ°³j  ã                   ó  € R t ^ RIHt ^RIHt ^RIHt ]! RR7      ] ! R R]4      4       4       t]! RR7      ] ! R R	]4      4       4       t]! RR7      ] ! R
 R]4      4       4       t	]! RR7      ] ! R R]4      4       4       t
. ROtR# )zSAM model configuration)Ústrict)ÚPreTrainedConfig)Úauto_docstringzfacebook/sam-vit-huge)Ú
checkpointc                   ób   a a€ ] tR t^t oRtRtRtRt^t^t	^t
RtRtV 3R ltV3R ltR	tVtV ;t# )
ÚSamPromptEncoderConfigzä
mask_input_channels (`int`, *optional*, defaults to 16):
    The number of channels to be fed to the `MaskDecoder` module.
num_point_embeddings (`int`, *optional*, defaults to 4):
    The number of point embeddings to be used.
Úprompt_encoder_configé   é   Úgeluç�íµ ÷Æ°>c                ól   <€ V P                   V P                  ,          V n        \        SV `  ! R/ VB  R # ©N© )Ú
image_sizeÚ
patch_sizeÚimage_embedding_sizeÚsuperÚ__post_init__©ÚselfÚkwargsÚ	__class__s   &,€Új/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/sam/configuration_sam.pyr   Ú$SamPromptEncoderConfig.__post_init__*   s(   ø€ Ø$(§O¡O°t·±Õ$FˆÔ!Ü‰ÒÑ' Ô'ó    c                óú   <€ V ^8„  d   Qh/ S[ ;R&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   # )é   Úhidden_sizer   r   Úmask_input_channelsÚnum_point_embeddingsÚ
hidden_actÚlayer_norm_eps)ÚintÚlistÚtupleÚstrÚfloat)ÚformatÚ__classdict__s   "€r   Ú__annotate__Ú#SamPromptEncoderConfig.__annotate__   sŠ   ø‡ ‚ ñ Ññ ñ ‘d™3•i•¡%©©S¨¥/Õ1Ñ8ñ ñ ‘d™3•i•¡%©©S¨¥/Õ1Ñ6ñ ñ Ñ!ñ ñ  Ñ!ñ! ñ" Ññ# ñ$ Ñ ò% r   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úbase_config_keyr   r   r   r   r    r!   r"   r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r   r)   s   @@r   r   r      sB   ù‡ € ñð .€Oà€KØ48€JØ46€JØ!ÐØ !ÐØ€JØ €Nõ(÷) … r   r   c                   ó\   a € ] tR t^/t o RtRtRtRtRt^t	^t
^t^t^tRtRtV 3R ltRtV tR	# )
ÚSamMaskDecoderConfiga‰  
mlp_dim (`int`, *optional*, defaults to 2048):
    Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
attention_downsample_rate (`int`, *optional*, defaults to 2):
    The downsampling rate of the attention layer.
num_multimask_outputs (`int`, *optional*, defaults to 3):
    The number of outputs from the `SamMaskDecoder` module. In the Segment Anything paper, this is set to 3.
iou_head_depth (`int`, *optional*, defaults to 3):
    The number of layers in the IoU head module.
iou_head_hidden_dim (`int`, *optional*, defaults to 256):
    The dimensionality of the hidden states in the IoU head module.
Úmask_decoder_configr	   Úrelui   r   c                ó’   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R	&   S[;R
&   # )r   r   r!   Úmlp_dimÚnum_hidden_layersÚnum_attention_headsÚattention_downsample_rateÚnum_multimask_outputsÚiou_head_depthÚiou_head_hidden_dimr"   )r#   r&   r'   )r(   r)   s   "€r   r*   Ú!SamMaskDecoderConfig.__annotate__/   s‡   ø‡ ‚ ñ$ Ññ% ñ& Ññ' ñ( Ññ) ñ* Ññ+ ñ, Ñ ñ- ñ.  #Ñ&ñ/ ñ0 Ñ"ñ1 ñ2 Ññ3 ñ4 Ñ"ñ5 ñ6 Ñ ò7 r   r   N)r,   r-   r.   r/   r0   r1   r   r!   r<   r=   r>   r?   r@   rA   rB   r"   r2   r3   r4   )r)   s   @r   r8   r8   /   sO   ø‡ € ñð ,€Oà€KØ€JØ€GØÐØ ÐØ%&ÐØ!"ÐØ€NØ"ÐØ €N÷7 ƒ r   r8   c                   ó–   a a€ ] tR t^Mt oRtRtRtRtRt^t	^t
^tRt^tRtRtR	tR
tRtRtRtRt^tRt^€tRtV 3R ltV3R ltRtVtV ;t# )ÚSamVisionConfiga�  
output_channels (`int`, *optional*, defaults to 256):
    Dimensionality of the output channels in the Patch Encoder.
use_rel_pos (`bool`, *optional*, defaults to `True`):
    Whether to use relative position embedding.
window_size (`int`, *optional*, defaults to 14):
    Window size for relative position.
global_attn_indexes (`list[int]`, *optional*, defaults to `[2, 5, 8, 11]`):
    The indexes of the global attention layers.
num_pos_feats (`int`, *optional*, defaults to 128):
    The dimensionality of the position embedding.
mlp_dim (`int`, *optional*):
    The dimensionality of the MLP layer in the Transformer encoder. If `None`, defaults to `mlp_ratio *
    hidden_size`.

Example:

```python
>>> from transformers import (
...     SamVisionConfig,
...     SamVisionModel,
... )

>>> # Initializing a SamVisionConfig with `"facebook/sam-vit-huge"` style configuration
>>> configuration = SamVisionConfig()

>>> # Initializing a SamVisionModel (with random weights) from the `"facebook/sam-vit-huge"` style configuration
>>> model = SamVisionModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úvision_configÚsam_vision_modeli   r	   r
   r   r   g        g»½×Ùß|Û=Tg      @Nc                óâ   <€ V P                   f'   \        V P                  V P                  ,          4      MV P                   V n         V P                  ^,          V n        \
        SV `  ! R/ VB  R # r   )r<   r#   r   Ú	mlp_ratioÚscaler   r   r   s   &,€r   r   ÚSamVisionConfig.__post_init__ˆ   sR   ø€ ØAEÇÁÒAU”s˜4×+Ñ+¨d¯n©nÕ<Ô=Ð[_×[gÑ[gˆŒØ×%Ñ%¨Õ*ˆŒ
Ü‰ÒÑ' Ô'r   c                óÜ  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[;R&   S[;R	&   S[S[ ,          ;R
&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[ ;R&   S[S[ ,          S[S[ R3,          ,          ;R&   S[ ;R&   S[ R,          ;R&   # )r   r   Úoutput_channelsr=   r>   Únum_channelsr   r   r!   r"   Úattention_dropoutÚinitializer_rangeÚqkv_biasrI   Úuse_abs_posÚuse_rel_posÚwindow_size.Úglobal_attn_indexesÚnum_pos_featsNr<   )r#   r$   r%   r&   r'   Úbool)r(   r)   s   "€r   r*   ÚSamVisionConfig.__annotate__M   se  ø‡ ‚ ñN ÑñO ñP ÑñQ ñR ÑñS ñT Ñ!ñU ñV ÑñW ñX ‘d™3•i•¡%©©S¨¥/Õ1Ñ8ñY ñZ ‘d™3•i•¡%©©S¨¥/Õ1Ñ6ñ[ ñ\ Ññ] ñ^ Ñ!ñ_ ñ` ™s•{Ñ(ña ñb Ñ$ñc ñd Ññe ñf Ññg ñh Ññi ñj Ññk ñl Ññm ñn ™c�¡U©3°¨8¥_Õ4ÑDño ñp Ññq ñr �4�ZÑòs r   )r<   rJ   )r   é   é   é   )r,   r-   r.   r/   r0   r1   Ú
model_typer   rM   r=   r>   rN   r   r   r!   r"   rO   rP   rQ   rI   rR   rS   rT   rU   rV   r<   r   r2   r3   r4   r5   r6   s   @@r   rE   rE   M   sˆ   ù‡ € ñðB &€OØ#€Jà€KØ€OØÐØ!ÐØ€LØ48€JØ46€JØ€JØ!€NØ%(ÐØ$ÐØ€HØ€IØ€KØ€KØ€KØ7DÐØ€MØ€Gõ(÷w … r   rE   c                   ój   a a€ ] tR t^Žt oRtRtR]R]R]/t	Rt
RtRtRtRtV 3R	 ltV3R
 ltRtVtV ;t# )Ú	SamConfiga×  
prompt_encoder_config (Union[`dict`, `SamPromptEncoderConfig`], *optional*):
    Dictionary of configuration options used to initialize [`SamPromptEncoderConfig`].
mask_decoder_config (Union[`dict`, `SamMaskDecoderConfig`], *optional*):
    Dictionary of configuration options used to initialize [`SamMaskDecoderConfig`].

Example:

```python
>>> from transformers import (
...     SamVisionConfig,
...     SamPromptEncoderConfig,
...     SamMaskDecoderConfig,
...     SamModel,
... )

>>> # Initializing a SamConfig with `"facebook/sam-vit-huge"` style configuration
>>> configuration = SamConfig()

>>> # Initializing a SamModel (with random weights) from the `"facebook/sam-vit-huge"` style configuration
>>> model = SamModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config

>>> # We can also initialize a SamConfig from a SamVisionConfig, SamPromptEncoderConfig, and SamMaskDecoderConfig

>>> # Initializing SAM vision, SAM Q-Former and language model configurations
>>> vision_config = SamVisionConfig()
>>> prompt_encoder_config = SamPromptEncoderConfig()
>>> mask_decoder_config = SamMaskDecoderConfig()

>>> config = SamConfig(vision_config, prompt_encoder_config, mask_decoder_config)
```Úsamr   r9   rF   Ng{®Gáz”?Tc                ó8  <€ \        V P                  \        4      '       d   \        R/ V P                  B V n        MV P                  f   \        4       V n        \        V P                  \        4      '       d   \        R/ V P                  B V n        MV P                  f   \        4       V n        \        V P                  \        4      '       d   \        R/ V P                  B V n        MV P                  f   \        4       V n        \        SV `$  ! R/ VB  R # r   )
Ú
isinstancerF   ÚdictrE   r   r   r9   r8   r   r   r   s   &,€r   r   ÚSamConfig.__post_init__Á   sÓ   ø€ Ü�d×(Ñ(¬$×/Ò/Ü!0Ñ!F°4×3EÑ3EÑ!FˆDÕØ×ÑÒ'Ü!0Ó!2ˆDÔä�d×0Ñ0´$×7Ò7Ü)?Ñ)]À$×B\ÑB\Ñ)]ˆDÕ&Ø×'Ñ'Ò/Ü)?Ó)AˆDÔ&ä�d×.Ñ.´×5Ò5Ü';Ñ'W¸d×>VÑ>VÑ'WˆDÕ$Ø×%Ñ%Ò-Ü';Ó'=ˆDÔ$ä‰ÒÑ' Ô'r   c                ó°   <€ V ^8„  d   Qh/ S[ S[,          R,          ;R&   S[ S[,          R,          ;R&   S[ S[,          R,          ;R&   S[;R&   S[;R&   # )r   NrF   r   r9   rP   Útie_word_embeddings)rb   r   r'   rW   )r(   r)   s   "€r   r*   ÚSamConfig.__annotate__Ž   sq   ø‡ ‚ ñZ Ñ*Õ*¨TÕ1Ñ8ñ[ ñ\  Ñ"2Õ2°TÕ9Ñ@ñ] ñ^ Ñ 0Õ0°4Õ7Ñ>ñ_ ñ` Ñ#ña ñb Ñ$òc r   )r9   r   rF   )r,   r-   r.   r/   r0   r\   r   r8   rE   Úsub_configsrF   r   r9   rP   re   r   r2   r3   r4   r5   r6   s   @@r   r^   r^   Ž   sV   ù‡ € ñ!ðF €JàÐ!7ØÐ3Ø˜ð€Kð 59€MØ<@ÐØ:>ÐØ#ÐØ $Ðõ(÷g … r   r^   N)r^   r8   r   rE   )r0   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   r8   rE   r^   Ú__all__r   r   r   Ú<module>rl      sÈ   ðñ å .å 3Ý #ñ Ð2Ô3Øô(Ð-ó (ó ó 4ð(ñ. Ð2Ô3Øô!Ð+ó !ó ó 4ð!ñ8 Ð2Ô3Øô<(Ð&ó <(ó ó 4ð<(ñ~ Ð2Ô3ØôA(Ð ó A(ó ó 4ðA(òH ]‚r   