+
     åûj÷-  ã                   ó6  € ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
Ht ^ RIHtHt ]P                  ! ]4      t]! 0 Rm4      t]! 0 Rm4      tR R lt ! R R4      t]! R	R
R7      t]! RR
RR7      t]! RR
RR7      t]! RRR7      t]! RRR7      tR# )é    N)Ú
ModuleType)ÚAnyÚDictÚListÚOptional)ÚInstallationModeÚkornia_configc                ó$   € V ^8„  d   QhR\         /# ©é   Úreturn©Úbool)Úformats   "ÚPC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\core\external.pyÚ__annotate__r   %   s   € ÷ 	ñ 	œtñ 	ó    c                 ó@  €  \        \        P                  RJ;'       d_    \        P                  RJ;'       dE    \        P                  P	                  4       ;'       d    \        P                  P	                  4       4      #   \
        \        \        3 d     R# i ; i)a   Return whether ``input()`` can reach a person: stdin and stdout both exist, are open and are terminals.

``input()`` writes its question to stdout and reads the answer from stdin, so a redirected stdout
(``python train.py > log``) would hide the question while stdin waits for an answer.
NF)r   ÚsysÚstdinÚstdoutÚisattyÚAttributeErrorÚOSErrorÚ
ValueError© r   r   Ú_interactive_terminalr   %   sr   € ðÜ”C—I‘I TÐ)×sÐs¬c¯j©jÀÐ.D×sÐsÌÏÉ×IYÑIYÓI[×sÐsÔ`c×`jÑ`j×`qÑ`qÓ`sÓtÐtøÜœG¤ZÐ0ô Úðús!   ‚B  B º%B Á "B ÂBÂBc                   óÔ   a € ] tR t^1t o RtRV 3R lR llt]V 3R lR l4       tV 3R lR ltV 3R	 lR
 lt	V 3R lR lt
V 3R lR 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R# )Ú
LazyLoadera\  A class that implements lazy loading for Python modules.

This class defers the import of a module until an attribute of the module is accessed.
It helps in reducing the initial load time and memory usage of a script, especially when
dealing with large or optional dependencies that might not be used in every execution.

What happens when the module is missing is set by ``kornia.config.kornia_config.lazyloader.installation_mode``
(or the ``KORNIA_INSTALLATION_MODE`` environment variable); see :class:`kornia.config.InstallationMode`. By
default an ``ImportError`` names the kornia extra to install.

Attributes:
    module_name: The name of the module to be lazily loaded.
    module: The actual module object, initialized to None and loaded upon first access.
    extra: The name of the kornia optional-dependency extra that provides the module, if any.

Nc                ó@   <€ V ^8„  d   QhRS[ RS[RS[S[ ,          RR/# )r   Úmodule_nameÚdev_dependencyÚextrar   N)Ústrr   r   )r   Ú__classdict__s   "€r   r   ÚLazyLoader.__annotate__C   s/   ø€ ÷ 2ñ 2¡Cð 2¹ð 2ÉhÑWZÍmð 2Ðgkñ 2r   c                óF   € Wn         RV n        W n        W0n        RV n        R# )a  Initialize the LazyLoader with the name of the module.

Args:
    module_name: The name of the module to be lazily loaded.
    dev_dependency: Whether kornia's documentation build needs the module. If False, the Sphinx build of
        kornia's documentation (``docs/source/conf.py`` sets a ``__sphinx_build__`` builtin) does not import
        it: the loader stays empty there and attribute access raises ``AttributeError``. It has no effect
        elsewhere.
    extra: The name of the kornia optional-dependency extra that installs the module, e.g. ``"onnx"``.
        When set, the "not installed" messages tell the user to run ``pip install "kornia[<extra>]"``, and
        the ``"ask"`` and ``"auto"`` installation modes install that extra. Without it, nothing is installed.

N)r!   Úmoduler"   r#   Ú_install_error)Úselfr!   r"   r#   s   &&&&r   Ú__init__ÚLazyLoader.__init__C   s$   € ð 'ÔØ,0ˆŒØ,ÔØŒ
Ø-1ˆÖr   c                ó    <€ V ^8„  d   QhRS[ /# r   )r$   )r   r%   s   "€r   r   r&   X   s   ø€ ÷ >ñ >™sñ >r   c                óB   € V P                   e   RV P                    R2# R# )z=Return the trailing sentence of the "not installed" messages.z%Install it with: pip install "kornia[z]".z,Please install it to use this functionality.©r#   ©r*   s   &r   Ú_install_hintÚLazyLoader._install_hintW   s$   € ð �:‰:Ò!Ø:¸4¿:¹:¸,ÀcÐJÐJÙ=r   c                ó    <€ V ^8„  d   QhRS[ /# r   r   )r   r%   s   "€r   r   r&   ^   s   ø€ ÷ 
ñ 
¡ñ 
r   c                óÒ   € \         P                  P                  pV P                  f   R# V\        P
                  8X  d   R# V\        P                  8X  d   V P                  4       # R# )z^Decide, from the installation mode, whether to install the declared extra of a missing module.FT)r	   Ú
lazyloaderÚinstallation_moder#   r   ÚAUTOÚASKÚ_ask_to_install)r*   Úmodes   & r   Ú_should_installÚLazyLoader._should_install^   sU   € ô ×'Ñ'×9Ñ9ˆØ�:‰:ÒÙØÔ#×(Ñ(Ô(ÙØÔ#×'Ñ'Ô'Ø×'Ñ'Ó)Ð)Ùr   c                ó    <€ V ^8„  d   QhRS[ /# r   r   )r   r%   s   "€r   r   r&   j   s   ø€ ÷ ñ ¡ñ r   c                óp  € \        4       '       g   R# RV P                   RV P                   R2p \        V4      p VP	                  4       P                  4       pVR9   d   R# VR9   d   R# VR	9   d&   \        P                  \        P                  n
        R# \        R4      pKj    \         d     R# i ; i)
zeAsk on the terminal whether to install the declared extra; ``False`` without an interactive terminal.FúOptional dependency 'z=' is not installed. Install it now with `pip install "kornia[a  ]"`? [Y]es, [N]o, [A]ll (install every missing kornia extra without asking for the rest of this session). Set `kornia_config.lazyloader.installation_mode` or the KORNIA_INSTALLATION_MODE environment variable to 'raise' to never be asked, or to 'auto' to always install. TzPlease answer 'y', 'n' or 'a'. )ÚyÚyes)ÚnÚno)ÚaÚall)r   r!   r#   ÚinputÚstripÚlowerr   r7   r	   r5   r6   ÚEOFError)r*   ÚquestionÚanswerÚchoices   &   r   r9   ÚLazyLoader._ask_to_installj   s³   € ä$×&Ò&Ùà# D×$4Ñ$4Ð#5ð 68Ø8<¿
¹
°|ð DMðMð 	ð	Ü˜8“_ˆFØØŸ™›×-Ñ-Ó/�Ø˜\Ô)ÙØ˜[Ô(Ù Ø˜\Ô)ÜAQ×AVÑAV”M×,Ñ,Ô>ÙÜÐ@ÓA’øÜô 	Úð	ús#   ±1B& Á$B& Á-*B& ÂB& Â&B5Â4B5c                ó   <€ V ^8„  d   QhRR/# ©r   r   Nr   )r   r%   s   "€r   r   r&   „   s   ø€ ÷ :ñ : ñ :r   c                ó`  € RV P                    R2p\        P                  RRRV.p\        P	                  RWP
                  4        \        P                  ! VRR7       \        P                  ! 4         \        P                  ! T P
                  4      T n        R#   \        \        P                  3 d6   pR	T P
                   R
T RT 2T n
        \        T P                  4      ThRp?ii ; i  \         d4   pR	T P
                   RT R2T n
        \        T P                  4      ThRp?ii ; i)zýInstall the declared extra with this interpreter's pip and import the module.

