+
     åûjœ  ã                   óx   € ^ RI Ht ^ RIt^ RIHt ^ RIHtHt R R ltR R lt ! R	 R
]P                  4      t
R# )é    )ÚUnionN)Únn)ÚKORNIA_CHECKÚKORNIA_CHECK_IS_TENSORc                ód   € V ^8„  d   QhR\         P                  R\         P                  R\        /# )é   ÚshapeÚtargetÚreturn)ÚtorchÚSizeÚbool)Úformats   "ÚOC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\enhance\core.pyÚ__annotate__r      s.   € ÷ Yñ Yœ%Ÿ*™*ð Y¬e¯j©jð Y¼Tñ Yó    c           	      ó  € \        V 4      \        V4      8”  d   R # \        ;QJ d8    R \        \        V 4      \        V4      4       4       F  '       d   K   R # 	  R# ! R \        \        V 4      \        V4      4       4       4      # )Fc              3   ó4   "  € T F  w  rV^V39   x € K  	  R# 5i)é   N© )Ú.0ÚdimÚtdims   &  r   Ú	<genexpr>Ú!_broadcasts_to.<locals>.<genexpr>   s   é € ÐXÑ1W¡I Cˆs�q˜$�iÖÓ1Wùs   ‚T)ÚlenÚallÚzipÚreversed)r	   r
   s   &&r   Ú_broadcasts_tor       s^   € Ü
ˆ5ƒz”C˜“KÔÙß‹3ÑX´´X¸e³_ÄhÈvÓFVÔ1WÓX�3Œ3ÐXŠ3ÐXˆ3ÑX´´X¸e³_ÄhÈvÓFVÔ1WÓXÓXÐXr   c                ó>  € V ^8„  d   QhR\         P                  R\        \        \         P                  3,          R\         P                  R\        \        \         P                  3,          R\        \        \         P                  3,          R\         P                  /# )r   Úsrc1ÚalphaÚsrc2ÚbetaÚgammar   )r   ÚTensorr   Úfloat)r   s   "r   r   r       sz   € ÷ 3.ñ 3.Ü
�,‰,ð3.ä”œŸ™Ð$Õ%ð3.ô �,‰,ð3.ô ””u—|‘|Ð#Õ
$ð	3.ô
 ”œŸ™Ð$Õ%ð3.ô ‡\�\ñ3.r   c                óþ  € \        V 4       \        V4       \        V P                  VP                  8H  RV P                   RVP                   24       RV3RV3RV33 F€  w  rV\        V\        P
                  4      '       g   K'  \        \        VP                  V P                  4      V R\        VP                  4       R\        V P                  4       R24       K‚  	  W,          W#,          ,           V,           # )	ax  Blend two tensors as a weighted sum.

``out = add_weighted(src1, alpha, src2, beta, gamma)`` returns ``src1 * alpha + src2 * beta + gamma`` for two
tensors of one shape, without clamping.

.. image:: _static/img/add_weighted.png

Convention:
    A tensor coefficient must broadcast to the shape of ``src1`` without enlarging it: a 0-d scalar, ``(C, 1, 1)``
    or a per-image ``(B, 1, 1, 1)`` weight. A ``(B,)`` weight lines up with the width axis, not the batch: it raises
    unless ``B`` equals ``W`` or 1, and then it weights columns. Use ``(B, 1, 1, 1)`` for one weight per image.

Args:
    src1: tensor of any shape.
    alpha: weight of ``src1``, a number or a tensor.
    src2: tensor with the shape of ``src1``.
    beta: weight of ``src2``, a number or a tensor.
    gamma: value added to the sum, a number or a tensor.

Returns:
    Weighted sum with the shape of ``src1``.

See Also:
    - :class:`AddWeighted`: the module form.

Example:
    >>> input1 = torch.rand(1, 1, 5, 5)
    >>> input2 = torch.rand(1, 1, 5, 5)
    >>> output = add_weighted(input1, 0.5, input2, 0.5, 1.0)
    >>> output.shape
    torch.Size([1, 1, 5, 5])

z)src1 and src2 have different shapes. Got z and r#   r%   r&   z with shape z% does not broadcast to the src shape Ú.)r   r   r	   Ú
isinstancer   r'   r    Útuple)r"   r#   r$   r%   r&   ÚnameÚcoefs   &&&&&  r   Úadd_weightedr/       sÞ   € ôP ˜4Ô Ü˜4Ô Ü�—‘˜tŸz™zÑ)Ð-VÐW[×WaÑWaÐVbÐbgÐhl×hrÑhrÐgsÐ+tÔuà Ð'¨&°$¨¸'À5Ð9IÓJ‰
ˆÜ�dœEŸL™L×)Ô)ÜÜ˜tŸz™z¨4¯:©:Ó6Ø�&˜¤U¨4¯:©:Ó%6Ð$7Ð7\Ô]bÐcg×cmÑcmÓ]nÐ\oÐopÐqöñ Kð �<˜$�+Õ%¨Õ-Ð-r   c                   óT   a a€ ] tR t^Vt 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	# )ÚAddWeighteda�  Blend two tensors as a weighted sum (module form).

