Ë
    P/æjrB  ã                   ó  — d dl Z d dlZd dlZd dlZd dlmZ d dlmZ ddl	m
Z
 ddlmZmZ ddlmZ  G d„ d	ej                   «      Zd
„ Zd„ Z G d„ dej                   «      Z G d„ dej                   «      Z G d„ dej                   «      Zy)é    N)Únn)Ú
functionalé   )Úcapture_init)Úcenter_trimÚunfold)Ú
LayerScalec                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )ÚBLSTMz¶
    BiLSTM with same hidden units as input dim.
    If `max_steps` is not None, input will be splitting in overlapping
    chunks and the LSTM applied separately on each chunk.
    c                 óÎ   •— t         ‰| �  «        |�
|dz  dk(  sJ ‚|| _        t        j                  d|||¬«      | _        t        j                  d|z  |«      | _        || _        y )Né   r   T)ÚbidirectionalÚ
num_layersÚhidden_sizeÚ
input_sizeé   )	ÚsuperÚ__init__Ú	max_stepsr   ÚLSTMÚlstmÚLinearÚlinearÚskip)ÚselfÚdimÚlayersr   r   Ú	__class__s        €úP/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/demucs/demucs.pyr   zBLSTM.__init__   s`   ø€ Ü‰ÑÔØÐ  I°¡M°QÒ$6Ð6Ð6Ø"ˆŒÜ—G‘G¨$¸6ÈsÐ_bÔcˆŒ	Ü—i‘i  C¡¨Ó-ˆŒØˆ�	ó    c           	      ó6  — |j                   \  }}}|}d}| j                  �c|| j                  kD  rT| j                  }|dz  }t        |||«      }	|	j                   d   }
d}|	j                  dddd«      j	                  d||«      }|j                  ddd«      }| j                  |«      d   }| j                  |«      }|j                  ddd«      }|r·g }|j	                  |d|«      }	dz  }t        
«      D ]m  }|dk(  r |j                  |	d d …|d d …d | …f   «       Œ(||
dz
  k(  r|j                  |	d d …|d d …|d …f   «       ŒO|j                  |	d d …|d d …|| …f   «       Œo t        j                  |d«      }|dd |…f   }|}| j                  r||z   }|S )	NFr   Tr   r   é   éÿÿÿÿ.)Úshaper   r   ÚpermuteÚreshaper   r   ÚrangeÚappendÚtorchÚcatr   )r   ÚxÚBÚCÚTÚyÚframedÚwidthÚstrideÚframesÚnframesÚoutÚlimitÚks                 r   ÚforwardzBLSTM.forward"   sª  € Ø—'‘'‰ˆˆ1ˆaØˆØˆØ�>‰>Ð%¨!¨d¯n©nÒ*<Ø—N‘NˆEØ˜a‘ZˆFÜ˜A˜u fÓ-ˆFØ—l‘l 1‘oˆGØˆFØ—‘˜q ! Q¨Ó*×2Ñ2°2°q¸%Ó@ˆAà�I‰I�a˜˜AÓˆà�I‰I�a‹L˜‰OˆØ�K‰K˜‹NˆØ�I‰I�a˜˜AÓˆÙØˆCØ—Y‘Y˜q " a¨Ó/ˆFØ˜a‘KˆEÜ˜7“^ò >�Ø˜’6Ø—J‘J˜v¢a¨ªA¨w°°¨wÐ&6Ñ7Õ8Ø˜' A™+Ò%Ø—J‘J˜v¢a¨ªA¨u©v oÑ6Õ7à—J‘J˜v¢a¨ªA¨u°e°V¨|Ð&;Ñ<Õ=ð>ô —)‘)˜C Ó$ˆCØ�c˜2˜A˜2�g‘,ˆCØˆAØ�9Š9Ø�A‘ˆAØˆr    )r   NF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r8   Ú__classcell__©r   s   @r   r   r      s   ø„ ñõ
ö!r    r   c                 óú   — | j                   j                  «       j                  «       }||z  dz  }| j                   xj                  |z  c_        | j                  � | j                  xj                  |z  c_        yy)zTRescale initial weight scale. It is unclear why it helps but it certainly does.
    ç      à?N)ÚweightÚstdÚdetachÚdataÚbias)ÚconvÚ	referencerB   Úscales       r   Úrescale_convrI   F   sa   € ð �+‰+�/‰/Ó
×
"Ñ
"Ó
$€CØ�9‰_˜sÑ"€EØ‡K�K×Ò˜ÑÕØ‡y�yÐØ�	‰	�Š˜%ÑŽð r    c                 óØ   — | j                  «       D ]W  }t        |t        j                  t        j                  t        j
                  t        j                  f«      sŒLt        ||«       ŒY y ©N)ÚmodulesÚ
isinstancer   ÚConv1dÚConvTranspose1dÚConv2dÚConvTranspose2drI   )ÚmodulerG   Úsubs      r   Úrescale_modulerT   P   sI   € Ø�~‰~Óò )ˆÜ�cœBŸI™I¤r×'9Ñ'9¼2¿9¹9Äb×FXÑFXÐYÕZÜ˜˜iÕ(ñ)r    c            	       óB   ‡ — e Zd ZdZ	 	 	 ddedededefˆ fd„Zd„ Zˆ xZS )	ÚDConva  
    New residual branches in each encoder layer.
    This alternates dilated convolutions, potentially with LSTMs and attention.
    Also before entering each residual branch, dimension is projected on a smaller subspace,
    e.g. of dim `channels // compress`.
    ÚchannelsÚcompressÚdepthÚinitc                 ó(  •— t         ‰| �  «        |dz  dk(  sJ ‚|| _        || _        t	        |«      | _        |dkD  }d„ }|rd„ }t        ||z  «      }|
