Ë
    ÛÓ^jí
  ã                   óz   — d Z ddlZddl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Dac model configurationé    N)Ústricté   )ÚPreTrainedConfig)Úauto_docstringzdescript/dac_16khz)Ú
checkpointc                   óæ   ‡ — e Zd ZU dZdZdZe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d<   dZeez  ed<   dZeed<   dZeed<   dZeed<   ˆ fd„Zedefd„«       Zˆ xZS )Ú	DacConfigaÜ  
    downsampling_ratios (`list[int]`, *optional*, defaults to `[2, 4, 8, 8]`):
        Ratios for downsampling in the encoder. These are used in reverse order for upsampling in the decoder.
    quantizer_dropout (`bool`, *optional*, defaults to 0):
        Whether to apply dropout to the quantizer.
    commitment_loss_weight (float, *optional*, defaults to 0.25):
        Weight of the commitment loss term in the VQVAE loss function.
    codebook_loss_weight (float, *optional*, defaults to 1.0):
        Weight of the codebook loss term in the VQVAE loss function.

    Example:

    ```python
    >>> from transformers import DacModel, DacConfig

    >>> # Initializing a "descript/dac_16khz" style configuration
    >>> configuration = DacConfig()

    >>> # Initializing a model (with random weights) from the "descript/dac_16khz" style configuration
    >>> model = DacModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Údacé@   Úencoder_hidden_size)é   é   é   r   .Údownsampling_ratiosi   Údecoder_hidden_sizeé	   Ún_codebooksi   Úcodebook_sizer   Úcodebook_dimg        Úquantizer_dropoutg      Ð?Úcommitment_loss_weightg      ð?Úcodebook_loss_weighti€>  Úsampling_ratec                 ó   •— | j                   d d d…   | _        | j                  dt        | j                   «      z  z  | _        t        t        j                  | j                   «      «      | _        t        ‰| �(  di |¤Ž y )Néÿÿÿÿr   © )r   Úupsampling_ratiosr   ÚlenÚhidden_sizeÚintÚnpÚprodÚ
hop_lengthÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €út/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/dac/configuration_dac.pyr%   zDacConfig.__post_init__B   sh   ø€ Ø!%×!9Ñ!9¹$¸B¸$Ñ!?ˆÔØ×3Ñ3°q¼CÀ×@XÑ@XÓ<YÑ7YÑZˆÔÜœbŸg™g d×&>Ñ&>Ó?Ó@ˆŒÜ‰ÑÑ' Ó'ó    Úreturnc                 ó„   — t        j                  | j                  «      }t        j                  | j
                  |z  «      S )N)r!   r"   r   ÚmathÚceilr   )r&   r#   s     r)   Ú
frame_ratezDacConfig.frame_rateH   s0   € ä—W‘W˜T×3Ñ3Ó4ˆ
Ü�y‰y˜×+Ñ+¨jÑ8Ó9Ð9r*   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   r    Ú__annotations__r   ÚlistÚtupler   r   r   r   r   Úfloatr   r   r   r%   Úpropertyr/   Ú__classcell__)r(   s   @r)   r	   r	      s®   ø… ñð2 €Jà!Ð˜Ó!Ø7CÐ˜˜c™ U¨3°¨8¡_Ñ4ÓCØ#Ð˜Ó#Ø€K�ÓØ€M�3ÓØ€L�#ÓØ%(Ð�u˜s‘{Ó(Ø$(Ð˜EÓ(Ø"%Ð˜%Ó%Ø€M�3Óô(ð ð:˜Cò :ó ô:r*   r	   )r3   r-   Únumpyr!   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r   r*   r)   ú<module>r@      sM   ðñ ã ã Ý .å 3Ý #ñ Ð/Ô0Øô0:Ð ó 0:ó ó 1ð0:ðf ˆ-�r*   