
    i#                        d Z ddlmZ ddlmZ ddlmZmZ  ej                  e	      Z
 ed      e G d d	e                    Z ed      e G d
 de                    Z ed      e G d de                    Zg dZy)zOWL-ViT model configuration    )strict   )PreTrainedConfig)auto_docstringloggingzgoogle/owlvit-base-patch16)
checkpointc                      e Zd ZU dZdZdZ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ed<   dZeed<   dZeez  ed<   dZeed<   dZeed<   dZedz  ed<   dZedz  ed<   dZeee   z  dz  ed <   y)!OwlViTTextConfiga  
    Example:

    ```python
    >>> from transformers import OwlViTTextConfig, OwlViTTextModel

    >>> # Initializing a OwlViTTextModel with google/owlvit-base-patch32 style configuration
    >>> configuration = OwlViTTextConfig()

    >>> # Initializing a OwlViTTextConfig from the google/owlvit-base-patch32 style configuration
    >>> model = OwlViTTextModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```owlvit_text_modeltext_configi   
vocab_size   hidden_sizei   intermediate_size   num_hidden_layers   num_attention_heads   max_position_embeddings
quick_gelu
hidden_acth㈵>layer_norm_eps        attention_dropout{Gz?initializer_range      ?initializer_factorr   Npad_token_idi  bos_token_idi  eos_token_id)__name__
__module____qualname____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   r   r   strr   floatr   r   r    r!   r"   r#   list     /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/owlvit/configuration_owlvit.pyr
   r
      s      %J#OJK!s!s  #%S%"J" NE %(us{(#u# ## L#* $L#*$+0L#S	/D(0r0   r
   c                       e Zd ZU dZdZdZ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e   z  eeef   z  ed<   dZeee   z  eeef   z  ed<   dZeed<   dZeed<   dZeez  ed<   dZeed<   dZeed<   y)OwlViTVisionConfiga  
    Example:

    ```python
    >>> from transformers import OwlViTVisionConfig, OwlViTVisionModel

    >>> # Initializing a OwlViTVisionModel with google/owlvit-base-patch32 style configuration
    >>> configuration = OwlViTVisionConfig()

    >>> # Initializing a OwlViTVisionModel model from the google/owlvit-base-patch32 style configuration
    >>> model = OwlViTVisionModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```owlvit_vision_modelvision_configi   r   i   r   r   r   r   r   num_channels
image_size    
patch_sizer   r   r   r   r   r   r   r   r   r    N)r$   r%   r&   r'   r(   r)   r   r*   r+   r   r   r   r6   r7   r.   tupler9   r   r,   r   r-   r   r   r    r/   r0   r1   r3   r3   ?   s      'J%OK!s!s!!L#47Jd3i%S/1746Jd3i%S/16"J" NE %(us{(#u# ##r0   r3   c                        e Zd ZU dZeedZdZee	z  dz  e
d<   dZee	z  dz  e
d<   dZee
d<   dZee
d	<   d
Zee
d<   dZee
d<    fdZ xZS )OwlViTConfigowlvit)r   r5   Nr   r5   r   projection_dimg/L
F@logit_scale_init_valueTreturn_dictr   r    c                    | j                   %t               | _         t        j                  d       n4t	        | j                   t
              rt        di | j                   | _         | j                  %t               | _        t        j                  d       n4t	        | j                  t
              rt        di | j                  | _        t        | $  di | y )NzQ`text_config` is `None`. initializing the `OwlViTTextConfig` with default values.zU`vision_config` is `None`. initializing the `OwlViTVisionConfig` with default values.r/   )
r   r
   loggerinfo
isinstancedictr5   r3   super__post_init__)selfkwargs	__class__s     r1   rG   zOwlViTConfig.__post_init__p   s    #/1DKKkl(($//C$2B2BCD%!3!5DKKop**D1!3!Id6H6H!ID''r0   )r$   r%   r&   r(   r
   r3   sub_configsr   rE   r   r+   r5   r>   r*   r?   r-   r@   boolr    rG   __classcell__)rJ   s   @r1   r<   r<   c   ss     J"2EWXK26K((4/648M4**T18NC$*E*K ##( (r0   r<   )r<   r
   r3   N)r'   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr$   rB   r
   r3   r<   __all__r/   r0   r1   <module>rS      s    " . 3 , 
		H	% 78!1' !1  9!1H 78$) $  9$D 78(# (  9(6 Er0   