§
    ‚Štjx  ã                   ó„   — 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d
S )z UnivNetModel model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringzdg845/univnet-dev)Ú
checkpointc                   ó  — e Zd ZU dZdZdZeed<   dZe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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d<   dZeed<   d„ ZdS )ÚUnivNetConfiga  
    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.
    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é@   Úmodel_in_channelsé    Úmodel_hidden_channelséd   Únum_mel_bins)r   r   r   .Úresblock_kernel_sizes)é   r   é   Úresblock_stride_sizes)©é   r   é	   é   r   r   Úresblock_dilation_sizesr   Úkernel_predictor_num_blocksÚ kernel_predictor_hidden_channelsÚkernel_predictor_conv_sizeg        Úkernel_predictor_dropoutg{®Gáz„?Úinitializer_rangegš™™™™™É?Úleaky_relu_slopec                 ó®   — t          | j        ¦  «        t          | j        ¦  «        cxk    rt          | j        ¦  «        k    sn t	          d¦  «        ‚dS )zOPart of `@strict`-powered validation. Validates the architecture of the config.z§`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).N)Úlenr   r   r   Ú
ValueError)Úselfs    úo/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/univnet/configuration_univnet.pyÚvalidate_architecturez#UnivNetConfig.validate_architectureZ   sg   € õ �Ô*Ñ+Ô+­s°4Ô3MÑ/NÔ/NÐsÐsÒsÐsÕRUÐVZÔVrÑRsÔRsÒsÐsÐsÐsåðYñô ð ð tÐsó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   ÚintÚ__annotations__r   r   r   ÚlistÚtupler   r   r   r   r   r   Úfloatr   r   r%   © r&   r$   r	   r	      s,  € € € € € € ð0ð 0ðd €JàÐ�sÐÐÑØ!#Ð˜3Ð#Ð#Ñ#Ø€L�#ÐÐÑØ9BÐ˜4 œ9 u¨S°#¨X¤Ñ6ÐBÐBÑBØ9BÐ˜4 œ9 u¨S°#¨X¤Ñ6ÐBÐBÑBØ,YÐ˜T E™\ÐYÐYÑYØ'(Ð Ð(Ð(Ñ(Ø,.Ð$ cÐ.Ð.Ñ.Ø&'Ð Ð'Ð'Ñ'Ø,/Ð˜e c™kÐ/Ð/Ñ/Ø#Ð�uÐ#Ð#Ñ#Ø!Ð�eÐ!Ð!Ñ!ðð ð ð ð r&   r	   N)	r*   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r1   r&   r$   ú<module>r6      sª   ðð 'Ð &à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #ð €Ð.Ð/Ñ/Ô/ØðJð Jð Jð Jð JÐ$ñ Jô Jñ „ñ 0Ô/ðJðZ Ð
€€€r&   