+
    Ñåûj
.  ã            	       ó¼  € R t ^ RIt^ RIHt ^ RIt^ RIHt RtRtRt	Rt
RtR	t]P                   ! R
 R4      4       t]P                  P!                  RRRR7      RRRRRRRR/R R ll4       t]P$                  RRRRRRRR/R R ll4       t]P                  P!                  RRRR7      RRRRRRRR/R R ll4       t]P$                  RRRRRRRR/R R ll4       tR# )a5  Implementation of symbolic FX ops to represent arbitrary ONNX ops.

This module provides a way to create symbolic FX operators that can represent
arbitrary ONNX operators.

The operators are called "symbolic" because they don't do any actual computation
but instead serve as placeholders in the computation graph.

Each implementation contains two parts: A "real" implementation that produces all
zeros based on the input shape and dtype, and a "fake" implementation that does more
or less the same thing but is required by the `torch.library.custom_op` interface.
N)ÚSequence)Ú_dtype_mappingsÚiÚfÚsÚisÚfsÚssc                   ó^   a € ] tR t^t o Rt]V 3R lR l4       tV 3R lR ltV 3R ltRt	V t
R# )	ÚEncodedAttrsaÃ  Class to encode attributes from dictionary into lists of FX compatible attributes.

Since FX does not support dictionaries, we need to encode the attributes into
lists. This class provides a way to encode and decode the attributes.

Attributes:
    attr_keys: List of attribute keys.
    attr_types: List of attribute types. Values can be "i" (int), "f" (float),
        "s" (string), "is" (int sequence), "fs" (float sequence), or "ss" (string sequence).
    attr_pos: List of tuples representing the start and end positions of each
        attribute in the corresponding list.
    attr_ints: List of integer attributes.
    attr_floats: List of float attributes.
    attr_strs: List of string attributes.