Raises:
    ImportError: if pip fails or the module still cannot be imported. The failure is remembered, so later
        accesses raise it again without running pip again.

zkornia[Ú]z-mÚpipÚinstallz2Installing %s for the optional dependency '%s' ...T)Úcheckr?   z&' is not installed, and `pip install "z"` failed: Nz)' cannot be imported after `pip install "z"`.)r#   r   Ú
executableÚloggerÚinfor!   Ú
subprocessÚrunr   ÚCalledProcessErrorr)   ÚImportErrorÚ	importlibÚinvalidate_cachesÚimport_moduler(   )r*   ÚrequirementÚcommandÚes   &   r   Ú_install_extraÚLazyLoader._install_extra„   s%  € ð   §
¡
˜|¨1Ð-ˆÜ—>‘> 4¨°	¸;ÐGˆÜ�‰ÐHÈ+×WgÑWgÔhð	:Ü�NŠN˜7¨$Õ/ô 	×#Ò#Ô%ð	:Ü#×1Ò1°$×2BÑ2BÓCˆDŽKøô œ×6Ñ6Ð7ô 	:à'¨×(8Ñ(8Ð'9ð :!Ø!, ¨[¸¸ð=ð Ôô ˜d×1Ñ1Ó2¸Ð9ûð	:ûô ô 	:à'¨×(8Ñ(8Ð'9Ð9cÐdoÐcpÐptÐuð Ôô ˜d×1Ñ1Ó2¸Ð9ûð		:ús0   ÁB Á5%C/ ÂC,Â70C'Ã'C,Ã/D-Ã:.D(Ä(D-c                ó   <€ V ^8„  d   QhRR/# rO   r   )r   r%   s   "€r   r   r&       s   ø€ ÷ "ñ "�tñ "r   c                óŒ  € V P                   e   R# V P                  '       g=   \        \        RR4      '       d&   \        P                  RV P                   R24       R#  \        P                  ! V P                  4      V n         R#   \         d   pTp Rp?MRp?ii ; iT P                  e   \        T P                  4      Th T P                  4       pM/  \         d"   p\        T RT P                   R24      ThRp?ii ; iT'       g'   \        RT P                   R	T P                   24      ThT P                  4        R# )
a©  Import the module on first use.