``op = AddWeighted(alpha, beta, gamma)`` stores the coefficients and ``out = op(src1, src2)`` is
:func:`add_weighted` with them. A tensor coefficient is stored as a non-persistent buffer, or as a parameter if it
is an ``nn.Parameter``.

Convention:
    - See the convention block of :func:`add_weighted`.

Args:
    alpha: weight of ``src1``, a number or a tensor.
    beta: weight of ``src2``, a number or a tensor.
    gamma: value added to the sum, a number or a tensor.

Shape:
    - Input1: tensor of any shape.
    - Input2: tensor with the shape of Input1.
    - Output: same shape as Input1.

See Also:
    - :func:`add_weighted`: the one-call form.

Example:
    >>> input1 = torch.rand(1, 1, 5, 5)
    >>> input2 = torch.rand(1, 1, 5, 5)
    >>> output = AddWeighted(0.5, 0.5, 1.0)(input1, input2)
    >>> output.shape
    torch.Size([1, 1, 5, 5])

c                ó®   <€ V ^8„  d   QhRS[ S[S[P                  3,          RS[ S[S[P                  3,          RS[ S[S[P                  3,          RR/# )r   r#   r%   r&   r   N)r   r(   r   r'   )r   Ú__classdict__s   "€r   r   ÚAddWeighted.__annotate__v   s[   ø€ ÷ ñ Ù™5¡%§,¡,Ð.Õ/ðÙ7<¹UÁEÇLÁLÐ=PÕ7QðÙZ_Ñ`eÑgl×gsÑgsÐ`sÕZtðà	ñr   c                óH  <€ \         SV `  4        \        V\        P                  4      '       d6   \        V\
        P                  4      '       g   V P                  R VRR7       MWn        \        V\        P                  4      '       d6   \        V\
        P                  4      '       g   V P                  RVRR7       MW n	        \        V\        P                  4      '       d7   \        V\
        P                  4      '       g   V P                  RVRR7       R# W0n
        R# )r#   F)Ú
persistentr%   r&   N)ÚsuperÚ__init__r+   r   r'   r   Ú	ParameterÚregister_bufferr#   r%   r&   )Úselfr#   r%   r&   Ú	__class__s   &&&&€r   r8   ÚAddWeighted.__init__v   sÁ   ø€ ô 	‰ÑÔÜ�eœUŸ\™\×*Ò*´:¸eÄRÇ\Á\×3RÒ3RØ× Ñ  ¨%¸EÐ ÕBàŒJÜ�dœEŸL™L×)Ò)´*¸TÄ2Ç<Á<×2PÒ2PØ× Ñ  ¨¸%Ð Õ@àŒIÜ�eœUŸ\™\×*Ò*´:¸eÄRÇ\Á\×3RÒ3RØ× Ñ  ¨%¸EÐ ÖBàŽJr   c                óh   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[ P                  /# )r   r"   r$   r   )r   r'   )r   r3   s   "€r   r   r4   ‡   s3   ø€ ÷ Kñ K™EŸL™Lð K±·±ð KÁÇÁñ Kr   c                óX   € \        WP                  W P                  V P                  4      # )añ  Compute a weighted sum of two tensors with a scalar bias term.

This method is a module wrapper around :func:`add_weighted`, using the
``alpha``, ``beta``, and ``gamma`` values defined at initialization.

Args:
    src1: First input tensor.
    src2: Second input tensor. It must have the same shape as ``src1``.

Returns:
    A tensor with the same shape as the inputs, computed as
    ``src1 * alpha + src2 * beta + gamma`` with broadcasting applied
    where supported by :func:`add_weighted`.
)r/   r#   r%   r&   )r;   r"   r$   s   &&&r   ÚforwardÚAddWeighted.forward‡   s   € ô ˜D§*¡*¨d·I±I¸t¿z¹zÓJÐJr   )r#   r%   r&   )
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r8   r@   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r<   r3   s   @@r   r1   r1   V   s&   ù‡ € ñ÷>ó ÷"K÷ Kð Kr   r1   )Útypingr   r   r   Úkornia.core.checkr   r   r    r/   ÚModuler1   r   r   r   Ú<module>rM      s3   ðõ$ ã Ý ç BõYõ3.ôl@K�"—)‘)ö @Kr   