
    
3ju                     n   S SK Jr  S SKrS SKJr  S SKrS SKrS SK	J
r
  S SKJr  SSKJr  \" SS9 " S	 S5      5       r\" S
S9 " S S
5      5       r\" SS9 " S S5      5       r\" SS9 " S S5      5       r\" SS9 " S S5      5       r\" SS9 " S S5      5       r SS jr\" SS9 " S S5      5       rg)    )OptionalN)LATENT_DOWNSAMPLE_FACTOR)NestedTensor   )
comfy_nodeLTXVSelectLatents)namec                   R    \ rS rSrSr\S 5       rSrSrSr	Sr
S\S	\S
\S\4S jrSrg)r      z
Selects a range of frames from a video latent.

Features:
- Supports positive and negative indexing
- Preserves batch processing capabilities
- Handles noise masks if present
- Maintains 5D tensor format
c           	      .    SSSSSSSS.4SS	SSSS.4S
.0$ )NrequiredLATENTINTr   '  r   defaultminmaxstep)samplesstart_index	end_index ss    E/home/wildlama/comfy/ComfyUI/custom_nodes/ComfyUI-LTXVideo/latents.pyINPUT_TYPESLTXVSelectLatents.INPUT_TYPES   sC     & !%aH 
  "5qI

 	
    r   select_latentslatent/videozSelects a range of frames from the video latent. start_index and end_index define a closed interval (inclusive of both endpoints).r   r   r   returnc                     UR                  5       nUS   nUR                  u  pgpn
US:  a  X-   OUnUS:  a  X-   OUn[        S[        XS-
  5      5      n[        S[        XS-
  5      5      nX:  a  [        X5      nUSS2SS2XS-   2SS2SS24   US'   SU;   a"  US   b  US   SS2SS2XS-   2SS2SS24   US'   U4$ ! [         a  n[        S[        U5       35        e SnAff = f)aq  
Selects a range of frames from the video latent.

Args:
    samples (dict): Video latent dictionary
    start_index (int): Starting frame index (supports negative indexing)
    end_index (int): Ending frame index (supports negative indexing)

Returns:
    tuple: Contains modified latent dictionary with selected frames

Raises:
    ValueError: If indices are invalid
r   r   r   N
noise_maskz[LTXVSelectLatents] Error: )copyshaper   r   	Exceptionprintstr)selfr   r   r   r   video_latentbatchchannelsframesheightwidth	start_idxend_idxes                 r   r#    LTXVSelectLatents.select_latents1   s   	AY<L5A5G5G2EVU 1<a,[I,5Mf(yG As9qj9:I!S1*56G"	3	 (1iA+.Eq!(KLAiL q Q|_%@"#L/!Q	aK8OQRTU2U"V,4K 	/Ax89	s   C C 
C*C%%C*r   N)__name__
__module____qualname____firstlineno____doc__classmethodr    RETURN_TYPESFUNCTIONCATEGORYDESCRIPTIONdictinttupler#   __static_attributes__r   r"   r   r   r      sY     
 
 LHH	\ 
)d ) ) )QV )r"   LTXVAddLatentsc                   $   \ rS rSrSr\S 5       rSrSrSr	Sr
S\R                  S	\R                  S
\R                  4S jrS\R                  S\R                  4S jrS\R                  S	\R                  S\S\S
\\R                     4
S jrSrg)rF   ]   z
Concatenates two video latents along the frames dimension.

Features:
- Validates dimension compatibility
- Handles device placement
- Preserves noise masks with proper handling
- Supports batch processing
c                     SSSS.0$ )Nr   r   )latents1latents2r   r   s    r   r    LTXVAddLatents.INPUT_TYPESi   s     ''
 	
