+
    õäûjþ  ã                   ó  € R t ^ RIt^ RIHtHt ^ RIHt ^ RIHt RR.t	Rt
 ! R R]4      tR	 R
 lt ! R R4      t] ! R R4      4       t]! ]P                  P!                  RR4      ]P                  P!                  RR4      R7      tR# )aÿ  Choose how kornia handles a missing optional dependency, and where it caches downloads.

``kornia_config`` holds the process-wide settings. ``kornia_config.lazyloader.installation_mode`` takes an
:class:`InstallationMode` or its name in any case, and starts from the ``KORNIA_INSTALLATION_MODE`` environment
variable, or ``"raise"`` when it is unset. ``kornia_config.hub_cache_dir`` (``.kornia_hub``) holds the downloaded
sample images and ONNX configs, and ``kornia_config.hub_onnx_dir`` (default ``.kornia_hub/onnx_models``, set
separately) the ONNX models, both relative to the working directory.

Which object to use:

- What a missing optional dependency does (raise, ask, install): :class:`InstallationMode`.
- The settings object to change: ``kornia_config``.
N)Ú	dataclassÚfield)ÚStrEnum)ÚOptionalÚInstallationModeÚkornia_configÚKORNIA_INSTALLATION_MODEc                   ó&   € ] tR t^+tRtRtRtRtRtR# )r   a³  Choose whether a missing optional dependency raises, asks to install its kornia extra, or installs it.

``kornia_config.lazyloader.installation_mode = InstallationMode.AUTO``, or ``"auto"`` in any case, sets the mode for
the process, and the ``KORNIA_INSTALLATION_MODE`` environment variable sets it before kornia is imported. The mode
applies when a lazily imported dependency of ``kornia.core.external``, such as ``onnx`` or Pillow, is first used and
found missing. An invalid ``KORNIA_INSTALLATION_MODE`` value raises a ``ValueError`` at
that point. Members compare equal to their upper-case values (``InstallationMode.RAISE == "RAISE"``).

- ``RAISE`` (the default): raise an ``ImportError`` that names the kornia extra to install, for example
  ``pip install "kornia[onnx]"``.
- ``ASK``: on an interactive terminal (stdin and stdout), ask whether to install that extra. Without one, behave
  as ``RAISE``: in a CI job, a DataLoader worker, a script whose output is redirected, or a Jupyter notebook
  (the kernel's stdin is not a terminal), for example. Use ``AUTO`` there to install without asking.
- ``AUTO``: install the declared kornia extra instead of the import name, with the running interpreter's
  ``pip install "kornia[<extra>]"`` (for example ``kornia[image]``), and raise an ``ImportError`` if pip fails.

A dependency that declares no kornia extra is never installed: ``ASK`` and ``AUTO`` raise the same
``ImportError`` as ``RAISE`` for it.
ÚASKÚAUTOÚRAISE© N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r
   r   r   Ú__static_attributes__r   ó    ÚIC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\config.pyr   r   +   s   † ñð* €Cà€Dà„Er   c                ó<   € V ^8„  d   QhR\         R\        R\        /# )é   ÚvalueÚsourceÚreturn)ÚobjectÚstrr   )Úformats   "r   Ú__annotate__r   H   s"   € ÷ ñ ¤Fð ´Cð Ô<Lñ r   c           	     óú   € \        V \        4      '       g   \        R4      h \        V P	                  4       4      #   \
         d4    RP                  R \         4       4      p\        T RT : RT R24      Rhi ; i)aP  Return the :class:`InstallationMode` a case-insensitive string names.

Args:
    value: the value to parse, for example ``"raise"`` or ``InstallationMode.AUTO``.
    source: the name the value was given under, used in the error message.

Raises:
    TypeError: if ``value`` is not a string.
    ValueError: if ``value`` names no mode.

z<installation_mode must be a string or InstallationMode Enum.z, c              3   óh   "  € T F(  p\        VP                  P                  4       4      x € K*  	  R # 5i)N)Úreprr   Úlower)Ú.0Úmodes   & r   Ú	<genexpr>Ú+_parse_installation_mode.<locals>.<genexpr>Y   s'   é € ÐRÑAQ¸œD §¡×!1Ñ!1Ó!3×4Ð4ÓAQùs   ‚02Ú=z0 is not a valid installation mode. Choose from: z (any case).N)Ú
isinstancer   Ú	TypeErrorr   ÚupperÚ
ValueErrorÚjoin)r   r   Úchoicess   && r   Ú_parse_installation_moder.   H   s�   € ô �eœS×!Ò!ÜÐVÓWÐWðÜ §¡£Ó.Ð.øÜô Ø—)‘)ÑRÕAQÓRÓRˆÜØˆh�a˜‘yÐ PÐQXÐPYÐYeÐfó
àð	ðús	   £< ¼>A:c                   ó‚   a € ] tR t^_t o RtV 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       tRt	V t
R	# )
ÚLazyLoaderConfigaü  Configure lazy loading behavior for external dependencies.

