Ë
    ÜÓ^j§  ã                   ój   — d 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
)z'Swin2SR Transformer model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringz caidas/swin2sr-classicalsr-x2-64)Ú
checkpointc                   óÖ  ‡ — e Zd ZU dZdZddddœZ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dz  e
d<   dZee
d<   dZee   e	edf   z  e
d<   dZee   e	edf   z  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z  e
d<   dZee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e
d+<   d,Z!ee
d-<   ˆ fd.„Z"ˆ xZ#S )/ÚSwin2SRConfiga:  
    num_channels_out (`int`, *optional*, defaults to `num_channels`):
        The number of output channels. If not set, it will be set to `num_channels`.
    depths (`list(int)`, *optional*, defaults to `[6, 6, 6, 6, 6, 6]`):
        Depth of each layer in the Transformer encoder.
    num_heads (`list(int)`, *optional*, defaults to `[6, 6, 6, 6, 6, 6]`):
        Number of attention heads in each layer of the Transformer encoder.
    window_size (`int`, *optional*, defaults to 8):
        Size of windows.
    upscale (`int`, *optional*, defaults to 2):
        The upscale factor for the image. 2/3/4/8 for image super resolution, 1 for denoising and compress artifact
        reduction
    img_range (`float`, *optional*, defaults to 1.0):
        The range of the values of the input image.
    resi_connection (`str`, *optional*, defaults to `"1conv"`):
        The convolutional block to use before the residual connection in each stage.
    upsampler (`str`, *optional*, defaults to `"pixelshuffle"`):
        The reconstruction reconstruction module. Can be 'pixelshuffle'/'pixelshuffledirect'/'nearest+conv'/None.

    Example:

    ```python
    >>> from transformers import Swin2SRConfig, Swin2SRModel

    >>> # Initializing a Swin2SR caidas/swin2sr-classicalsr-x2-64 style configuration
    >>> configuration = Swin2SRConfig()

    >>> # Initializing a model (with random weights) from the caidas/swin2sr-classicalsr-x2-64 style configuration
    >>> model = Swin2SRModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úswin2srÚ	embed_dimÚ	num_headsÚ
num_layers)Úhidden_sizeÚnum_attention_headsÚnum_hidden_layersé@   Ú
image_sizeé   Ú
patch_sizer   Únum_channelsNÚnum_channels_outé´   )é   r   r   r   r   r   .Údepthsé   Úwindow_sizeg       @Ú	mlp_ratioTÚqkv_biasg        Úhidden_dropout_probÚattention_probs_dropout_probgš™™™™™¹?Údrop_path_rateÚgeluÚ
hidden_actFÚuse_absolute_embeddingsg{®Gáz”?Úinitializer_rangegñhãˆµøä>Úlayer_norm_epsé   Úupscaleg      ð?Ú	img_rangeÚ1convÚresi_connectionÚpixelshuffleÚ	upsamplerc                 óª   •— | j                   €| j                  n| j                   | _         t        | j                  «      | _        t        ‰| �  di |¤Ž y )N© )r   r   Úlenr   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €ú|/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/swin2sr/configuration_swin2sr.pyr1   zSwin2SRConfig.__post_init__Y   sE   ø€ Ø59×5JÑ5JÐ5R × 1Ò 1ÐX\×XmÑXmˆÔÜ˜dŸk™kÓ*ˆŒÜ‰ÑÑ' Ó'ó    )$Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚattribute_mapr   ÚintÚlistÚtupleÚ__annotations__r   r   r   r   r   r   r   r   Úfloatr   Úboolr   r   r    r"   Ústrr#   r$   r%   r'   r(   r*   r,   r1   Ú__classcell__)r4   s   @r5   r	   r	      sa  ø… ñ ðD €Jð #Ø*Ø)ñ€Mð 57€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó6Ø45€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó5Ø€L�#ÓØ#'Ð�c˜D‘jÓ'Ø€IˆsÓØ*<€FˆD�‰I˜˜c 3˜h™Ñ'Ó<Ø-?€Iˆt�C‰y˜5  c ™?Ñ*Ó?Ø€K�ÓØ€IˆuÓØ€HˆdÓØ'*Ð˜ ™Ó*Ø03Ð  %¨#¡+Ó3Ø"%€N�E˜C‘KÓ%Ø€J�ÓØ$)Ð˜TÓ)Ø#Ð�uÓ#Ø €N�EÓ Ø€GˆSÓØ€IˆuÓØ"€O�SÓ"Ø#€IˆsÓ#÷(ð (r6   r	   N)	r:   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r.   r6   r5   ú<module>rI      sK   ðñ .å .å 3Ý #ñ Ð=Ô>ØôD(Ð$ó D(ó ó ?ðD(ðN Ð
�r6   