ó
    -VðiM  ã                   óª  • S SK r S SKJrJrJr  S SKrS SKJr  S SKJ	r	  S SK
Jr  / SQr/ SQr\R                  " \5      r\R                  " \5      r\" SS	9 " S
 S5      5       r\" 5       r\" \S\" \R&                  S/S9\" \R(                  S/S9S9r\" SSS\	" SSSSS / S9\	" SSSSS / S9S9rSrSr\R2                  " 5       rSrSrS\S\4S jrS rg)!é    N)Ú	dataclassÚfieldÚreplace)Ú	safe_open©ÚMultiModalGuiderParams)ÚSpatioTemporalScaleFactors)	ç      ð?gÍÌÌÌÌÌï?gš™™™™™ï?gffffffï?g333333ï?çš™™™™í?ç333333ç?ç      Û?ç        )r   r   r   r   T)Úfrozenc                   óÊ   • \ rS rSr% Sr\\S'   Sr\\S'   Sr\\S'   Sr	\\S	'   S
r
\\S'   Sr\\S'   \" S S9r\\S'   \" S S9r\\S'   \S\4S j5       r\S\4S j5       rSrg)ÚPipelineParamsé   é
   Úseedi   Ústage_1_heighti   Ústage_1_widthéy   Ú
num_framesg      8@Ú
frame_rateé(   Únum_inference_stepsc            	      ó    • [        SSSSSS/S9$ )Nç      @r
   çffffffæ?r   é   ©Ú	cfg_scaleÚ	stg_scaleÚrescale_scaleÚmodality_scaleÚ	skip_stepÚ
stg_blocksr   © ó    ÚbD:\a\ltx-desktop-ci\ltx-desktop-ci\python-embed\Lib\site-packages\ltx_pipelines\utils\constants.pyÚ<lambda>ÚPipelineParams.<lambda>'   ó   € Ô 6ØØØØØØ�tò!
r(   )Údefault_factoryÚvideo_guider_paramsc            	      ó    • [        SSSSSS/S9$ )Nç      @r
   r   r   r   r   r    r   r'   r(   r)   r*   r+   1   r,   r(   Úaudio_guider_paramsÚreturnc                 ó2   • [        U R                  S-  5      $ ©Né   )Úintr   ©Úselfs    r)   Ústage_2_heightÚPipelineParams.stage_2_height;   s   € ä�4×&Ñ&¨Ñ*Ó+Ð+r(   c                 ó2   • [        U R                  S-  5      $ r4   )r6   r   r7   s    r)   Ústage_2_widthÚPipelineParams.stage_2_width?   s   € ä�4×%Ñ%¨Ñ)Ó*Ð*r(   r'   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r6   Ú__annotations__r   r   r   r   Úfloatr   r   r.   r   r1   Úpropertyr9   r<   Ú__static_attributes__r'   r(   r)   r   r      s¦   ‡ à€Dˆ#ƒNØ€N�CÓØ€M�3ÓØ€J�ÓØ€J�ÓØ!Ð˜Ó!Ù27ñ
ñ	3ÐÐ/ó 	ñ 38ñ
ñ	3ÐÐ/ó 	ð ð, ó ,ó ð,ð ð+˜só +ó ó+r(   r   r   é   )r&   )r   r.   r1   é   i   iÀ  r   r   gÍÌÌÌÌÌÜ?r    r0   r
   )r   r   r   r.   r1   é!   é€   z2.3Úcheckpoint_pathr2   c                 ó¨  • [         R                  " [        5      n [        U SS9 nUR	                  5       =(       d    0 nSSS5        WR                  SS5      nUR                  [        5      (       a  [        $ UR                  SU=(       d    S5        [        $ ! , (       d  f       Na= f! [         a    UR                  SU 5        [        s $ f = f)	zâDetect pipeline params from checkpoint metadata.
Reads the ``model_version`` field from the safetensors config metadata.
Returns ``LTX_2_3_PARAMS`` when the version starts with "2.3",
otherwise falls back to ``LTX_2_PARAMS``.
Úpt)Ú	frameworkNÚmodel_versionÚ z@Could not read checkpoint metadata from %s, using LTX-2 defaultsz.Using LTX_2_PARAMS for checkpoint (version=%s)Úunknown)ÚloggingÚ	getLoggerr>   r   ÚmetadataÚgetÚ	ExceptionÚwarningÚLTX_2_PARAMSÚ
startswithÚ_LTX_2_3_MODEL_VERSION_PREFIXÚLTX_2_3_PARAMSÚinfo)rJ   ÚloggerÚfrS   Úversions        r)   Údetect_paramsr_   l   s­   € ô ×ÒœxÓ(€FðÜ�°$Ò7¸1Ø—z‘z“|×) rˆH÷ 8à—,‘,˜°Ó3ˆð
 ×ÑÔ7×8Ñ8ÜÐà
‡K�KÐ@À'×BVÈYÔWÜÐ÷ 8Õ7ûô ó Ø�‰ÐYÐ[jÔkÜÒðús(   œ
B, ¦BÁ B, Â
B)Â%B, Â,"CÃCa6  blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise, grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones, deformed facial features, asymmetrical face, missing facial features, extra limbs, disfigured hands, wrong hand count, artifacts around text, inconsistent perspective, camera shake, incorrect depth of field, background too sharp, background clutter, distracting reflections, harsh shadows, inconsistent lighting direction, color banding, cartoonish rendering, 3D CGI look, unrealistic materials, uncanny valley effect, incorrect ethnicity, wrong gender, exaggerated expressions, wrong gaze direction, mismatched lip sync, silent or muted audio, distorted voice, robotic voice, echo, background noise, off-sync audio, incorrect dialogue, added dialogue, repetitive speech, jittery movement, awkward pauses, incorrect timing, unnatural transitions, inconsistent framing, tilted camera, flat lighting, inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts.) rQ   Údataclassesr   r   r   ÚtorchÚsafetensorsr   Últx_core.components.guidersr   Últx_core.typesr	   ÚDISTILLED_SIGMA_VALUESÚSTAGE_2_DISTILLED_SIGMA_VALUESÚtensorÚDISTILLED_SIGMASÚSTAGE_2_DISTILLED_SIGMASr   rW   r.   r1   rZ   ÚLTX_2_3_HQ_PARAMSÚDEFAULT_LORA_STRENGTHÚDEFAULT_IMAGE_CRFÚdefaultÚVIDEO_SCALE_FACTORSÚVIDEO_LATENT_CHANNELSrY   Ústrr_   ÚDEFAULT_NEGATIVE_PROMPTr'   r(   r)   Ú<module>rr      s>  ðÛ ß 1Ñ 1ã Ý !å >Ý 5ò `Ð ò "BÐ à—<’<Ð 6Ó7Ð Ø Ÿ<š<Ð(FÓGÐ ñ �$Ñ÷"+ð "+ó ð"+ñL Ó€ñ ØØÙ × @Ñ @ÈbÈTÑRÙ × @Ñ @ÈbÈTÑRñ	€ñ #ØØØÙ.ØØØØØØññ /ØØØØØØññÐ ð, Ð ØÐ Ø0×8Ò8Ó:Ð ØÐ à %Ð ð 3ð ¨>ô ð8
Vñ r(   