c                óê   <€ V ^8„  d   QhRS[ S[S[S[,          S[,          S[,          S[S[,          ,          S[S[,          ,          S[S[,          ,          S[S[,          ,          3,          RR/# )é   ÚattrsÚreturnr   )ÚdictÚstrÚintÚfloatÚboolr   )ÚformatÚ__classdict__s   "€ÚYC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\torch\onnx\ops\_symbolic_impl.pyÚ__annotate__ÚEncodedAttrs.__annotate__7   s…   ø€ ÷ Eñ EáÙÙÙõáõñ õñ ‘s�mõ	ñ
 ‘u�oõñ ‘s�mõñ ‘t�nõðõ

ðEð 
ñEó    c           	     ó¢
  € V ! . . . . . . R 7      pVP                  4        EFT  w  r4VP                  P                  V4       \        V\        4      '       du   \        VP                  4      pVP                  P                  V4       VP                  P                  WU^,           34       VP                  P                  \        4       K«  \        V\        4      '       dv   \        VP                  4      pVP                  P                  V4       VP                  P                  WU^,           34       VP                  P                  \        4       EK6  \        V\        4      '       dv   \        VP                  4      pVP                  P                  V4       VP                  P                  WU^,           34       VP                  P                  \        4       EKÁ  \        V\         4      '       Edf   \        V4      ^ 8X  d   \#        RV 24      h\$        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d˜   \        VP                  4      pVP                  P'                  V Uu. uF  p\        V4      NK  	  up4       VP                  P                  WU\        V4      ,           34       VP                  P                  \(        4       EKÇ  \        V^ ,          \        4      '       d˜   \        VP                  4      pVP                  P'                  V Uu. uF  p\	        V4      NK  	  up4       VP                  P                  WU\        V4      ,           34       VP                  P                  \*        4       EK{  \        V^ ,          \        4      '       d˜   \        VP                  4      pVP                  P'                  V Uu. uF  p\        V4      NK  	  up4       VP                  P                  WU\        V4      ,           34       VP                  P                  \,        4       EK/  \#        RV 24      h\#        RV R\/        V4       24      h	  \        VP                  4      \        VP                  4      8w  d8   \1        R\        VP                  4       R	\        VP                  4       24      h\        VP                  4      \        VP                  4      8w  d8   \1        R
\        VP                  4       R	\        VP                  4       24      hV# u upi u upi u upi ))Ú	attr_keysÚ
attr_typesÚattr_posÚ	attr_intsÚattr_floatsÚ	attr_strszEmpty sequence for attribute c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5i)N)Ú
isinstancer   )Ú.0Úelems   & r   Ú	<genexpr>Ú)EncodedAttrs.from_dict.<locals>.<genexpr>a   s   é € Ð=¹1°4”z $¬×.Ð.»1ùs   ‚TFz(Unsupported sequence type for attribute zUnsupported attribute type for z: z5Mismatch between number of attribute keys and types: z != z9Mismatch between number of attribute keys and positions: )Úitemsr   Úappendr#   r   Úlenr   r   r   Ú	_INT_TYPEr   r    Ú_FLOAT_TYPEr   r!   Ú_STRING_TYPEr   Ú
ValueErrorÚanyÚextendÚ_FLOAT_SEQ_TYPEÚ_INT_SEQ_TYPEÚ_STRING_SEQ_TYPEÚtypeÚAssertionError)Úclsr   ÚencodedÚkÚvÚ	start_posr%   s   &&     r   Ú	from_dictÚEncodedAttrs.from_dict6   s  € ñ ØØØØØØô
ˆð —K‘K—M‰DˆAØ×Ñ×$Ñ$ QÔ'Ü˜!œS×!Ò!Ü × 1Ñ 1Ó2�	Ø×!Ñ!×(Ñ(¨Ô+Ø× Ñ ×'Ñ'¨ÀµMÐ(BÔCØ×"Ñ"×)Ñ)¬)Ö4Ü˜Aœu×%Ò%Ü × 3Ñ 3Ó4�	Ø×#Ñ#×*Ñ*¨1Ô-Ø× Ñ ×'Ñ'¨ÀµMÐ(BÔCØ×"Ñ"×)Ñ)¬+×6Ü˜Aœs×#Ò#Ü × 1Ñ 1Ó2�	Ø×!Ñ!×(Ñ(¨Ô+Ø× Ñ ×'Ñ'¨ÀµMÐ(BÔCØ×"Ñ"×)Ñ)¬,×7Ü˜Aœx×(Ó(Ü�q“6˜Q”;Ü$Ð'DÀQÀCÐ%HÓIÐIß“3Ñ=¹1Ó=—3—3’3Ñ=¹1Ó=×=Ò=Ü # G×$7Ñ$7Ó 8�IØ×'Ñ'×.Ñ.ÉÓ/JÉÀ´°d¶ÉÑ/JÔKØ×$Ñ$×+Ñ+¨YÄCÈÃFÕ8JÐ,KÔLØ×&Ñ&×-Ñ-¬o×>Ü  !¥¤c×*Ò*Ü # G×$5Ñ$5Ó 6�IØ×%Ñ%×,Ñ,ÁAÓ-FÁA¸D¬c°$®iÁAÑ-FÔGØ×$Ñ$×+Ñ+¨YÄCÈÃFÕ8JÐ,KÔLØ×&Ñ&×-Ñ-¬m×<Ü  !¥¤c×*Ò*Ü # G×$5Ñ$5Ó 6�IØ×%Ñ%×,Ñ,ÁAÓ-FÁA¸D¬c°$®iÁAÑ-FÔGØ×$Ñ$×+Ñ+¨YÄCÈÃFÕ8JÐ,KÔLØ×&Ñ&×-Ñ-Ô.>×?ä$Ð'OÐPQÈsÐ%SÓTÐTä Ð#BÀ1À#ÀRÌÈQËÀyÐ!QÓRÐRñM "ôN ˆw× Ñ Ó!¤S¨×);Ñ);Ó%<Ô<Ü ØGÌÈG×L]ÑL]ÓH^ÐG_Ð_cÔdgÐho×hzÑhzÓd{Ðc|Ð}óð ô ˆw× Ñ Ó!¤S¨×)9Ñ)9Ó%:Ô:Ü ØKÌCÐPW×PaÑPaÓLbÐKcÐcgÔhkÐls×l|Ñl|Óh}Ðg~Ðóð ð ˆùò3 0Kùò
 .Gùò
 .Gs   É=U
Ì1U
Ï%U
c                ó¶   <€ V ^8„  d   QhRS[ S[S[S[,          S[,          S[S[,          ,          S[S[,          ,          S[S[,          ,          3,          /# )r   r   )r   r   r   r   Úlist)r   r   s   "€r   r   r   ~   sJ   ø€ ÷ ñ á	ÙÙ‰e�‘cÕ™D¡�IÕ%©©U­Õ3±d¹3µiÕ?ð	Aõ
ñr   c                ó¼  € / p\        V P                  4       EF¿  w  r#V P                  V,          pV\        8X  d0   V P                  V P
                  V,          ^ ,          ,          W&   KS  V\        8X  d0   V P                  V P
                  V,          ^ ,          ,          W&   K�  V\        8X  d0   V P                  V P
                  V,          ^ ,          ,          W&   KÇ  V\        8X  dE   V P                  V P
                  V,          ^ ,          V P
                  V,          ^,           W&   EK  V\        8X  dE   V P                  V P
                  V,          ^ ,          V P
                  V,          ^,           W&   EKe  V\        8X  dE   V P                  V P
                  V,          ^ ,          V P
                  V,          ^,           W&   EK´  \        RV 24      h	  V# )zNConvert the encoded attributes back to a dictionary for creating an ONNX node.zUnsupported attribute type: )Ú	enumerater   r   r+   r   r   r,   r    r-   r!   r1   r2   r3   r.   )Úselfr   r   ÚkeyÚ	attr_types   &    r   Úto_dictÚEncodedAttrs.to_dict~   sj  € ð ð 	ô   §¡×/‰FˆAØŸ™¨Õ*ˆIØœIÔ%Ø!Ÿ^™^¨D¯M©M¸!Õ,<¸QÕ,?Õ@�“
ØœkÔ)Ø!×-Ñ-¨d¯m©m¸AÕ.>¸qÕ.AÕB�“
ØœlÔ*Ø!Ÿ^™^¨D¯M©M¸!Õ,<¸QÕ,?Õ@�“
ØœoÔ-Ø!×-Ñ-¨d¯m©m¸AÕ.>¸qÕ.AÀDÇMÁMÐRSÕDTÐUVÕDWÐX�”
ØœmÔ+Ø!Ÿ^™^¨D¯M©M¸!Õ,<¸QÕ,?À$Ç-Á-ÐPQÕBRÐSTÕBUÐV�”
ØÔ.Ô.Ø!Ÿ^™^¨D¯M©M¸!Õ,<¸QÕ,?À$Ç-Á-ÐPQÕBRÐSTÕBUÐV�”
ä Ð#?À	¸{Ð!KÓLÐLñ 0ð  ˆr   c                óØ   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[S[S[3,          ,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   r   r   r   r   r    r!   )r>   r   Útupler   r   )r   r   s   "€r   r   r      st   ø‡ ‚ ñ$ ‘C�yÑñ% ñ& ‘S•	Ññ' ñ( ‘5™™c˜•?Õ#Ñ#ñ) ñ* ‘C�yÑñ+ ñ, ‘e•Ññ- ñ. ‘C�yÑò/ r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úclassmethodr;   rD   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s3   ø‡ € ñð. ÷Eó ðE÷Nð ÷C ƒ r   r   zonnx_symbolic::_symbolica  (Tensor?[] inputs, str op_type, int onnx_dtype, *, SymInt[] shape, str[] attr_keys, str[] attr_types, int[][] attr_pos, int[] attr_ints, float[] attr_floats, str[] attr_strs, str[] metadata_props_keys, str[] metadata_props_values, str domain='', int? version=None) -> Tensor)Úmutates_argsÚschemaÚmetadata_props_keysÚmetadata_props_valuesÚdomainÚ Úversionc                ó8  € V ^8„  d   QhR\         \        P                  R,          ,          R\        R\        R\         \        \        P
                  ,          ,          R\         \        ,          R\         \        ,          R\         \        \        \        3,          ,          R	\         \        ,          R
\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\        R\        R,          R\        P                  /# )r   ÚinputsNÚop_typeÚ
onnx_dtypeÚshaper   r   r   r   r    r!   rT   rU   rV   rX   r   ©r   ÚtorchÚTensorr   r   ÚSymIntrG   r   )r   s   "r   r   r   §   së   € ÷ ñ Ü”U—\‘\ DÕ(Õ)ðäðô ðô
 ”Cœ%Ÿ,™,Õ&Õ'ðô œ�}ðô œ•ðô ”uœS¤#˜X•Õ'ðô œ�}ðô œ%•ðô œ�}ðô "¤#�ðô $¤C�=ðô ðô �4�Zðô  ‡\�\ñ!r   c                ó¶   a€ \         P                  ! S\        P                  9   V3R  l4       \         P                  ! V\        P                  S,          R7      # )c                  ó\   <€ S  R \        \        P                  P                  4       4       2# ©z3 is invalid as an ONNX data type. Valid values are ©r>   r   ÚONNX_DTYPE_TO_TORCH_DTYPEÚkeys©r\   s   €r   Ú<lambda>Ú_symbolic.<locals>.<lambda>º   óG   ø€ �:�,ÐQÔRVÔWf÷  XAñ  XA÷  XFñ  XFó  XHó  SIð  RJñ  Kr   ©Údtype©r_   Ú_checkr   rf   Úzeros©rZ   r[   r\   r]   r   r   r   r   r    r!   rT   rU   rV   rX   s   &&f$$$$$$$$$$$r   Ú	_symbolicrr   œ   sH   ø€ ô8 
‡L‚LØ”o×?Ñ?Ñ?ô 	Kôô �;Š;Ø”_×>Ñ>¸zÕJôð r   c                ó*  € V ^8„  d   QhR\         \        P                  ,          R\        R\        R\         \        \        P
                  ,          ,          R\         \        ,          R\         \        ,          R\         \        \        \        3,          ,          R\         \        ,          R	\         \        ,          R
\         \        ,          R\         \        ,          R\         \        ,          R\        R\        R,          R\        P                  /# )r   rZ   r[   r\   r]   r   r   r   r   r    r!   rT   rU   rV   rX   Nr   r^   )r   s   "r   r   r   Â   sæ   € ÷ ñ Ü”U—\‘\Õ"ðäðô ðô
 ”Cœ%Ÿ,™,Õ&Õ'ðô œ�}ðô œ•ðô ”uœS¤#˜X•Õ'ðô œ�}ðô œ%•ðô œ�}ðô "¤#�ðô $¤C�=ðô ðô �4�Zðô  ‡\�\ñ!r   c                ó¶   a€ \         P                  ! S\        P                  9   V3R  l4       \         P                  ! V\        P                  S,          R7      # )c                  ó\   <€ S  R \        \        P                  P                  4       4       2# rd   re   rh   s   €r   ri   Ú_.<locals>.<lambda>Õ   rk   r   rl   rn   rq   s   &&f$$$$$$$$$$$r   Ú_rw   Á   sH   ø€ ô$ 
‡L‚LØ”o×?Ñ?Ñ?ô 	Kôô �;Š;Ø”_×>Ñ>¸zÕJôð r   z"onnx_symbolic::_symbolic_multi_outa  (Tensor?[] inputs, str op_type, int[] onnx_dtypes, *, SymInt[][] shapes, str[] attr_keys, str[] attr_types, int[][] attr_pos, int[] attr_ints, float[] attr_floats, str[] attr_strs, str[] metadata_props_keys, str[] metadata_props_values, str domain='', int? version=None) -> Tensor[]c                óz  € V ^8„  d   QhR\         \        P                  R,          ,          R\        R\         \        ,          R\         \         \        \        P
                  ,          ,          ,          R\         \        ,          R\         \        ,          R\         \        \        \        3,          ,          R	\         \        ,          R
\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\        R\        R,          R\        \        P                  ,          /# )r   rZ   Nr[   Úonnx_dtypesÚshapesr   r   r   r   r    r!   rT   rU   rV   rX   r   ©	r   r_   r`   r   r   ra   rG   r   r>   )r   s   "r   r   r   é   sù   € ÷  ñ  Ü”U—\‘\ DÕ(Õ)ð äð ô œ#•ð ô
 ”Xœc¤E§L¡LÕ0Õ1Õ2ð ô œ�}ð ô œ•ð ô ”uœS¤#˜X•Õ'ð ô œ�}ð ô œ%•ð ô œ�}ð ô "¤#�ð ô $¤C�=ð ô ð ô �4�Zð ô  
Œ%�,‰,Õñ! r   c                ón  aaa€ . p\         P                  ! \        S4      \        S4      8H  VV3R  l4       \        SS4       Fn  w  po\         P                  ! S\        P
                  9   V3R l4       VP                  \         P                  ! V\        P
                  S,          R7      4       Kp  	  V# )c                  ó:   <€ R \        S4       R\        S 4       R2# ©zNumber of shapes (z$) must match number of ONNX dtypes (Ú)©r*   ©ry   rz   s   €€r   ri   Ú%_symbolic_multi_out.<locals>.<lambda>ý   ó#   ø€ Ð$¤S¨£[ MÐ1UÔVYÐZeÓVfÐUgÐghÑir   c                  ó\   <€ S  R \        \        P                  P                  4       4       2# rd   re   rh   s   €r   ri   r‚     óG   ø€ �z�lÐ"UÔVZÔ[j÷  \Eñ  \E÷  \Jñ  \Jó  \Ló  WMð  VNñ  Or   rl   ©r_   ro   r*   Úzipr   rf   r)   rp   ©rZ   r[   ry   rz   r   r   r   r   r    r!   rT   rU   rV   rX   Úoutputsr]   r\   s   &&fd$$$$$$$$$$  @r   Ú_symbolic_multi_outrŠ   Þ   s“   ú€ ð8 €GÜ	‡L‚LÜˆF‹”s˜;Ó'Ñ'Ýiôô ! ¨Ö5ÑˆˆzÜ�ŠØœ/×CÑCÑCô Oô	
ð 	�‰Ü�KŠKØœ_×FÑFÀzÕRôö	
ñ 6ð €Nr   c                ól  € V ^8„  d   QhR\         \        P                  ,          R\        R\         \        ,          R\         \         \        \        P
                  ,          ,          ,          R\         \        ,          R\         \        ,          R\         \        \        \        3,          ,          R\         \        ,          R	\         \        ,          R
\         \        ,          R\         \        ,          R\         \        ,          R\        R\        R,          R\        \        P                  ,          /# )r   rZ   r[   ry   rz   r   r   r   r   r    r!   rT   rU   rV   rX   Nr   r{   )r   s   "r   r   r     sô   € ÷ "ñ "Ü”U—\‘\Õ"ð"äð"ô œ#•ð"ô
 ”Xœc¤E§L¡LÕ0Õ1Õ2ð"ô œ�}ð"ô œ•ð"ô ”uœS¤#˜X•Õ'ð"ô œ�}ð"ô œ%•ð"ô œ�}ð"ô "¤#�ð"ô $¤C�=ð"ô ð"ô �4�Zð"ô  
Œ%�,‰,Õñ!"r   c                ón  aaa€ . p\         P                  ! \        S4      \        S4      8H  VV3R  l4       \        SS4       Fn  w  po\         P                  ! S\        P
                  9   V3R l4       VP                  \         P                  ! V\        P
                  S,          R7      4       Kp  	  V# )c                  ó:   <€ R \        S4       R\        S 4       R2# r~   r€   r�   s   €€r   ri   rv   !  rƒ   r   c                  ó\   <€ S  R \        \        P                  P                  4       4       2# rd   re   rh   s   €r   ri   rv   &  r…   r   rl   r†   rˆ   s   &&fd$$$$$$$$$$  @r   rw   rw     s“   ú€ ð$ €GÜ	‡L‚LÜˆF‹”s˜;Ó'Ñ'Ýiôô ! ¨Ö5ÑˆˆzÜ�ŠØœ/×CÑCÑCô Oô	
ð 	�‰Ü�KŠKØœ_×FÑFÀzÕRôö	
ñ 6ð €Nr   rH   )rM   ÚdataclassesÚcollections.abcr   r_   Útorch.onnx.opsr   r+   r,   r-   r2   r1   r3   Ú	dataclassr   ÚlibraryÚ	custom_oprr   Úregister_fakerw   rŠ   rH   r   r   Ú<module>r–      s—  ðñó Ý $ã Ý *ð €	Ø€Ø€Ø€Ø€ØÐ ð ×Ñ÷{ð {ó ð{ð| ‡�×ÑØØð	ð	 ó 
ðð *,ðð ,.ðð ðð öó
ðð4 ×Ñðð *,ðð ,.ðð ðð öó ðð8 ‡�×ÑØ(Øð	ð	 ó 
ð ð *,ð ð ,.ð ð ð ð ö ó
ð ðF ×"Ñ"ð"ð *,ð"ð ,.ð"ð ð"ð ö"ó #ò"r   