r"   r   add_latentsr$   zConcatenates two video latents along the frames dimension. latents1 and latents2 must have the same dimensions except for the frames dimension.rJ   rK   r%   c                     UR                  5       nUS   nUS   nUR                  nUR                  U5      nU R                  XE5        [        R
                  " XE/SS9US'   U R                  XUR                  S   UR                  S   5      US'   U4$ ! [         a  n[        S[        U5       35        e SnAff = f)aM  
Concatenates two video latents along the frames dimension.

Args:
    latents1 (dict): First video latent dictionary
    latents2 (dict): Second video latent dictionary

Returns:
    tuple: Contains concatenated latent dictionary

Raises:
    ValueError: If latent dimensions don't match
    RuntimeError: If tensor operations fail
r      dimr'   z[LTXVAddLatents] Error: N)r(   deviceto_validate_dimensionstorchcat_merge_noise_masksr)   r*   r+   r,   )r-   rJ   rK   r   video_latent1video_latent2target_devicer6   s           r   rM   LTXVAddLatents.add_latentsz   s    "	A$Y/M$Y/M *00M),,];M %%mC !99m%CKAiL #55M$7$7$:M<O<OPQ<RAlO 4K 	,SVH56	s   BB 
B= B88B=latent1latent2c                 &   UR                   S:X  aj  UR                   S:X  aZ  UR                  u  p4pVnUR                  u  ppnX8:X  a  XI:X  a
  Xk:X  a  X|:X  d%  [        SUR                   SUR                   35      egUR                   S:X  ac  UR                   S:X  aS  UR                  u  p4p]UR                  u  ppX8:X  a
  XI:X  a  X:X  d%  [        SUR                   SUR                   35      eg[        SUR                   SUR                   35      e)z9Validates that latent dimensions match except for frames.   zCLatent dimensions must match (except frames dimension).
Got shapes z and    zMLatent dimensions must be 4 (audio) or 5 (video) for both inputs.
Got shapes N)ndimr)   
ValueError)r-   r\   r]   b1c1f1h1w1b2c2f2h2w2s1s2s                  r   rT   #LTXVAddLatents._validate_dimensions   s    <<1!2!(BBB!(BBBHbh28 "")--gmm_F  <D \\Q7<<1#4$]]NBB$]]NBBHbh "")--gmm_F  /7 %mm_E'--B r"   frames1frames2c           	         SU;   a#  SU;   a  [         R                  " US   US   /SS9$ SU;   aK  US   bE  [         R                  " US   SS2SS2SU2SS2SS24   5      n[         R                  " US   U/SS9$ SU;   aJ  US   bD  [         R                  " US   SS2SS2SU2SS2SS24   5      n[         R                  " XRS   /SS9$ g)z:Merges noise masks from both latents with proper handling.r'   rO   rP   N)rU   rV   
zeros_like)r-   rJ   rK   rp   rq   zeross         r   rW   !LTXVAddLatents._merge_noise_masks   s     8#(@99h|4h|6LMSTUUX%(<*@*L$$Xl%;Aq(7(Aq<P%QRE99h|4e<!DDX%(<*@*L$$Xl%;Aq(7(Aq<P%QRE99el%;<!DDr"   r   N)r8   r9   r:   r;   r<   r=   r    r>   r?   r@   rA   rU   TensorrM   rT   rC   r   rW   rE   r   r"   r   rF   rF   ]   s     
 
 LHH	_ 
))05)	)VELL 5<< 805GJUX	%,,	r"   LTXVSetVideoLatentNoiseMasksc            
       $   \ rS rSrSr\S 5       rSrSrSr	Sr
S\S	\R                  S
\4S jrS	\R                  S
\R                  4S jrS	\R                  S\S\S
\R                  4S jrS\R                  S\R                  S\S\S
S4
S jrSrg)rw      a  
Applies multiple masks to a video latent.

Features:
- Supports multiple input mask formats (2D, 3D, 4D)
- Automatically handles fewer masks than frames by reusing the last mask
- Resizes masks to match latent dimensions
- Preserves batch processing capabilities

