Ë
    T^(hf  ã                   ó`   — d 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 UnivNetModel model configurationé   )ÚPretrainedConfig)Úloggingc                   óZ   ‡ — e Zd ZdZdZdddg d¢g d¢g d¢g d¢g d¢gd	dd	d
ddfˆ fd„	Zˆ xZS )ÚUnivNetConfiga�  
    This is the configuration class to store the configuration of a [`UnivNetModel`]. It is used to instantiate a
    UnivNet vocoder 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 UnivNet
    [dg845/univnet-dev](https://huggingface.co/dg845/univnet-dev) architecture, which corresponds to the 'c32'
    architecture in [maum-ai/univnet](https://github.com/maum-ai/univnet/blob/master/config/default_c32.yaml).

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

    Args:
        model_in_channels (`int`, *optional*, defaults to 64):
            The number of input channels for the UnivNet residual network. This should correspond to
            `noise_sequence.shape[1]` and the value used in the [`UnivNetFeatureExtractor`] class.
        model_hidden_channels (`int`, *optional*, defaults to 32):
            The number of hidden channels of each residual block in the UnivNet residual network.
        num_mel_bins (`int`, *optional*, defaults to 100):
            The number of frequency bins in the conditioning log-mel spectrogram. This should correspond to the value
            used in the [`UnivNetFeatureExtractor`] class.
        resblock_kernel_sizes (`Tuple[int]` or `List[int]`, *optional*, defaults to `[3, 3, 3]`):
            A tuple of integers defining the kernel sizes of the 1D convolutional layers in the UnivNet residual
            network. The length of `resblock_kernel_sizes` defines the number of resnet blocks and should match that of
            `resblock_stride_sizes` and `resblock_dilation_sizes`.
        resblock_stride_sizes (`Tuple[int]` or `List[int]`, *optional*, defaults to `[8, 8, 4]`):
            A tuple of integers defining the stride sizes of the 1D convolutional layers in the UnivNet residual
            network. The length of `resblock_stride_sizes` should match that of `resblock_kernel_sizes` and
            `resblock_dilation_sizes`.
        resblock_dilation_sizes (`Tuple[Tuple[int]]` or `List[List[int]]`, *optional*, defaults to `[[1, 3, 9, 27], [1, 3, 9, 27], [1, 3, 9, 27]]`):
            A nested tuple of integers defining the dilation rates of the dilated 1D convolutional layers in the
            UnivNet residual network. The length of `resblock_dilation_sizes` should match that of
            `resblock_kernel_sizes` and `resblock_stride_sizes`. The length of each nested list in
            `resblock_dilation_sizes` defines the number of convolutional layers per resnet block.
        kernel_predictor_num_blocks (`int`, *optional*, defaults to 3):
            The number of residual blocks in the kernel predictor network, which calculates the kernel and bias for
            each location variable convolution layer in the UnivNet residual network.
        kernel_predictor_hidden_channels (`int`, *optional*, defaults to 64):
            The number of hidden channels for each residual block in the kernel predictor network.
        kernel_predictor_conv_size (`int`, *optional*, defaults to 3):
            The kernel size of each 1D convolutional layer in the kernel predictor network.
        kernel_predictor_dropout (`float`, *optional*, defaults to 0.0):
            The dropout probability for each residual block in the kernel predictor network.
        initializer_range (`float`, *optional*, defaults to 0.01):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        leaky_relu_slope (`float`, *optional*, defaults to 0.2):
            The angle of the negative slope used by the leaky ReLU activation.

    Example:

    ```python
    >>> from transformers import UnivNetModel, UnivNetConfig

    >>> # Initializing a Tortoise TTS style configuration
    >>> configuration = UnivNetConfig()

    >>> # Initializing a model (with random weights) from the Tortoise TTS style configuration
    >>> model = UnivNetModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
    Úunivneté@   é    éd   )r   r   r   )é   r   é   )é   r   é	   é   r   g        g{®Gáz„?gš™™™™™É?c                 óF  •— t        |«      t        |«      cxk(  rt        |«      k(  st        d«      ‚ t        d«      ‚|| _        || _        || _        || _        || _        || _        || _        || _	        |	| _
        |
| _        || _        || _        t        ‰| �<  di |¤Ž y )Nz§`resblock_kernel_sizes`, `resblock_stride_sizes`, and `resblock_dilation_sizes` must all have the same length (which will be the number of resnet blocks in the model).© )ÚlenÚ
ValueErrorÚmodel_in_channelsÚmodel_hidden_channelsÚnum_mel_binsÚresblock_kernel_sizesÚresblock_stride_sizesÚresblock_dilation_sizesÚkernel_predictor_num_blocksÚ kernel_predictor_hidden_channelsÚkernel_predictor_conv_sizeÚkernel_predictor_dropoutÚinitializer_rangeÚleaky_relu_slopeÚsuperÚ__init__)Úselfr   r   r   r   r   r   r   r   r   r   r   r   ÚkwargsÚ	__class__s                 €úo/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/univnet/configuration_univnet.pyr!   zUnivNetConfig.__init__X   sÂ   ø€ ô  Ð)Ó*¬cÐ2GÓ.HÔhÌCÐPgÓLhÒhÜðYóð ð iÜðYóð ð
 "3ˆÔØ%:ˆÔ"Ø(ˆÔØ%:ˆÔ"Ø%:ˆÔ"Ø'>ˆÔ$Ø+FˆÔ(Ø0PˆÔ-Ø*DˆÔ'Ø(@ˆÔ%Ø!2ˆÔØ 0ˆÔÜ‰ÑÑ"˜6Ó"ó    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer!   Ú__classcell__)r$   s   @r%   r   r      sG   ø„ ñ<ð| €Jð Ø ØÚ'Ú'Ú!.²º}Ð MØ$%Ø)+Ø#$Ø!$ØØ÷"#ñ "#r&   r   N)
r*   Úconfiguration_utilsr   Úutilsr   Ú
get_loggerr'   Úloggerr   Ú__all__r   r&   r%   ú<module>r2      s>   ðñ 'å 3Ý ð 
ˆ×	Ñ	˜HÓ	%€ôc#Ð$ô c#ðL Ð
�r&   