rt        j                  }nt        j                  }t        j                  g «      | _        t        | j
                  «      D ]ë  }|rd|z  nd}||dz  z  }t        j                  |||||¬«       ||«       |«       t        j                  |d|z  d«       |d|z  «      t        j                  d«      t        ||«      g}|r|j!                  dt#        |||¬«      «       |	r|j!                  dt%        |dd	d
¬«      «       t        j&                  |Ž }| j                  j)                  |«       Œí y)að  
        Args:
            channels: input/output channels for residual branch.
            compress: amount of channel compression inside the branch.
            depth: number of layers in the residual branch. Each layer has its own
                projection, and potentially LSTM and attention.
            init: initial scale for LayerNorm.
            norm: use GroupNorm.
            attn: use LocalAttention.
            heads: number of heads for the LocalAttention.
            ndecay: number of decay controls in the LocalAttention.
            lstm: use LSTM.
            gelu: Use GELU activation.
            kernel: kernel size for the (dilated) convolutions.
            dilate: if true, use dilation, increasing with the depth.
        r   r   r   c                 ó*   — t        j                  «       S rK   ©r   ÚIdentity©Úds    r   ú<lambda>z DConv.__init__.<locals>.<lambda>y   s   € œBŸK™K›M€ r    c                 ó.   — t        j                  d| «      S )Nr   ©r   Ú	GroupNormr_   s    r   ra   z DConv.__init__.<locals>.<lambda>{   s   € ¤§¡¨Q°Ó 2€ r    )ÚdilationÚpaddingr"   )ÚheadsÚndecayéÈ   T)r   r   r   N)r   r   rW   rX   ÚabsrY   Úintr   ÚGELUÚReLUÚ
