
    RЦi                        S SK JrJrJrJr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r/ SQr\" 5       rS	\\	R(                     4S
 jrS	\\	R(                     4S jrS r\" 5       rS rS\4S jrS rS\	R(                  S\\\   \\   4   4S jrS\	R(                  S\\\\4   \\   4   4S jrg! \ a    Sr Nf = f)    )CallableDictListOptionalUnionTupleTypeN)nn)create_feature_extractor)get_graph_node_namesTF)register_notrace_moduleis_notrace_moduleget_notrace_modulesregister_notrace_functionis_notrace_functionget_notrace_functionsr   r   modulec                 0    [         R                  U 5        U $ )zi
Any module not under timm.models.layers should get this decorator if we don't want to trace through it.
)_leaf_modulesaddr   s    N/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/timm/layers/_fx.pyr   r      s     fM    c                     U [         ;   $ N)r   r   s    r   r   r   &   s    ]""r   c                       [        [        5      $ r   )listr    r   r   r   r   *   s    r   c                 0    [         R                  U 5        U $ r   )_autowrap_functionsr   )
name_or_fns    r   r   r   2   s    J'r   funcc                     U [         ;   $ r   )r    )r"   s    r   r   r   7   s    &&&r   c                       [        [        5      $ r   )r   r    r   r   r   r   r   ;   s    #$$r   modelreturnc                 P    [        U [        [        5      [        [        5      S.S9$ )Nleaf_modulesautowrap_functionstracer_kwargs)_get_graph_node_namesr   r   r    )r%   s    r   r   r   ?   s(      /"&':";
 r   return_nodesc                 t    [         (       d   S5       e[        X[        [        5      [        [        5      S.S9$ )NzKPlease update to PyTorch 1.10+, torchvision 0.11+ for FX feature extractionr(   r+   )has_fx_feature_extraction_create_feature_extractorr   r   r    )r%   r.   s     r   r   r   I   s:    $$s&ss$$ /"&':";
 r   )typingr   r   r   r   r   r   r	   torchr
   %torchvision.models.feature_extractionr   r1   r   r-   r0   ImportError__all__setr   Moduler   r   r   r    r   r   r   strr   r   r   <module>r:      s    E E E  &kc $
	 DO #d299o #
 e 
'h '%		 eDItCy4H.I BII U4S>SWX[S\C\=] }  & %&s   B5 5C ?C 