Input Formats:
- 2D mask: Single mask [H, W]
- 3D mask: Multiple masks [M, H, W]
- 4D mask: Multiple masks with channels [M, C, H, W]
c                     SSSS.0$ )Nr   r   )MASK)r   masksr   r   s    r   r    (LTXVSetVideoLatentNoiseMasks.INPUT_TYPES   s     &"
 	
r"   r   set_maskr$   zApplies multiple masks to a video latent. masks can be 2D, 3D, or 4D tensors. If there are fewer masks than frames, the last mask will be reused.r   r|   r%   c                 :    UR                  5       nUS   nUR                  u  pVpxn	SU;  a2  [        R                  " USXxU	4UR                  UR
                  S9US'   OIUS   R                  n
U
S   U:w  a1  [        R                  " USXxU	4UR                  UR
                  S9US'   U R                  U5      nUR                  S   nU R                  XU	5      nU R                  US   XU5        U4$ ! [         a  n[        S[        U5       35        e SnAff = f)	a  
Applies masks to video latent frames.

Args:
    samples (dict): Video latent dictionary containing 'samples' tensor
    masks (torch.Tensor): Mask tensor in various possible formats
        - 2D: [H, W] single mask
        - 3D: [M, H, W] multiple masks
        - 4D: [M, C, H, W] multiple masks with channels

Returns:
    tuple: Contains modified latent dictionary with applied masks

Raises:
    ValueError: If mask dimensions are unsupported
    RuntimeError: If tensor operations fail
r   r'   r   dtyperR   rO   r   z&[LTXVSetVideoLatentNoiseMasks] Error: N)r(   r)   rU   rt   r   rR   _reshape_masks_resize_masks_apply_masksr*   r+   r,   )r-   r   r|   r   r.   
batch_sizer0   
num_framesr2   r3   existing_shapemasks_reshapedMresized_masksr6   s                  r   r~   %LTXVSetVideoLatentNoiseMasks.set_mask   s/   $!	AY<L>J>P>P;J*e 1$"'++J>&,,'..#, "#<!6!6!!$
2&+kk#Q
EB*00+22'AlO "007N$$Q'A ..~uMM ao}!L4K 	:3q6(CD	s   C0C3 3
D=DDc                    [        UR                  5      nUR                  nUS:X  a   UR                  S5      R                  S5      $ US:X  a;  UR	                  UR                  S   SUR                  S   UR                  S   5      $ US:X  a;  UR	                  UR                  S   SUR                  S   UR                  S   5      $ [        SU S35      e)z-Reshapes input masks to consistent 4D format.rO   r      r   r`   zUnsupported 'masks' dimension: z0. Must be 2D (H,W), 3D (M,H,W), or 4D (M,C,H,W).)rD   r)   ra   	unsqueezereshaperb   )r-   r|   original_shapendimss       r   r   +LTXVSetVideoLatentNoiseMasks._reshape_masks(  s    u{{+

A:??1%//22aZ==QEKKNEKKPQNSSaZ==QEKKNEKKPQNSS1.1A BA A r"   r2   r3   c                 X    [         R                  R                  R                  XU4SSS9$ )z-Resizes all masks to match latent dimensions.bilinearFsizemodealign_corners)rU   nn
functionalinterpolate)r-   r|   r2   r3   s       r   r   *LTXVSetVideoLatentNoiseMasks._resize_masks9  s1     xx""..j / 
 	
r"   r'   r   r   r   Nc                 `    [        U5       H  n[        XTS-
  5      nX&   USS2SS2U4'   M!     g)z$Applies resized masks to all frames.r   N)ranger   )r-   r'   r   r   r   fmask_idxs          r   r   )LTXVSetVideoLatentNoiseMasks._apply_masksA  s3     z"A1!e}H"/"9Jq!Qw #r"   r   )r8   r9   r:   r;   r<   r=   r    r>   r?   r@   rA   rB   rU   rv   rD   r~   r   rC   r   r   rE   r   r"   r   rw   rw      s     
 
 LHH	N 3 3U\\ 3e 3jELL U\\ "
\\
+.
7:
	

:LL
: ||
: 	
:
 
: 

:r"   LTXVDilateLatentc                   N    \ rS rSr\S 5       rSrSrSrSr	S\
S\S	\S
\4S jrSrg)r   iN  c           	      .    SSSSSSSS.4SSSSSS.4S.0$ )Nr   r   r   r   d   r   )latenthorizontal_scalevertical_scaler   r   s    r   r    LTXVDilateLatent.INPUT_TYPESP  sC     % !!CC%
  !!CC#

 	
