+
    åûjœ
  ã                   óJ   € ^ RI t ^ RIHtHtHt ^ RIHt ^ RIHtH	t	 R R lt
R# )é    N)ÚKORNIA_CHECK_IS_COLORÚKORNIA_CHECK_IS_TENSORÚKORNIA_CHECK_SHAPE)Ú_to_device_nonblocking)Ú_check_floating_imageÚ_clip_unit_freshc          
      ó¸   € V ^8„  d   QhR\         P                  R\         P                  R\         P                  R\         P                  R\         P                  /# )é   ÚimageÚr_shiftÚg_shiftÚb_shiftÚreturn)ÚtorchÚTensor)Úformats   "ÚTC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\enhance\shift_rgb.pyÚ__annotate__r      sP   € ÷ &fñ &f”U—\‘\ð &f¬E¯L©Lð &fÄ5Ç<Á<ð &fÔZ_×ZfÑZfð &fÔkp×kwÑkwñ &fó    c                ó�  € \        V R4       \        V 4       \        V RV P                   24       \	        V . RO4       WV.p\        \        P                  ! V^R7      P                  R^^^4      V P                  V P                  4      pW,           pVP                  4       '       d   \        V4      # VP                  ^ ^R7      # )a,  Add a shift to each color channel of an RGB image.

``out = shift_rgb(image, r_shift, g_shift, b_shift)`` adds the red, green and blue shifts to the channels of an RGB
image ``(B, 3, H, W)`` in :math:`[0, 1]` and clamps the result to :math:`[0, 1]`.

Convention:
    Ranks below three or a channel count other than three raise ``ImageError``. Other ranks that pass the
    color check but are not four raise ``ShapeError``. The three shifts must share the same shape.

Args:
    image: RGB image with shape ``(B, 3, H, W)``.
    r_shift: red shift with shape ``(B,)``, or ``(1,)`` for all images.
    g_shift: green shift with shape ``(B,)``, or ``(1,)`` for all images.
    b_shift: blue shift with shape ``(B,)``, or ``(1,)`` for all images.

Returns:
    Shifted image with shape ``(B, 3, H, W)``.

See Also:
    - :func:`adjust_brightness`: adds one factor to every channel.

Example:
    >>> image = torch.zeros(1, 3, 2, 2)
    >>> shift_rgb(image, torch.tensor([0.2]), torch.tensor([0.0]), torch.tensor([-0.1]))[0, :, 0, 0]
    tensor([0.2000, 0.0000, 0.0000])

Ú	shift_rgbzwith shape )Údim)ÚminÚmax)ÚBÚ3ÚHÚWéÿÿÿÿ)r   r   r   Úshaper   r   r   ÚstackÚviewÚdeviceÚdtypeÚis_floating_pointr   Úclamp_)r   r   r   r   ÚshiftsÚshiftÚshifteds   &&&&   r   r   r      s­   € ô8 ˜% Ô-Ü˜5Ô!Ü˜% ;¨u¯{©{¨mÐ!<Ô=Ü�uÒ2Ô3à Ð(€Fä"¤5§;¢;¨v¸1Ô#=×#BÑ#BÀ2ÀqÈ!ÈQÓ#OÐQV×Q]ÑQ]Ð_d×_jÑ_jÓk€EØ�m€Gà(/×(AÑ(A×(CÒ(CÔ˜GÓ$ÐeÈÏÉÐ\]ÐcdÈÓIeÐer   )r   Úkornia.core.checkr   r   r   Úkornia.core.utilsr   Úkornia.enhance.adjustr   r   r   © r   r   Ú<module>r.      s   ðó& ç _Ñ _Ý 4ß I÷&fr   