Ë
    ÜÓ^jx  ã                   ój   — 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y
)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y)Ú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t	        d«      ‚ t	        d«      ‚y)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    ú|/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/univnet/configuration_univnet.pyÚvalidate_architecturez#UnivNetConfig.validate_architectureZ   sf   € ô �×*Ñ*Ó+¬s°4×3MÑ3MÓ/NÔsÔRUÐVZ×VrÑVrÓRsÒsäðYóð ð täðYóð ð tó    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ðd €JàÐ�sÓØ!#Ð˜3Ó#Ø€L�#ÓØ9BÐ˜4 ™9 u¨S°#¨X¡Ñ6ÓBØ9BÐ˜4 ™9 u¨S°#¨X¡Ñ6ÓBØ,YÐ˜T E™\ÓYØ'(Ð Ó(Ø,.Ð$ cÓ.Ø&'Ð Ó'Ø,/Ð˜e c™kÓ/Ø#Ð�uÓ#Ø!Ð�eÓ!ór&   r	   N)	r*   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r1   r&   r$   ú<module>r6      sK   ðñ 'å .å 3Ý #ñ Ð.Ô/ØôJÐ$ó Jó ó 0ðJðZ Ð
�r&   