o
    ¾e¦iŒ  ã                   @   sX   d Z ddlmZ ddlmZ ddlmZ ddlmZ e 	e
¡ZG dd„ deƒZdgZd	S )
zVitMatte model configurationé   )Ú%consolidate_backbone_kwargs_to_config)ÚPreTrainedConfig)Úloggingé   )Ú
AutoConfigc                       sh   e Zd ZdZdZdeiZddddg d¢g d	¢fdedB d
ede	de	de
e de
e f‡ fdd„Z‡  ZS )ÚVitMatteConfigaÇ  
    This is the configuration class to store the configuration of [`VitMatteForImageMatting`]. It is used to
    instantiate a ViTMatte model according to the specified arguments, defining the model architecture. Instantiating a
    configuration with the defaults will yield a similar configuration to that of the ViTMatte
    [hustvl/vitmatte-small-composition-1k](https://huggingface.co/hustvl/vitmatte-small-composition-1k) architecture.

    Configuration objects inherit from [`PreTrainedConfig`] and can be used to control the model outputs. Read the
    documentation from [`PreTrainedConfig`] for more information.

    Args:
        backbone_config (`Union[dict, "PreTrainedConfig"]`, *optional*, defaults to `VitDetConfig()`):
            The configuration of the backbone model.
        hidden_size (`int`, *optional*, defaults to 384):
            The number of input channels of the decoder.
        batch_norm_eps (`float`, *optional*, defaults to 1e-05):
            The epsilon used by the batch norm layers.
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        convstream_hidden_sizes (`list[int]`, *optional*, defaults to `[48, 96, 192]`):
            The output channels of the ConvStream module.
        fusion_hidden_sizes (`list[int]`, *optional*, defaults to `[256, 128, 64, 32]`):
            The output channels of the Fusion blocks.

    Example:

    ```python
    >>> from transformers import VitMatteConfig, VitMatteForImageMatting

    >>> # Initializing a ViTMatte hustvl/vitmatte-small-composition-1k style configuration
    >>> configuration = VitMatteConfig()

    >>> # Initializing a model (with random weights) from the hustvl/vitmatte-small-composition-1k style configuration
    >>> model = VitMatteForImageMatting(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚvitmatteÚbackbone_configNi€  gñhãˆµøä>g{®Gáz”?)é0   é`   éÀ   )é   é€   é@   é    Úhidden_sizeÚbatch_norm_epsÚinitializer_rangeÚconvstream_hidden_sizesÚfusion_hidden_sizesc                    sZ   t d|dddgidœ|¤Ž\}}|| _|| _|| _|| _|| _|| _tƒ jdi |¤Ž d S )NÚvitdetÚout_featuresÚstage4)r	   Údefault_config_typeÚdefault_config_kwargs© )	r   r	   r   r   r   r   r   ÚsuperÚ__init__)Úselfr	   r   r   r   r   r   Úkwargs©Ú	__class__r   úq/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/transformers/models/vitmatte/configuration_vitmatte.pyr   C   s   
ý
üzVitMatteConfig.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   Úsub_configsr   ÚintÚfloatÚlistr   Ú__classcell__r   r   r    r"   r      s.    &ùþýüûúùr   N)r&   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   Úauto.configuration_autor   Ú
get_loggerr#   Úloggerr   Ú__all__r   r   r   r"   Ú<module>   s   

E