The initial ``installation_mode`` is read from the ``KORNIA_INSTALLATION_MODE`` environment variable when it is
set and not empty, and is :attr:`InstallationMode.RAISE` otherwise. An invalid value does not stop kornia from
importing: reading ``installation_mode`` raises a ``ValueError`` that names the variable, the value and the valid
modes, which happens the first time a lazy loader handles a missing module, until a valid mode is set in code.
c                ó   <€ V ^8„  d   QhRR/# )r   r   Nr   )r   Ú__classdict__s   "€r   r   ÚLazyLoaderConfig.__annotate__h   s   ø€ ÷ 1ñ 1˜$ñ 1r   c                ó4  € \         P                  V n        R V n        \        P
                  P                  \        R4      P                  4       pV'       d    \        V\        4      V n        R # R #   \         d   p\        T4      T n         R p?R # R p?ii ; i)NÚ )r   r   Ú_installation_modeÚ_invalid_env_valueÚosÚenvironÚgetÚ_INSTALLATION_MODE_ENV_VARÚstripr.   r+   r   )ÚselfÚ	env_valueÚes   &  r   Ú__init__ÚLazyLoaderConfig.__init__h   st   € Ü"2×"8Ñ"8ˆÔØ15ˆÔÜ—J‘J—N‘NÔ#=¸rÓB×HÑHÓJˆ	ßð1Ü*BÀ9ÔNhÓ*i�Ö'ñ øô ô 1Ü*-¨a«&�×'Ò'ûð1ús   ÁA1 Á1BÁ<BÂBc                ó    <€ V ^8„  d   QhRS[ /# )r   r   )r   )r   r2   s   "€r   r   r3   s   s   ø€ ÷ 	'ñ 	'Ñ#3ñ 	'r   c                ó`   € V P                   e   \        V P                   4      hV P                  # )z¸How a missing optional dependency is handled; see :class:`InstallationMode`.

Raises:
    ValueError: if ``KORNIA_INSTALLATION_MODE`` held an invalid value and no mode was set since.

)r7   r+   r6   )r=   s   &r   Úinstallation_modeÚ"LazyLoaderConfig.installation_moder   s-   € ð ×"Ñ"Ò.Ü˜T×4Ñ4Ó5Ð5Ø×&Ñ&Ð&r   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   r   r   N)r   )r   r2   s   "€r   r   r3      s   ø€ ÷ 'ñ '¡sð '¨tñ 'r   c                ó6   € \        VR 4      V n        RV n        R# )rD   N)r.   r6   r7   )r=   r   s   &&r   rD   rE   ~   s   € ä":¸5ÐBUÓ"VˆÔØ"&ˆÖr   )r6   r7   N)r   r   r   r   r   r@   ÚpropertyrD   Úsetterr   Ú__classdictcell__©r2   s   @r   r0   r0   _   sB   ø‡ € ñ÷1ð 1ð ÷	'ó ð	'ð ×Ñ÷'ó ö'r   r0   c                   óJ   a € ] tR t^„t o RtRtRt]! ]R7      t	V 3R lt
RtV tR# )ÚKorniaConfigzConfigure Kornia's behavior.Úkornia_outputsú.kornia_hub)Údefault_factoryc                óV   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   # )r   Úhub_models_dirÚhub_onnx_dirÚ
output_dirÚhub_cache_dirÚ
lazyloader)r   r0   )r   r2   s   "€r   r   ÚKorniaConfig.__annotate__„   sF   ø‡ ‚ ñ Ññ	 ñ
 Ññ ñ Ñ&ñ ñ Ñ&ñ ñ !ÑJò r   r   N)r   r   r   r   r   rT   rU   r   r0   rV   Ú__annotate_func__r   rJ   rK   s   @r   rM   rM   „   s&   ø‡ € á&ð '€JØ&€MÙ#(Ð9IÔ#J€J÷ ƒ r   rM   rO   ÚmodelsÚonnx_models)rR   rS   )r   r8   Údataclassesr   r   Úenumr   Útypingr   Ú__all__r;   r   r.   r0   rM   Úpathr,   r   r   r   r   Ú<module>r`      s“   ðñ$ó 
ß (Ý Ý à˜Ð
/€ð 8Ð ô�wô õ:÷."'ñ "'ðJ ÷Kð Kó ðKñ Ø—7‘7—<‘< ¨xÓ8ÀrÇwÁwÇ|Á|ÐTaÐcpÓGqô‚r   