§
    9²¸jJ  ã                   óâ   — d dl mZ ddlmZ ddlmZ ddlmZmZ  ed¬¦  «        e G d	„ d
e¦  «        ¦   «         ¦   «         Z	 ed¬¦  «        e G d„ de¦  «        ¦   «         ¦   «         Z
dd
gZdS )é    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringé   )ÚCONFIG_MAPPINGÚ
AutoConfigzvibevoice/VibeVoice-1.5B-hf)Ú
checkpointc                   ó’   — e Zd ZU dZdZe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d<   dZeed<   dZeed<   dZeed<   dS )ÚVibeVoiceDiffusionHeadConfiga½  
    latent_size (`int`, *optional*, defaults to 64):
        Dimensionality of the acoustic latents the head denoises.
    frequency_embedding_size (`int`, *optional*, defaults to 256):
        The size of the sinusoidal frequency embedding for timestep encoding in the diffusion head.
    diffusion_max_period (`int`, *optional*, defaults to 10000):
        The maximum period for the sinusoidal frequency embedding in the diffusion head.
    i   Úhidden_sizeé@   Úlatent_sizeé   Únum_hidden_layersi   Úintermediate_sizegñhãˆµøä>Úrms_norm_epsÚsiluÚ
hidden_acté   Úfrequency_embedding_sizei'  Údiffusion_max_periodFÚmlp_biasN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚintÚ__annotations__r   r   r   r   Úfloatr   Ústrr   r   r   Úbool© ó    ú…/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/transformers/models/vibevoice/configuration_vibevoice.pyr   r      s²   € € € € € € ðð ð €K�ÐÐÑØ€K�ÐÐÑØÐ�sÐÐÑØ!Ð�sÐ!Ð!Ñ!Ø€L�%ÐÐÑØ€J�ÐÐÑØ$'Ð˜cÐ'Ð'Ñ'Ø %Ð˜#Ð%Ð%Ñ%Ø€HˆdÐÐÑÐÐr$   r   c                   óø   ‡ — e Zd ZU dZdZeeeedœZdZe	e
z  dz  ed<   dZe	e
z  dz  ed<   dZe	e
z  dz  ed<   dZe	e
z  d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d<   dZeed<   ˆ fd„Zd„ Zˆ xZS )ÚVibeVoiceConfigaû  
    semantic_model_config (`Union[AutoConfig, dict]`, *optional*):
        The config object or dictionary of the semantic tokenizer encoder. This tokenizer extracts semantic features from audio.
    diffusion_head_config (`Union[VibeVoiceDiffusionHeadConfig, dict]`, *optional*):
        The config object or dictionary of the diffusion head used to synthesize acoustic latents.
    audio_bos_token_id (`int`, *optional*, defaults to 151652):
        The token ID indicating the start of audio tokens.
    audio_eos_token_id (`int`, *optional*, defaults to 151653):
        The token ID indicating the end of audio tokens.
    diffusion_loss_weight (`float`, *optional*, defaults to 0.5):
        The weight of the diffusion loss in the overall loss computation. The cross entropy loss for the language
        modeling head is weighted by `(1 - diffusion_loss_weight)`.

    ```python
    >>> from transformers import VibeVoiceForConditionalGeneration, VibeVoiceConfig

    >>> # Initializing a VibeVoice configuration
    >>> configuration = VibeVoiceConfig()

    >>> # Initializing a 1.5B model with random weights
    >>> model = VibeVoiceForConditionalGeneration(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Ú	vibevoice)Úaudio_configÚsemantic_model_configÚtext_configÚdiffusion_head_configNr)   r*   r+   r,   i[P Úpad_token_idÚeos_token_ididP Úaudio_bos_token_idieP Úaudio_eos_token_idifP Úaudio_token_idg      à?Údiffusion_loss_weightc                 óx  •— t          | j        t          ¦  «        rK| j                             dd¦  «        | j        d<   t	          | j        d                  d
i | j        ¤Ž| _        n | j        €t	          d         ¦   «         | _        t          | j        t          ¦  «        rK| j                             dd¦  «        | j        d<   t	          | j        d                  d
i | j        ¤Ž| _        n"| j        €t	          d         d¬¦  «        | _        t          | j        t          ¦  «        rK| j                             dd¦  «        | j        d<   t	          | j        d                  d
i | j        ¤Ž| _        n | j        €t	          d         ¦   «         | _        t          | j        t          ¦  «        rt          d
i | j        ¤Ž| _        n1| j        €*t          | j        j	        | j        j	        ¬¦  «        | _        | j        j
        | _
        t          | j        dd	¦  «        | _         t          ¦   «         j        d
i |¤Ž d S )NÚ
model_typeÚvibevoice_acoustic_tokenizerÚ$vibevoice_acoustic_tokenizer_encoderé€   )r   Úqwen2)r   r   Útie_word_embeddingsFr#   )Ú
isinstancer)   ÚdictÚgetr   r*   r+   r,   r   r   Ú
vocab_sizeÚgetattrr9   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €r%   r@   zVibeVoiceConfig.__post_init__]   s@  ø€ Ý�dÔ'­Ñ.Ô.ð 	QØ.2Ô.?×.CÒ.CÀLÐRpÑ.qÔ.qˆDÔ˜lÑ+Ý .¨tÔ/@ÀÔ/NÔ OÐ dÐ dÐRVÔRcÐ dÐ dˆDÔÐØÔÐ&Ý .Ð/MÔ NÑ PÔ PˆDÔå�dÔ0µ$Ñ7Ô7ð 	qØ7;Ô7Q×7UÒ7UØÐDñ8ô 8ˆDÔ& |Ñ4õ *8¸Ô8RÐS_Ô8`Ô)að *ð *ØÔ,ð*ð *ˆDÔ&Ð&ð Ô'Ð/Ý)7Ð8^Ô)_ÐloÐ)pÑ)pÔ)pˆDÔ&å�dÔ&­Ñ-Ô-ð 	9Ø-1Ô-=×-AÒ-AÀ,ÐPWÑ-XÔ-XˆDÔ˜\Ñ*Ý-¨dÔ.>¸|Ô.LÔMÐaÐaÐPTÔP`ÐaÐaˆDÔÐØÔÐ%Ý-¨gÔ6Ñ8Ô8ˆDÔå�dÔ0µ$Ñ7Ô7ð 	Ý)EÐ)cÐ)cÈÔHbÐ)cÐ)cˆDÔ&Ð&ØÔ'Ð/Ý)EØ Ô,Ô8ÀdÔFWÔFcð*ñ *ô *ˆDÔ&ð Ô*Ô5ˆŒÝ#*¨4Ô+;Ð=RÐTYÑ#ZÔ#ZˆÔ Ø�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'r$   c                 ó  — | j         j        | j        j        k    r*t          d| j         j        › d| j        j        › d�¦  «        ‚| j         j        | j        j        k    r*t          d| j         j        › d| j        j        › d�¦  «        ‚dS )zOPart of `@strict`-powered validation. Validates the architecture of the config.z%`diffusion_head_config.hidden_size` (z() must match `text_config.hidden_size` (z).z%`diffusion_head_config.latent_size` (z)) must match `audio_config.hidden_size` (N)r,   r   r+   Ú
ValueErrorr   r)   )rA   s    r%   Úvalidate_architecturez%VibeVoiceConfig.validate_architecture   sÉ   € àÔ%Ô1°TÔ5EÔ5QÒQÐQÝðO¸Ô8RÔ8^ð Oð OØ.2Ô.>Ô.JðOð Oð Oñô ð ð Ô%Ô1°TÔ5FÔ5RÒRÐRÝðQ¸Ô8RÔ8^ð Qð QØ/3Ô/@Ô/LðQð Qð Qñô ð ð SÐRr$   )r   r   r   r   r4   r	   r   Úsub_configsr)   r;   r   r   r*   r+   r,   r-   r   r.   r/   r0   r1   r2   r    r@   rF   Ú__classcell__)rC   s   @r%   r'   r'   -   sF  ø€ € € € € € ðð ð4 €Jà"Ø!+Ø!Ø!=ð	ð €Kð 48€L�$Ð)Ñ)¨DÑ0Ð7Ð7Ñ7Ø<@Ð˜4Ð"2Ñ2°TÑ9Ð@Ð@Ñ@Ø26€K�Ð(Ñ(¨4Ñ/Ð6Ð6Ñ6Ø<@Ð˜4Ð"2Ñ2°TÑ9Ð@Ð@Ñ@Ø€L�#ÐÐÑØ€L�#ÐÐÑØ$Ð˜Ð$Ð$Ñ$Ø$Ð˜Ð$Ð$Ñ$Ø €N�CÐ Ð Ñ Ø#&Ð˜5Ð&Ð&Ñ&ð (ð  (ð  (ð  (ð  (ðDð ð ð ð ð ð r$   r'   N)Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   Úautor   r	   r   r'   Ú__all__r#   r$   r%   ú<module>rN      s  ðð /Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -ð €Ð8Ð9Ñ9Ô9Øðð ð ð ð Ð#3ñ ô ñ „ñ :Ô9ðð* €Ð8Ð9Ñ9Ô9Øð[ð [ð [ð [ð [Ð&ñ [ô [ñ „ñ :Ô9ð[ð| Ð<Ð
=€€€r$   