
    qi	                     x    d Z ddlmZ ddlmZ ddlmZ ddlmZ  ej                  e
      Z G d de      ZdgZy	)
zVitPose model configuration   )%consolidate_backbone_kwargs_to_config)PreTrainedConfig)logging   )
AutoConfigc            	       P     e Zd ZdZdZdeiZ	 	 	 	 d	dedz  dede	de
f fdZ xZS )
VitPoseConfiga)  
    This is the configuration class to store the configuration of a [`VitPoseForPoseEstimation`]. It is used to instantiate a
    VitPose 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 VitPose
    [usyd-community/vitpose-base-simple](https://huggingface.co/usyd-community/vitpose-base-simple) 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 `VitPoseBackboneConfig()`):
            The configuration of the backbone model. Currently, only `backbone_config` with `vitpose_backbone` as `model_type` is supported.
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        scale_factor (`int`, *optional*, defaults to 4):
            Factor to upscale the feature maps coming from the ViT backbone.
        use_simple_decoder (`bool`, *optional*, defaults to `True`):
            Whether to use a `VitPoseSimpleDecoder` to decode the feature maps from the backbone into heatmaps. Otherwise it uses `VitPoseClassicDecoder`.


    Example:

    ```python
    >>> from transformers import VitPoseConfig, VitPoseForPoseEstimation

    >>> # Initializing a VitPose configuration
    >>> configuration = VitPoseConfig()

    >>> # Initializing a model (with random weights) from the configuration
    >>> model = VitPoseForPoseEstimation(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```vitposebackbone_configNinitializer_rangescale_factoruse_simple_decoderc                     t        d|dddgid|\  }}|| _        || _        || _        || _        t        |   di | y )Nvitpose_backboneout_indices   )r   default_config_typedefault_config_kwargs )r   r   r   r   r   super__init__)selfr   r   r   r   kwargs	__class__s         c/opt/pipecat/venv/lib/python3.12/site-packages/transformers/models/vitpose/configuration_vitpose.pyr   zVitPoseConfig.__init__@   sf     #H #
+ 2#01#"6#
 	#
  /!2("4"6"    )Ng{Gz?r   T)__name__
__module____qualname____doc__
model_typer   sub_configsr   floatintboolr   __classcell__)r   s   @r   r	   r	      s]    !F J$j1K 48#'#'#)D0# !# 	#
 !# #r   r	   N)r    backbone_utilsr   configuration_utilsr   utilsr   auto.configuration_autor   
get_loggerr   loggerr	   __all__r   r   r   <module>r.      sB    " C 3  0 
		H	%;#$ ;#| 
r   