ModuleListr   r'   rN   ÚGLUr	   ÚinsertÚ
LocalStater   Ú
Sequentialr(   )r   rW   rX   rY   rZ   ÚnormÚattnrg   rh   r   ÚgeluÚkernelÚdilateÚnorm_fnÚhiddenÚactr`   re   rf   ÚmodsÚlayerr   s                        €r   r   zDConv.__init__]   sl  ø€ ô( 	‰ÑÔØ˜‰z˜QŠÐˆØ ˆŒØ ˆŒÜ˜“ZˆŒ
Ø˜‘ˆñ *ˆÙÙ2ˆGä�X Ñ(Ó)ˆñ Ü—'‘'‰Cä—'‘'ˆCä—m‘m BÓ'ˆŒÜ�t—z‘zÓ"ò 	&ˆAÙ!'�q˜A’v¨QˆHØ &¨A¡+Ñ.ˆGä—	‘	˜( F¨F¸XÈwÔWÙ˜“¡£Ü—	‘	˜& ! h¡,°Ó2Ù˜˜H™Ó%¤r§v¡v¨a£yÜ˜8 TÓ*ðˆDñ Ø—‘˜Aœz¨&¸ÀfÔMÔNÙØ—‘˜Aœu V°AÀÈ4ÔPÔQÜ—M‘M 4Ð(ˆEØ�K‰K×Ñ˜uÕ%ñ	&r    c                 ó>   — | j                   D ]  }| ||«      z   }Œ |S rK   )r   )r   r+   r|   s      r   r8   zDConv.forward—   s'   € Ø—[‘[ò 	ˆEØ‘E˜!“H‘‰Að	àˆr    )r   r   ç-Cëâ6?TFr   r   FTr"   T)	r9   r:   r;   r<   rk   Úfloatr   r8   r=   r>   s   @r   rV   rV   V   s=   ø„ ñð Z^ØLPØ"&ñ8& ð 8&°ð 8&À#ð 8&ÐQVõ 8&ötr    rV   c            	       ó<   ‡ — e Zd ZdZddedededefˆ fd„Zd„ Zˆ xZS )	rq   a  Local state allows to have attention based only on data (no positional embedding),
    but while setting a constraint on the time window (e.g. decaying penalty term).

    Also a failed experiments with trying to provide some frequency based attention.
    rW   rg   Únfreqsrh   c                 ó¦  •— t         ‰| �  «        ||z  dk(  s	J ||f«       ‚|| _        || _        || _        t        j                  ||d«      | _        t        j                  ||d«      | _        t        j                  ||d«      | _	        |rt        j                  |||z  d«      | _
        |rƒt        j                  |||z  d«      | _        | j                  j                  xj                  dz  c_        | j                  j                  €J ‚d| j                  j                  j                  d d  t        j                  |||z  z   |d«      | _        y )Nr   r   g{®Gáz„?éþÿÿÿ)r   r   rg   r�   rh   r   rN   ÚcontentÚqueryÚkeyÚquery_freqsÚquery_decayrA   rD   rE   Úproj)r   rW   rg   r�   rh   r   s        €r   r   zLocalState.__init__£   s"  ø€ Ü‰ÑÔØ˜%Ñ 1Ò$Ð7 x°Ð&7Ó7Ð$ØˆŒ
ØˆŒØˆŒÜ—y‘y ¨8°QÓ7ˆŒÜ—Y‘Y˜x¨°1Ó5ˆŒ
Ü—9‘9˜X x°Ó3ˆŒÙÜ!Ÿy™y¨°5¸6±>À1ÓEˆDÔÙÜ!Ÿy™y¨°5¸6±>À1ÓEˆDÔà×Ñ×#Ñ#×(Ò(¨DÑ0Õ(Ø×#Ñ#×(Ñ(Ð4Ð4Ð4Ø,.ˆD×Ñ×!Ñ!×&Ñ&¡qÐ)Ü—I‘I˜h¨°©Ñ7¸À1ÓEˆ�	r    c                 óÂ  — |j                   \  }}}| j                  }t        j                  ||j                  |j
                  ¬«      }|d d …d f   |d d d …f   z
  }| j                  |«      j                  ||d|«      }| j                  |«      j                  ||d|«      }	t        j                  d|	|«      }
|
|	j                   d   dz  z  }
| j                  rÄt        j                  d| j                  dz   |j                  |j
                  ¬«      }t        j                  dt        j                  z  |z  |j                  ddd«      z  «      }| j                  |«      j                  ||d|«      | j                  dz  z  }|
t        j                  d||«      z  }
| j                  rÄt        j                  d| j                  dz   |j                  |j
                  ¬«      }| j!                  |«      j                  ||d|«      }t        j"                  |«      dz  }|j                  ddd«       |j%                  «       z  | j                  dz  z  }|
t        j                  d||«      z  }
|
j'                  t        j(                  ||
j                  t        j*                  ¬«      d«       t        j,                  |
d¬	«      }| j/                  |«      j                  ||d|«      }t        j                  d
||«      }| j                  r/t        j                  d|«      }t        j0                  ||gd«      }|j3                  |d|«      }|| j5                  |«      z   S )N)ÚdeviceÚdtyper#   zbhct,bhcs->bhtsr   r@   r   zfts,bhfs->bhtsiœÿÿÿ©r   zbhts,bhct->bhcszbhts,fts->bhfs)r$   rg   r)   Úaranger‹   rŒ   r…   Úviewr†   Úeinsumr�   ÚcosÚmathÚpir‡   rh   rˆ   Úsigmoidrj   Úmasked_fill_ÚeyeÚboolÚsoftmaxr„   r*   r&   r‰   )r   r+   r,   r-   r.   rg   ÚindexesÚdeltaÚqueriesÚkeysÚdotsÚperiodsÚfreq_kernelÚfreq_qÚdecaysÚdecay_qÚdecay_kernelÚweightsr„   ÚresultÚtime_sigs                        r   r8   zLocalState.forward¶   s¹  € Ø—'‘'‰ˆˆ1ˆaØ—
‘
ˆÜ—,‘,˜q¨¯©¸¿¹ÔAˆàš˜4˜Ñ  7¨4²¨7Ñ#3Ñ3ˆà—*‘*˜Q“-×$Ñ$ Q¨¨r°1Ó5ˆØ�x‰x˜‹{×Ñ  5¨"¨aÓ0ˆä�|‰|Ð-¨t°WÓ=ˆØ�—
‘
˜1‘˜sÑ"Ñ"ˆØ�;Š;Ü—l‘l 1 d§k¡k°A¡o¸a¿h¹hÈaÏgÉgÔVˆGÜŸ)™) A¬¯©¡K°%Ñ$7¸'¿,¹,ÀrÈ1ÈaÓ:PÑ$PÓQˆKØ×%Ñ% aÓ(×-Ñ-¨a°¸¸AÓ>ÀÇÁÐPSÑASÑSˆFØ”E—L‘LÐ!1°;ÀÓGÑGˆDØ�;Š;Ü—\‘\ ! T§[¡[°1¡_¸Q¿X¹XÈQÏWÉWÔUˆFØ×&Ñ& qÓ)×.Ñ.¨q°%¸¸QÓ?ˆGÜ—m‘m GÓ,¨qÑ0ˆGØ#Ÿ[™[¨¨Q°Ó2Ð2°U·Y±Y³[Ñ@À4Ç;Á;ÐPSÑCSÑSˆLØ”E—L‘LÐ!1°<ÀÓIÑIˆDð 	×Ñœ%Ÿ)™) A¨d¯k©kÄÇÁÔLÈdÔSÜ—-‘- ¨!Ô,ˆà—,‘,˜q“/×&Ñ& q¨%°°QÓ7ˆÜ—‘Ð/°¸'ÓBˆØ�;Š;Ü—|‘|Ð$4°g¸{ÓKˆHÜ—Y‘Y ¨Ð1°1Ó5ˆFØ—‘  2 qÓ)ˆØ�4—9‘9˜VÓ$Ñ$Ð$r    )r   r   r   )r9   r:   r;   r<   rk   r   r8   r=   r>   s   @r   rq   rq   �   s3   ø„ ññ
F ð F¨Sð F¸cð FÈsõ Fö&"%r    rq   c                   ór   ‡ — e Zd Ze	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dˆ fd„	«       Zd„ Zd„ Zdˆ fd„	Zˆ xZS )ÚDemucsc           
      ó¦  •‡— t         ‰&| �  «        || _        || _        || _        |
| _        |	| _        || _        || _        || _	        || _
        || _        || _        t        j                  «       | _        t        j                  «       | _        t        j                  «       | _        |rt        j$                  d¬«      }d}nt        j&                  «       }d}|rt        j(                  }nt        j&                  }|}d}t+        |«      D �]•  }d„ } ||k\  rˆfd„} g }!|!t        j,                  ||||	«       | |«       |«       gz  }!||k\  }"||k\  }#|dz  r|!t/        |||||"|#¬«      gz  }!|r)|!t        j,                  |||z  d«       | ||z  «      |gz  }!| j                  j1                  t        j2                  |!Ž «       g }$|dkD  r|}%nt5        | j                  «      |z  }%|r1|$t        j,                  |||z  d|
z  dz   |
¬«       | ||z  «      |gz  }$|dz  r|$t/        |||||"|#¬«      gz  }$|$t        j6                  ||%||	|¬«      gz  }$|dkD  r|$ | |%«       |«       gz  }$| j                   j9                  dt        j2                  |$Ž «       |}t;        ||z  «      }�Œ˜ |}|rt=        ||«      | _        nd	| _        |rtA        | |¬
«       y	y	)ab	  
        Args:
            sources (list[str]): list of source names
            audio_channels (int): stereo or mono
            channels (int): first convolution channels
            depth (int): number of encoder/decoder layers
            growth (float): multiply (resp divide) number of channels by that
                for each layer of the encoder (resp decoder)
            depth (int): number of layers in the encoder and in the decoder.
            rewrite (bool): add 1x1 convolution to each layer.
            lstm_layers (int): number of lstm layers, 0 = no lstm. Deactivated
                by default, as this is now replaced by the smaller and faster small LSTMs
                in the DConv branches.
            kernel_size (int): kernel size for convolutions
            stride (int): stride for convolutions
            context (int): kernel size of the convolution in the
                decoder before the transposed convolution. If > 1,
                will provide some context from neighboring time steps.
            gelu: use GELU activation function.
            glu (bool): use glu instead of ReLU for the 1x1 rewrite conv.
            norm_starts: layer at which group norm starts being used.
                decoder layers are numbered in reverse order.
            norm_groups: number of groups for group norm.
            dconv_mode: if 1: dconv in encoder only, 2: decoder only, 3: both.
            dconv_depth: depth of residual DConv branch.
            dconv_comp: compression of DConv branch.
            dconv_attn: adds attention layers in DConv branch starting at this layer.
            dconv_lstm: adds a LSTM layer in DConv branch starting at this layer.
            dconv_init: initial scale for the DConv branch LayerScale.
            normalize (bool): normalizes the input audio on the fly, and scales back
                the output by the same amount.
            resample (bool): upsample x2 the input and downsample /2 the output.
            rescale (float): rescale initial weights of convolutions
                to get their standard deviation closer to `rescale`.
            samplerate (int): stored as meta information for easing
                future evaluations of the model.
            segment (float): duration of the chunks of audio to ideally evaluate the model on.
                This is used by `demucs.apply.apply_model`.
        r   r�   r   r   c                 ó*   — t        j                  «       S rK   r]   r_   s    r   ra   z!Demucs.__init__.<locals>.<lambda>F  s   € ¤§¡£€ r    c                 ó0   •— t        j                  ‰| «      S rK   rc   )r`   Únorm_groupss    €r   ra   z!Demucs.__init__.<locals>.<lambda>H  s   ø€ ¤B§L¡L°¸aÓ$@€ r    )rY   rZ   rX   rt   r   )rf   N)rG   )!r   r   Úaudio_channelsÚsourcesÚkernel_sizeÚcontextr2   rY   ÚresamplerW   Ú	normalizeÚ
