
    fThf                     `    S r SSKJr  SSKJr  \R
                  " \5      r " S S\5      rS/r	g)z UnivNetModel model configuration   )PretrainedConfig)loggingc                   f   ^  \ rS rSrSrSrSSS/ SQ/ SQ/ S	Q/ S	Q/ S	Q/S
SS
SSS4U 4S jjrSrU =r$ )UnivNetConfig   a  
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{Gz?g?c                    > [        U5      [        U5      s=:X  a  [        U5      :X  d  O  [        S5      eXl        X l        X0l        X@l        XPl        X`l        Xpl        Xl	        Xl
        Xl        Xl        Xl        [        TU ]<  " S0 UD6  g )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                 i/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/univnet/configuration_univnet.pyr"   UnivNetConfig.__init__X   s      )*c2G.HhCPgLhhY 
 "3%:"(%:"%:"'>$+F(0P-*D'(@%!2 0"6"    )r   r   r   r   r   r    r   r   r   r   r   r   )	__name__
__module____qualname____firstlineno____doc__
model_typer"   __static_attributes____classcell__)r%   s   @r&   r   r      sG    <| J  ''!.} M$%)+#$!$"# "#r(   r   N)
r-   configuration_utilsr   utilsr   
get_loggerr)   loggerr   __all__r   r(   r&   <module>r6      s<    ' 3  
		H	%c#$ c#L 
r(   