A missing module is handled according to ``kornia_config.lazyloader.installation_mode`` (see
:class:`kornia.config.InstallationMode`): by default it raises an ImportError whose message names the kornia
extra to install.

Raises:
    ImportError: if the module is missing and is not installed.
    ValueError: if the module is missing and ``KORNIA_INSTALLATION_MODE`` holds an invalid value.

NÚ__sphinx_build__Fz&Sphinx detected, skipping loading of 'Ú'z4 It was needed for the missing optional dependency 'z'.r?   z' is not installed. )r(   r"   ÚgetattrÚbuiltinsrV   rW   r!   r\   r^   r[   r)   r;   r   r1   rb   )r*   ra   Úimport_errorrS   s   &   r   Ú_loadÚLazyLoader._load    s/  € ð �;‰;Ò"ÙØ×"×"Ð"¤w¬xÐ9KÈU×'SÒ'SÜ�K‰KÐ@À×AQÑAQÐ@RÐRSÐTÔUÙð	Ü#×1Ò1°$×2BÑ2BÓCˆDŒKÙøÜô 	Ø�Lûð	úà×ÑÒ*Ü˜d×1Ñ1Ó2¸ÐDð	 Ø×*Ñ*Ó,‰GøÜô 	 ÜØ�#ÐIÈ$×JZÑJZÐI[Ð[]Ð^óàð ûð	 ú÷ ÜØ'¨×(8Ñ(8Ð'9Ð9MÈd×N`ÑN`ÐMaÐbóàð ð 	×ÑÖs0   Á %B ÂBÂBÂBÃC ÃDÃ"C>Ã>Dc                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Úitemr   )r$   Úobject)r   r%   s   "€r   r   r&   Ä   s   ø€ ÷ *ñ *¡ð *©ñ *r   c                ó¾  € V\         9   d&   \        \        V 4      P                  : RV: 24      hVP	                  R4      '       dr   VP                  R4      '       d[   V\        9  dP   V P                  P                  R4      pVf&   \        \        V 4      P                  : RV: 24      h\        W!4      # V P                  4        \        V P                  V4      # )aÒ  Load the module (if not already loaded) and returns the requested attribute.

This method is called when an attribute of the LazyLoader instance is accessed.
It ensures that the module is loaded and then returns the requested attribute.

Protocol lookups (dunder names such as ``__wrapped__`` or ``__deepcopy__``, which ``copy``, ``pickle``,
``inspect.unwrap`` and doctest collection make) never import, install or ask: before the module is loaded
they raise ``AttributeError``. The module metadata ``__version__``, ``__file__``, ``__path__`` and ``__all__``
loads the module like any other attribute.

Args:
    item: The name of the attribute to be accessed.

Returns:
    The requested attribute of the loaded module.

z object has no attribute Ú__r(   )Ú_LOADER_ATTRIBUTESr   ÚtypeÚ__name__Ú
startswithÚendswithÚ_MODULE_METADATAÚ__dict__Úgetrh   rk   r(   )r*   rn   r(   s   && r   Ú__getattr__ÚLazyLoader.__getattr__Ä   s¸   € ð$ Ô%Ô%Ü ¤D¨£J×$7Ñ$7Ñ#:Ð:SÐTXÑS[Ð!\Ó]Ð]Ø�?‰?˜4× Ò  T§]¡]°4×%8Ò%8¸TÔIYÔ=YØ—]‘]×&Ñ& xÓ0ˆFØŠ~Ü$¬¨T«
×(;Ñ(;Ñ'>Ð>WÐX\ÑW_Ð%`ÓaÐaÜ˜6Ó(Ð(Ø�
‰
ŒÜ�t—{‘{ DÓ)Ð)r   c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# r   )r   r$   r   )r   r%   s   "€r   r   r&   à   s   ø€ ÷ ñ ™d¡3© 8�nñ r   c                óD   € V P                   P                  4       pRVR&   V# )zeReturn the loader's state for copy and pickle, without the module object (the copy imports it again).Nr(   )rx   Úcopy)r*   Ústates   & r   Ú__getstate__ÚLazyLoader.__getstate__à   s"   € à—‘×"Ñ"Ó$ˆØˆˆh‰Øˆr   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r   )r   r$   )r   r%   s   "€r   r   r&   æ   s   ø€ ÷  ñ  ™™c�ñ  r   c                óL   € V P                  4        \        V P                  4      # )aT  Load the module (if not already loaded) and returns the list of attributes of the module.

This method is called when the built-in dir() function is used on the LazyLoader instance.
It ensures that the module is loaded and then returns the list of attributes of the module.

Returns:
    list: The list of attributes of the loaded module.

)rk   Údirr(   r0   s   &r   Ú__dir__ÚLazyLoader.__dir__æ   s   € ð 	�
‰
ŒÜ�4—;‘;ÓÐr   )r)   r"   r#   r(   r!   )FN)rt   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r+   Úpropertyr1   r;   r9   rb   rk   rz   r€   r…   Ú__static_attributes__Ú__classdictcell__)r%   s   @r   r   r   1   so   ø‡ € ñ÷"2ò 2ð( ÷>ó ð>÷
ð 
÷ð ÷4:ð :÷8"ð "÷H*ð *÷8ð ÷ ö  r   r   ÚnumpyT)r"   z	PIL.ImageÚimage)r"   r#   ÚonnxÚ	diffusersÚsdr/   Úonnxruntime>   r#   r(   r!   r)   r"   >   Ú__all__Ú__file__Ú__path__Ú__version__)ri   r\   ÚloggingrX   r   Útypesr   Útypingr   r   r   r   Úkornia.configr   r	   Ú	getLoggerrt   rV   Ú	frozensetrr   rw   r   r   rŽ   ÚPILImager�   r‘   r“   r   r   r   Ú<module>rŸ      s    ðó$ Û Û Û Û 
Ý ß ,Ó ,ç 9à	×	Ò	˜8Ó	$€ñ ÒeÓfÐ áÒOÓPÐ õ	÷@ ñ @ ñL 	�7¨4Ô0€Ù�k°$¸gÔF€Ù�&¨°VÔ<€Ù�{¨$Ô/€	Ù˜¨fÔ5‚r   