r"   r   dilate_latentr$   z Dilates a latent by a grid size.r   r   r   r%   c                 (   US:X  a	  US:X  a  U4$ US   nUR                  SS 5      nUR                  S S UR                  S   U-  UR                  S   U-  4-   n[        R                  " UUR                  UR
                  SS9nXGSS S U2S S U24'   UR                  S	   SUR                  S
   UR                  S   UR                  S   4n[        R                  " USUR                  UR
                  SS9n	Ub  UOSU	SS S U2S S U24'   XyS.nU4$ )Nr   r   r'   r   r`   F)rR   r   requires_grad.r   rO   g            ?r   r'   )getr)   rU   rt   rR   r   full)
r-   r   r   r   r   maskdilated_shapedilated_samplesdilated_mask_shapedilated_masks
             r   r   LTXVDilateLatent.dilate_latente  s^    q ^q%89#zz,-bq)MM!~-MM!//-
 

  ++>>--	
 FM-~-/A1A/AAB !!!$!!!$!!!$!!!$
 zz>>--
 $D# 	S*N*,>.>,>>? -Iyr"   r   N)r8   r9   r:   r;   r=   r    r>   r?   r@   rA   rB   rC   rD   r   rE   r   r"   r   r   r   N  sO    
 
 LHH4K((.1(CF(	(r"   LTXVAddLatentGuidec                   >    \ rS rSr\S 5       rSrSrSrSr	Sr
S rS	rg
)r   i  c                 6    SSSSSSSSSSS	S
S.4SSSSS.4S.0$ )Nr   VAECONDITIONINGr   r   r   r   r   r   zLatent index to start the conditioning at. Can be negative toindicate that the conditioning is on the frames before the latent.)r   r   r   r   tooltipFLOATr           r   r   r   )vaepositivenegativer   guiding_latent
latent_idxstrengthr   r   s    r   r    LTXVAddLatentGuide.INPUT_TYPES  sU     --%"-#$$# !$]
 %#c#&NO#
 	
r"   )r   r   r   )r   r   r   	ltxtricksgeneratez=Adds a keyframe or a video segment at a specific frame index.c                 "   [         R                  " U5      nUS   nUS   n	[        U	R                  SS  5      n
UR                  S   U	R                  S   -  S:X  a#  UR                  S   U	R                  S   -  S:X  d   S5       e[	        5       R                  UUR                  S   U	R                  S   -  UR                  S   U	R                  S   -  S9S   nUS   n	UR                  SS 5      nU	R                  S   U	R                  S   -  U	R                  S   -  nUR                  nUS::  a  XmS   -  nOS	US	-
  US   -  -   n[         R                  R                  UUUUUU	UUUS
9	u  p#pHS	SK
Jn  U" X,U
5      nU" X<U
5      nUUXHS.4$ )Nr   rO   r`   r   r   z`The ratio of the height and width of the latents and optional_guiding_latents must be an integer)r   r   r'   r   )	r   r   	frame_idxlatent_imager'   r   r   scale_factors
guide_mask)append_guide_attention_entryr   )nodes_ltget_noise_masklistr)   r   r   r   downscale_index_formulaLTXVAddGuideappend_keyframeiclora_attentionr   )r-   r   r   r   r   r   r   r   r'   guideguide_orig_shaper   iclora_tokens_addedr   r   r   s                   r   r   LTXVAddLatentGuide.generate  s    ,,V4
	"y)  AB0 LLOekk!n,1Q%++a.0A5	n n	n6 *+99#\\!_A>!<<?ekk!n< : 
 	 y)#''d;
 $kk!nu{{1~=AN33?"1%55IZ!^}Q/???I191F1F1V1V! '! 2W 
2
.F 	C/+;
 0+;

 9
 	
r"   r   N)r8   r9   r:   r;   r=   r    r>   RETURN_NAMESr@   r?   rA   r   rE   r   r"   r   r   r     s4    
 
. >L5LHHQK=
r"   LTXVImgToVideoConditionOnlyc                   L    \ rS rSrSr\S 5       rSrSrSr	Sr
SrS	 rSS
 jrSrg)r   i  z
Applies image conditioning to the first frames of a video latent.

Features:
- Takes existing latent and applies image conditioning
- Automatically resizes image to match latent dimensions
- Creates noise mask for strength control
- Supports bypass mode
c                 0    SSSSSSSS.4S.S	S
SSS.40S.$ )Nr   )IMAGEr   r   r   r   r   )r   imager   r   bypassBOOLEANFzBypass the conditioning.r   r   r   optionalr   r   s    r   r    'LTXVImgToVideoConditionOnly.INPUT_TYPES  sF      #%$#c#&NO	  %2LM
 	
r"   r   )r   zconditioning/video_modelsr   z|Applies image conditioning to the first frames of an existing latent. Creates a noise mask to control conditioning strength.c                 Z   UR                   u  pEnUu  pxpnX-  nX-  n
UR                  S   U
:w  d  UR                  S   U:w  aC  [        R                  R	                  UR                  SS5      XSS5      R                  SS5      nOUnUS S 2S S 2S S 2S S24   nUR                  U5      nU$ )Nr   rO   r   r   centerr   )r   r)   comfyutilscommon_upscalemovedimencode)r-   r   r)   r   time_scale_factorheight_scale_factorwidth_scale_factorr/   r0   r1   r2   r3   pixelsencode_pixelsts                  r   encode_image(LTXVImgToVideoConditionOnly.encode_image  s     '' 	C0B 27.#% ;;q>V#u{{1~'>[[//b!$eZgan  F q!Q{+JJ}%r"   c                 R   U(       a  U4$ US   nU R                  XR                  U5      nXvS S 2S S 2S UR                  S   24'   [        R                  " SSUR                  S   SS4[        R                  UR
                  S9nSU-
  US S 2S S 2S UR                  S   24'   XhS.4$ )Nr   rO   r   r   r   r   )r   r)   rU   onesfloat32rR   )	r-   r   r   r   r   r   r   r   conditioning_latent_frames_masks	            r   r   $LTXVImgToVideoConditionOnly.generate.  s    9#e]]C8&'1l
l"# +0**7==#Q*-->>+
'
 ?BHn'1l
l(:;#SUUr"   r   N)F)r8   r9   r:   r;   r<   r=   r    r>   r   r@   r?   rA   r   r   rE   r   r"   r   r   r     sG     
 
  LL*HH	A 
,Vr"   c           
         S/U-  n[        S[        US-
  U 5      5      n [        U [        US-
  U5      5      n[        SU5      n[        SX-
  5      n[        XP5       H  nXe-
  S-   U-  XF'   M     [        XS-   5       H  nSXF'   M	     [        X!U-   S-   5      n[        US-   U5       H%  nSXaS-   -
  S-   U-  -
  XF'   [        SXF   5      XF'   M'     SSKn[	        U5      n	U	S-
  S-  S-   n
UR
                  " S/[        [        SU
S5      5      -   5      nUR
                  " U5      nUR                  " U
5      nUR                  " XU5      R                  5       nXN4$ )a  
Returns a blend coefficient list shaped such that:
- It is 0.0 outside the range [video_frame_index_start, video_frame_index_end]
- It ramps up from 0.0 to 1.0 starting at video_frame_index_start-slope_len to video_frame_index_start
- It stays at 1.0 during [video_frame_index_start, video_frame_index_end]
- It ramps down from 1.0 to 0.0 starting at video_frame_index_end to video_frame_index_end+slope_len
- The 'slope_len' parameter controls the sharpness (in frames) of the slope.
r   r   r   r   N   )
r   r   r   numpylenarrayr   arangeinterptolist)video_frame_index_startvideo_frame_index_endvideo_frame_count	slope_lencoeffsrampl_starti	rampr_endnp
num_coeffspixel_frame_lengthxpfppixel_frame_positionspixel_frame_coefficientss                  r   #get_video_latent_blend_coefficientsr  B  s    U&&F "	3 1$&=>  %6%:<Q!R Ay!I a0<=K;8_q(I5	 9
 *A,EF	 G %y'H1'LMI(1,i8A!:;a?9LM	VY'	 9 VJ$q.A-1	1#U1&8!<==	>B	&	B II&89!yy)>BGNNP++r"   z!LTXV Set Audio Video Mask By Time)descriptionc                   D    \ rS rSr\S 5       rSrSrSrSr	Sr
 SS	 jrS
rg)LTXVSetAudioVideoMaskByTimei{  c                     SSSSSSSSSSS.4SS	SSS.4SS
SSS.4SSS04SSS04SSSSS.4SSSSS.4SSSSSS.4S.SSS SS.40S.$ )Nr   r   )MODELr   r   r   g     @@r   g      $@g      8@g     @@r   r   Tr   r   r   r   r   r   )	av_latentr   r   modelr   	audio_vae
start_timeend_time	video_fps
mask_video
mask_audiomask_init_value_videomask_init_value_audior  spatial_maskr{   zSpatial mask.r   r   r   )clss    r   r    'LTXVSetAudioVideoMaskByTime.INPUT_TYPES}  s     )--#%&CF(ST$$s6&RS%4E'RS(9d*;<(9d*;< #C<*
  #C<*
  !!CC)4  $A!5 
  	
r"   )r   r   r   r   r   )r   r   r  video_latent_blend_coefficientsvideo_pixel_blend_coefficientsrunutilityz&Sets the audio and video mask by time.Nc                 	   SSK Jn  UR                  R                  R                  R
                  S:w  a
  [        5       eUR                  R                  nUR                  R                  nUR                  R                  nUU-  [        -  nUR                  S   nU	U-  n[        US   [        5      (       d  [        S5      eUR                  US   R                  S 5      u  nn[         R"                  " UR$                  S   UR$                  S   UR$                  S   UR$                  S   UR$                  S	   4US
9n[         R"                  " UR$                  S   UR$                  S   UR$                  S   UR$                  S   4US
9nUb  UR&                  S:X  a  UR)                  S5      nUR&                  S:X  a   UR)                  S5      R)                  S5      n[         R*                  R,                  R/                  UUR$                  S   UR$                  S	   4SSS9nUR$                  S   nUR$                  S   nUS-
  U-  S-   n[0        R2                  " S/[5        [7        SUU-   U5      5      -   5      n[9        [;        Xy-  5      5      n[0        R<                  " UUSS9n [9        [;        X-  5      5      n![0        R<                  " UU!SS9S-
  n"[9        [;        UU-  5      5      n#[9        [;        UU-  5      5      S-   n$[?        SU 5      n [A        U"U5      n"[?        SU#5      n#[A        U$U5      n$[C        SU U"U#U$U	UUUUUU!UU4-  5        U
(       a&  Ub  UUS S 2S S 2U U"2S S 2S S 24'   OSUS S 2S S 2U U"24'   U(       a  SUS S 2S S 2U#U$24'   SU;   a  US   R                  S   RE                  5       n%U%R$                  S   U%R$                  S   s=:X  a.  Ss=:X  a'  U%R$                  S   s=:X  a  U%R$                  S	   :X  aD  O  OA[7        U%R$                  S   5       H%  n&US S 2S S 2U&S S 2S S 24==   U%SSU&SS4   -  ss'   M'     [        URG                  UU5      5      US'   [I        U U"UUS9u  n'n(UUUU'U(4$ )Nr   )
LTXAVModelr+  r   z av_latent must be a NestedTensorr   rO   r   r`   )
fill_valuer   Fr   left)siderighta"  noise mask start and end indices: video (%d %d), audio (%d %d), video fps: %f, video_latents_per_second: %f, audio_latents_per_second: %f, video_latent_frame_count: %d, video_pixel_frame_count: %d, video_pixel_frame_start_raw: %d, video_pixel_frame_end_raw: %d, start_time: %f, end_time: %fr   r'   )r  )%comfy.ldm.lightricks.av_modelr+  r  diffusion_model	__class__r8   rb   autoencodersampling_ratemel_hop_lengthr   r   
isinstancer    separate_audio_and_video_latentstensorsrU   r   r)   ra   r   r   r   r   r  r   r   r   rC   roundsearchsortedr   r   r+   clone!recombine_audio_and_video_latentsr  ))r-   r  r   r   r  r   r  r  r  r  r  r   r!  r"  r  r#  r+  ltxavr4  r5  audio_latents_per_secondr   video_latents_per_secondvideo_samplesaudio_samples
video_mask
audio_maskvideo_latent_frame_countaudio_latent_frame_countvideo_pixel_frame_countr  video_pixel_frame_start_rawvideo_latent_frame_index_startvideo_pixel_frame_end_rawvideo_latent_frame_index_endaudio_latent_frame_index_startaudio_latent_frame_index_end	base_maskframer&  r'  s)                                            r   r(  LTXVSetAudioVideoMaskByTime.run  s8   $ 	=;;&&0099\I,!KK77 "--;;"..==N*-EE 	!  77:#,/@#@ )I.==?@@','M'Mi (((
$} ZZ##A&##A&##A&##A&##A& -	

 ZZ##A&##A&##A&##A&	 -

 #  A%+55a8  A%+55a8BB1E 88..::#))!,m.A.A!.DE#	 ; L $1#6#6q#9 #0#6#6q#9 #;a#?CT"TWX"XXXCa03DDFWX
 '*%
0F*G&H#)++&*
& %(h.B(C$D! OOB 9H1L 	% *-*778*
& h!99:;a? 	% *-Q0N)O&'*(*B(
$ *-Q0N)O&'*(*B(
$ 	f /,.,((('+)	
& ' ! 23OO	  q89UUU   145QQQ 9$!,/77:@@BI"??1%&& ??1%& ??1%	& #9??1#56Eq!UAq01Yq!UAq?P5QQ1 7 #/33J
K#
	,
 0.,(#	 	H')G +*
 	
r"   r   )N)r8   r9   r:   r;   r=   r    r>   r   r?   r@   rA   r(  rE   r   r"   r   r  r  {  s@    !
 !
F PLL HH:K$ !m
r"   r  )r   )typingr   comfy.utilsr   comfy_extras.nodes_ltr   r   r  rU   "comfy.ldm.lightricks.vae.audio_vaer   comfy.nested_tensorr   nodes_registryr   r   rF   rw   r   r   r   r  r  r   r"   r   <module>rV     s     (   G , & $%L L &L^ !"o o #od /0z: z: 1z:z #$> > %>B %&^
 ^
 '^
B ./LV LV 0LVf 	6,r ;<_
 _
 =_
r"   