+
    9iF                     x    ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt ]! ]4      t ! R R]4      tR	# )
    )	getLogger)Fusion)FusionUtils)ndarray)	NodeProtoTensorProto	OnnxModelc                   t   a a ] tR t^t oV3R lV 3R lltV3R lR ltV3R lR ltV3R lR ltR	tVt	V ;t
# )
FusionShapec                    < V ^8  d   QhRS[ /# )   modelr	   )format__classdict__s   "c/var/www/html/photoedit/myenv/lib/python3.14/site-packages/onnxruntime/transformers/fusion_shape.py__annotate__FusionShape.__annotate__   s     & &i &    c                f   < \         SV `  VR R4       \        V4      V n        RV n        RV n        R# )ShapeConcatNF)super__init__r   utilsshape_infershape_infer_done)selfr   	__class__s   &&r   r   FusionShape.__init__   s0    2 '
 %r   c                4   < V ^8  d   QhRS[ RS[R,          /# )r   tensor_protoreturnN)r   int)r   r   s   "r   r   r      s       [ SSWZ r   c                    VP                   P                  P                  R 4      '       d4   \        VP                   P                  P                  P
                  4      # R# )shapeN)typetensor_typeHasFieldlenr&   dim)r   r"   s   &&r    get_dimensions_from_tensor_proto,FusionShape.get_dimensions_from_tensor_proto   sE    ((11'::|((44::>>??r   c                4   < V ^8  d   QhRS[ RS[R,          /# )r   
input_namer#   N)strr$   )r   r   s   "r   r   r      s       t r   c                B   V P                   P                  V4      pVe   \        V4      # V P                  '       g)   V P                   P	                  RR7      V n        RV n        V P
                  e-   V P                  V P
                  P                  V,          4      # R # )NT)update)r   	get_shaper*   r   infer_runtime_shaper   r,   	known_vi_)r   r/   r&   s   && r   get_dimensionsFusionShape.get_dimensions   s    

$$Z0u:$$$#zz==T=JD$(D!'889I9I9S9ST^9_``r   c                h   < V ^8  d   QhRS[ RS[S[S[S[ ,          3,          RS[S[S[ 3,          /# )r   concat_nodeinput_name_to_nodesoutput_name_to_node)r   dictr0   list)r   r   s   "r   r   r   ,   sE     A$ A$A$ "#tI"67A$ "#y.1	A$r   c                f   V P                   P                  4       p\        VP                  4      pR pR p\	        V4       EFx  pV P                   P                  V. ROV^ ^ .V4      p	V	f    R # V	w  rpV^ 8X  d   VP                  ^ ,          pVf.   VP                  ^ ,          pV P                  V4      V8w  d    R # MVP                  ^ ,          V8w  d    R # \        P                  ! V
R^ ^ R7      '       g    R # V^8  d$   \        P                  ! V
R^ .4      '       g    R # M'V P                  P                  V
^^ .4      '       g    R # V P                   P                  VP                  ^,          4      p\        V\        4      '       d*   VP                  ^8X  d   VP!                  4       V8X  d   EKx   R # 	  V P                   P#                  VP                  ^ ,          4      fH   V P                   P%                  VP                  ^ ,          V4       V P'                  R4       RV n        R # R # )Naxis)default_valueaxesReshapeT)	UnsqueezeGatherr   )r   get_opset_versionr*   inputrangematch_parent_pathoutputr6   r   check_node_attributer   check_node_input_valueget_constant_value
isinstancer   sizeitemfind_graph_outputreplace_input_of_all_nodesincrease_counterprune_graph)r   r9   r:   r;   opset_versioninputsrootshape_outputipath	unsqueezegatherr&   values   &&&&          r   fuseFusionShape.fuse,   s   , 

446[&&'vA:://0Aq	#	D |'+$IuAv$||A|{{1~&&t,6 7Q4'33IvqXYZZr!"77	6A3OO P zz88AsKKJJ11&,,q/BEug..5::?uzz|WXGXC F ::''(:(:1(=>FJJ11+2D2DQ2GV!!),#D Gr   )rS   r   r   r   )__name__
__module____qualname____firstlineno__r   r,   r6   r]   __static_attributes____classdictcell____classcell__)r   r   s   @@r   r   r      s5     & &  A$ A$ A$r   r   N)loggingr   fusion_baser   fusion_utilsr   numpyr   onnxr   r   
onnx_modelr
   r_   loggerr    r   r   <module>rn      s1      $  '  	8	\$& \$r   