samplerateÚsegmentr   rn   ÚencoderÚdecoderÚskip_scalesro   rm   rl   r'   rN   rV   r(   rr   ÚlenrO   rp   rk   r   r   rT   )'r   r®   r­   rW   ÚgrowthrY   ÚrewriteÚlstm_layersr¯   r2   r°   ru   ÚgluÚnorm_startsr¬   Ú
dconv_modeÚdconv_depthÚ
dconv_compÚ
dconv_attnÚ
dconv_lstmÚ
dconv_initr²   r±   Úrescaler³   r´   Ú
activationÚch_scaleÚact2Úin_channelsrf   Úindexrx   Úencodert   r   ÚdecodeÚout_channelsr   s'                 `                       €r   r   zDemucs.__init__Ü   sö  ù€ ôX 	‰ÑÔØ,ˆÔØˆŒØ&ˆÔØˆŒØˆŒØˆŒ
Ø ˆŒØ ˆŒØ"ˆŒØ$ˆŒØˆŒÜ—}‘}“ˆŒÜ—}‘}“ˆŒÜŸ=™=›?ˆÔáÜŸ™ AœˆJØ‰HäŸ™›ˆJØˆHÙÜ—7‘7‰Dä—7‘7ˆDà$ˆØˆÜ˜5“\ó (	.ˆEÙ-ˆGØ˜Ò#Û@�àˆFØÜ—	‘	˜+ x°¸fÓEÙ˜Ó!Ù“ðñ ˆFð
 ˜JÑ&ˆDØ˜JÑ&ˆDØ˜AŠ~Øœ5 °À:Ø*4¸4ÀdôLð Mñ M�áØÜ—I‘I˜h¨°8Ñ(;¸QÓ?Ù˜H xÑ/Ó0°*ð>ñ >�ð �L‰L×Ñ¤§¡¨vÐ 6Ô7àˆFØ�qŠyØ*‘ä" 4§<¡<Ó0°>ÑA�ÙØÜ—I‘I˜h¨°8Ñ(;¸QÀ¹[È1¹_ÐV]Ô^Ù˜H xÑ/Ó0°*ð>ñ >�ð ˜AŠ~Øœ5 °À:Ø*4¸4ÀdôLð Mñ M�à”r×)Ñ)¨(°LØ" F°Gô=ð >ñ >ˆFà�qŠyØ™7 <Ó0±$³&Ð9Ñ9�Ø�L‰L×Ñ ¤2§=¡=°&Ð#9Ô:Ø"ˆKÜ˜6 HÑ,Ó-ŠHðQ(	.ðT ˆÙÜ˜h¨Ó4ˆD�IàˆDŒIáÜ˜4¨7Ö3ð r    c                 ó¤  — | j                   r|dz  }t        | j                  «      D ]@  }t        j                  || j
                  z
  | j                  z  «      dz   }t        d|«      }ŒB t        | j                  «      D ]!  }|dz
  | j                  z  | j
                  z   }Œ# | j                   rt        j                  |dz  «      }t        |«      S )aX  
        Return the nearest valid length to use with the model so that
        there is no time steps left over in a convolution, e.g. for all
        layers, size of the input - kernel_size % stride = 0.

        Note that input are automatically padded if necessary to ensure that the output
        has the same length as the input.
        r   r   )	r±   r'   rY   r’   Úceilr¯   r2   Úmaxrk   )r   ÚlengthÚ_Úidxs       r   Úvalid_lengthzDemucs.valid_lengthx  s¼   € ð �=Š=Ø�a‰KˆFä�t—z‘zÓ"ò 	$ˆAÜ—Y‘Y ¨×)9Ñ)9Ñ 9¸T¿[¹[ÑHÓIÈAÑMˆFÜ˜˜F“^‰Fð	$ô ˜Ÿ™Ó$ò 	CˆCØ˜q‘j D§K¡KÑ/°$×2BÑ2BÑB‰Fð	Cð �=Š=Ü—Y‘Y˜v¨™zÓ*ˆFÜ�6‹{Ðr    c                 ó’  — |}|j                   d   }| j                  rE|j                  dd¬«      }|j                  dd¬«      }|j                  dd¬«      }||z
  d|z   z  }nd}d}| j	                  |«      |z
  }t        j                  ||dz  ||dz  z
  f«      }| j                  rt        j                  |dd«      }g }| j                  D ]  }	 |	|«      }|j                  |«       Œ | j                  r| j                  |«      }| j                  D ]*  }
