+
    ÿäûjÍ  ã                   óT   € ^ RI HtHt ^ RIt^ RIHt  ! R R]P
                  4      tR# )é    )ÚAnyÚCallableN)Únnc                   óT   a a€ ] tR t^t oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚLambdaaì  Wrap a Python callable as an ``nn.Module`` that applies it to its input.

``f = Lambda(func)`` stores ``func``, and ``out = f(img, *args, **kwargs)`` returns ``func(img, *args, **kwargs)``
unchecked; it need not be a tensor. Use it to put a plain function into an ``nn.Sequential`` or an augmentation
container.

Args:
    func: Callable function.

Raises:
    TypeError: if ``func`` is not callable; raised from the constructor.

See Also:
    - :class:`~kornia.augmentation.container.ImageSequential`: chains augmentations; a ``Lambda`` runs in it as one
      step.

Example:
    >>> import kornia
    >>> x = torch.rand(1, 3, 5, 5)
    >>> f = Lambda(lambda x: kornia.color.rgb_to_grayscale(x))
    >>> f(x).shape
    torch.Size([1, 1, 5, 5])

c                ó8   <€ V ^8„  d   QhRS[ RS[3,          RR/# )é   Úfunc.ÚreturnN)r   r   )ÚformatÚ__classdict__s   "€ÚXC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\contrib\lambda_module.pyÚ__annotate__ÚLambda.__annotate__2   s$   ø€ ÷ ñ ™X c©3 hÕ/ð °Dñ ó    c                ó–   <€ \         SV `  4        \        V4      '       g#   \        R \	        V4      P
                  : 24      hWn        R# )z&Argument func should be callable, got N)ÚsuperÚ__init__ÚcallableÚ	TypeErrorÚtypeÚ__name__r
   )Úselfr
   Ú	__class__s   &&€r   r   ÚLambda.__init__2   s:   ø€ Ü‰ÑÔÜ˜�~Š~ÜÐDÄTÈ$ÃZ×EXÑEXÑD[Ð\Ó]Ð]àŽ	r   c                óF   <€ V ^8„  d   QhRS[ P                  RS[RS[RS[/# )r	   ÚimgÚargsÚkwargsr   )ÚtorchÚTensorr   )r   r   s   "€r   r   r   9   s-   ø€ ÷ /ñ /™5Ÿ<™<ð /±ð /¹sð /Ásñ /r   c                ó.   € V P                   ! V.VO5/ VB # )a  Return ``func(img, *args, **kwargs)``.

Args:
    img: the first positional argument of ``func``.
    *args: Additional positional arguments forwarded to ``func``.
    **kwargs: Additional keyword arguments forwarded to ``func``.

Returns:
    Whatever ``func`` returns.

©r
   )r   r   r   r   s   &&*,r   ÚforwardÚLambda.forward9   s   € ð �yŠy˜Ð.˜tÒ. vÑ.Ð.r   r#   )
r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r$   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r   r   s   @@r   r   r      s#   ù‡ € ñ÷2ó ÷/÷ /ð /r   r   )Útypingr   r   r    r   ÚModuler   © r   r   Ú<module>r0      s    ð÷$ !ã Ý ô-/ˆR�Y‰Yö -/r   