|j                  d«      }t        ||«      } |
||z   «      }Œ, | j                  rt        j                  |dd«      }||z  |z   }t        ||«      }|j!                  |j#                  d«      t%        | j&                  «      | j(                  |j#                  d«      «      }|S )Nr#   r   T)r   Úkeepdimgñhãˆµøä>r   r   )r$   r²   ÚmeanrB   rÓ   ÚFÚpadr±   ÚjuliusÚresample_fracrµ   r(   r   r¶   Úpopr   r�   Úsizer¸   r®   r­   )r   Úmixr+   rÐ   ÚmonorÖ   rB   rš   ÚsavedrÊ   rË   r   s               r   r8   zDemucs.forward�  s©  € ØˆØ—‘˜‘ˆà�>Š>Ø—8‘8 ¨4�8Ó0ˆDØ—9‘9 ¨T�9Ó2ˆDØ—(‘(˜r¨4�(Ó0ˆCØ�T‘˜d S™jÑ)‰AàˆDØˆCà×!Ñ! &Ó)¨FÑ2ˆÜ�E‰E�!�e˜q‘j %¨%°1©*Ñ"4Ð5Ó6ˆà�=Š=Ü×$Ñ$ Q¨¨1Ó-ˆAàˆØ—l‘lò 	ˆFÙ�q“	ˆAØ�L‰L˜�Oð	ð �9Š9Ø—	‘	˜!“ˆAà—l‘lò 	!ˆFØ—9‘9˜R“=ˆDÜ˜t QÓ'ˆDÙ�q˜4‘xÓ ‰Að	!ð
 �=Š=Ü×$Ñ$ Q¨¨1Ó-ˆAØ�‰G�d‰NˆÜ˜˜6Ó"ˆØ�F‰F�1—6‘6˜!“9œc $§,¡,Ó/°×1DÑ1DÀaÇfÁfÈRÃjÓQˆØˆr    c                 óÜ   •— t        | j                  «      D ]B  }dD ];  }dD ]4  }|› d|› d|› �}|› d|› d|› �}||v sŒ||vsŒ!|j                  |«      ||<   Œ6 Œ= ŒD t        ‰| �  ||¬«       y )N)rµ   r¶   )rE   rA   ú.z.3.z.2.)Ústrict)r'   rY   rÛ   r   Úload_state_dict)	r   Ústaterâ   rÒ   ÚaÚbÚnewÚoldr   s	           €r   rã   zDemucs.load_state_dict¶  s˜   ø€ ä˜Ÿ™Ó$ò 	4ˆCØ+ò 4�Ø+ò 4�AØ˜C˜q   S¨¨Ð,�CØ˜C˜q   S¨¨Ð,�CØ˜e’|¨°5Ò(8Ø%*§Y¡Y¨s£^˜˜cš
ñ	4ñ4ð	4ô 	‰Ñ ¨fÐÕ5r    )r   é@   g       @é   Tr   é   r   r   TTr   r   r   r   r   r   r   r~   TTgš™™™™™¹?iD¬  é(   )T)	r9   r:   r;   r   r   rÓ   r8   rã   r=   r>   s   @r   r¨   r¨   Û   sx   ø„ Øð !"ØØàØØàØØàØàØàØØØØØ àØàà!ØôEY4ó ðY4òvò.%÷N	6ñ 	6r    r¨   )r’   ÚtypingÚtprÙ   r)   r   Útorch.nnr   r×   Ústatesr   Úutilsr   r   Útransformerr	   ÚModuler   rI   rT   rV   rq   r¨   © r    r   ú<module>rõ      ss   ðó Û ã Û Ý Ý $å  ß &Ý #ô/ˆB�I‰Iô /òd ò)ôDˆB�I‰Iô DôN;%�—‘ô ;%ô|d6ˆR�Y‰Yõ d6r    