+
    õäûj‰.  ã                   ó6  € R t ^ RIHtHt ^ RIHtHtHtHtH	t	H
t
HtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5H6t6H7t7H8t8H9t9H:t:H;t;H<t<H=t=H>t>H?t?H@t@HAtAHBtB ^ RICHDtDHEtE ^ RIFHGtG ^ RIHHItI ^ RIJHKtK ^ RILHMtMHNtNHOtOHPtPHQtQHRtRHStSHTtTHUtUHVtVHWtW ^ RIXHYtYHZtZ ^ R	I[H\t\ ^ R
I]H^t^ ^ RI_H`t`HataHbtbHctcHdtdHete . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNtfRf# )ga•  Build image, video and volume augmentation pipelines with recorded random parameters.

Transforms take float tensors, ``(B, C, H, W)`` images or ``(B, C, D, H, W)`` volumes; color transforms expect
values in ``[0, 1]``. ``AugmentationSequential`` applies one draw to images, masks, boxes and keypoints together,
and ``ImageSequential`` chains image-only transforms. In eager mode, ``aug._params`` holds the last draw, and
``aug(x, params=aug._params)`` replays it. Inverting a geometric warp cannot restore pixels lost to cropping or
resampling.

Which class to use:

Pipelines and policies:
    - ``AugmentationSequential``: coordinate image, mask, box and keypoint handlers.
    - ``ImageSequential``: chain image transforms, including ordinary PyTorch modules.
    - ``VideoSequential``: apply 2D transforms to video frames, optionally sharing a draw within each clip.
    - ``PatchSequential``: split an image into a grid and augment its patches.
    - ``ManyToManyAugmentationDispather``: send each input bundle to its corresponding pipeline.
    - ``ManyToOneAugmentationDispather``: produce several augmented views of one input bundle.
    - ``auto``: AutoAugment, RandAugment, TrivialAugment and their policy operations.
    - ``container``: pipeline classes and their parameter records.

Image size and geometry:
    - ``Resize``: resize to a target size; ``LongestMaxSize`` and ``SmallestMaxSize`` select the controlling side.
    - ``PadTo``: pad to a target size at the right and bottom, cropping oversized inputs by default.
    - ``CenterCrop``: take a centered crop; ``RandomCrop`` samples its position.
    - ``RandomResizedCrop``: sample a crop's area and aspect ratio, then resize it.
    - ``RandomHorizontalFlip`` and ``RandomVerticalFlip``: reverse columns or rows.
    - ``RandomAffine``: combine rotation, translation, scale and shear in one warp.
    - ``RandomRotation``: rotate by a sampled angle; ``RandomRotation90`` samples multiples of 90 degrees.
    - ``RandomShear`` and ``RandomTranslate``: sample only shear or translation.
    - ``RandomPerspective``: perturb the four image corners for a projective warp.
    - ``RandomElasticTransform``: warp with a smoothed random displacement field.
    - ``RandomThinPlateSpline``: warp with displaced control points.
    - ``RandomFisheye``: apply a radial distortion around a sampled center.

Color and contrast:
    - ``ColorJiggle``: combine additive brightness, multiplicative contrast and HSV saturation/hue adjustments.
    - ``ColorJitter``: use torchvision-compatible brightness, contrast and saturation formulas.
    - ``RandomBrightness`` and ``RandomContrast``: sample one brightness or contrast factor.
    - ``RandomHue`` and ``RandomSaturation``: change one HSV color component.
    - ``RandomGamma``: apply power-law intensity correction.
    - ``RandomGrayscale``: average channels with RGB luminance weights or equal weights, keeping the channel count.
    - ``RandomRGBShift``: shift the three RGB channels independently.
    - ``RandomPlanckianJitter``: vary RGB illumination along a color-temperature curve.
    - ``RandomChannelShuffle``: permute channels; ``RandomChannelDropout`` replaces selected channels.
    - ``RandomAutoContrast``: stretch each channel's intensity range.
    - ``RandomEqualize``: equalize a global histogram; ``RandomClahe`` uses local, contrast-limited histograms.
    - ``RandomInvert``: subtract values from a maximum; ``RandomSolarize`` inverts values above a threshold.
    - ``RandomPosterize``: reduce the number of retained intensity bits.
    - ``Normalize`` and ``Denormalize``: apply or undo channel-wise mean and standard-deviation normalization.

Blur, noise and occlusion:
    - ``RandomBoxBlur``: average a rectangular window; ``RandomGaussianBlur`` uses Gaussian weights.
    - ``RandomMedianBlur``: replace pixels with local medians.
    - ``RandomMotionBlur``: convolve with a sampled directional motion kernel.
    - ``RandomSharpness``: blend an image with its smoothed version.
    - ``RandomGaussianNoise``: add Gaussian noise; ``RandomSaltAndPepperNoise`` inserts dark and bright pixels.
    - ``RandomJPEG``: simulate JPEG compression at a sampled quality.
    - ``RandomErasing``: fill a sampled rectangle with a constant.
    - ``RandomDissolving``: apply a pretrained Stable Diffusion dissolving model.
    - ``RandomRain`` and ``RandomSnow``: synthesize rain streaks or a snow effect.

Spatially varying illumination:
    - ``RandomGaussianIllumination``: add a Gaussian illumination pattern.
    - ``RandomLinearIllumination``: add an edge-to-edge gradient.
    - ``RandomLinearCornerIllumination``: add a gradient starting from a corner.
    - ``RandomPlasmaBrightness``: shift brightness with a fractal map.
    - ``RandomPlasmaContrast``: modulate contrast with a fractal map.
    - ``RandomPlasmaShadow``: darken regions selected by a fractal map.

Mixing and rearranging images:
    - ``RandomMixUpV2``: blend paired images and return label weights when requested.
    - ``RandomCutMixV2``: copy sampled rectangles from paired images.
    - ``PatchMix``: copy a fixed-size square from a paired image.
    - ``RandomMosaic``: assemble tiles from several batch images.
    - ``RandomJigsaw``: permute an image's grid patches.
    - ``RandomTransplantation``: copy regions selected by a donor segmentation mask.

Volumes:
    - ``CenterCrop3D`` and ``RandomCrop3D``: take centered or randomly positioned volume crops.
    - ``RandomHorizontalFlip3D``, ``RandomVerticalFlip3D`` and ``RandomDepthicalFlip3D``: reverse width, height or
      depth.
    - ``RandomAffine3D``: sample a 3D affine warp; ``RandomRotation3D`` samples rotation alone.
    - ``RandomPerspective3D``: perturb the volume corners for a projective warp.
    - ``RandomEqualize3D``: equalize volume intensities; ``RandomMotionBlur3D`` applies a 3D motion kernel.
    - ``RandomTransplantation3D``: copy regions selected by a donor volume's segmentation mask.

Extending the module:
    - ``AugmentationBase2D`` and ``AugmentationBase3D``: share shape handling, sampling and application gates.
    - ``RigidAffineAugmentationBase2D`` and ``RigidAffineAugmentationBase3D``: add transformation-matrix tracking.
    - ``GeometricAugmentationBase2D`` and ``GeometricAugmentationBase3D``: implement spatial transforms.
    - ``IntensityAugmentationBase2D`` and ``IntensityAugmentationBase3D``: implement pixel-value transforms.
    - ``MixAugmentationBaseV2``: implement transforms that combine batch samples and dispatch data keys.
)ÚautoÚ	container)>Ú
CenterCropÚColorJiggleÚColorJitterÚDenormalizeÚLongestMaxSizeÚ	NormalizeÚPadToÚPatchMixÚRandomAffineÚRandomAutoContrastÚRandomBoxBlurÚRandomBrightnessÚRandomChannelDropoutÚRandomChannelShuffleÚRandomClaheÚRandomContrastÚ
RandomCropÚRandomCutMixV2ÚRandomDissolvingÚRandomElasticTransformÚRandomEqualizeÚRandomErasingÚRandomFisheyeÚRandomGammaÚRandomGaussianBlurÚRandomGaussianIlluminationÚRandomGaussianNoiseÚRandomGrayscaleÚRandomHorizontalFlipÚ	RandomHueÚRandomInvertÚRandomJigsawÚ
RandomJPEGÚRandomLinearCornerIlluminationÚRandomLinearIlluminationÚRandomMedianBlurÚRandomMixUpV2ÚRandomMosaicÚRandomMotionBlurÚRandomPerspectiveÚRandomPlanckianJitterÚRandomPlasmaBrightnessÚRandomPlasmaContrastÚRandomPlasmaShadowÚRandomPosterizeÚ
RandomRainÚRandomResizedCropÚRandomRGBShiftÚRandomRotationÚRandomRotation90ÚRandomSaltAndPepperNoiseÚRandomSaturationÚRandomSharpnessÚRandomShearÚ
RandomSnowÚRandomSolarizeÚRandomThinPlateSplineÚRandomTranslateÚRandomTransplantationÚRandomVerticalFlipÚResizeÚSmallestMaxSize)ÚAugmentationBase2DÚRigidAffineAugmentationBase2D)ÚGeometricAugmentationBase2D)ÚIntensityAugmentationBase2D)ÚMixAugmentationBaseV2)ÚCenterCrop3DÚRandomAffine3DÚRandomCrop3DÚRandomDepthicalFlip3DÚRandomEqualize3DÚRandomHorizontalFlip3DÚRandomMotionBlur3DÚRandomPerspective3DÚRandomRotation3DÚRandomTransplantation3DÚRandomVerticalFlip3D)ÚAugmentationBase3DÚRigidAffineAugmentationBase3D)ÚGeometricAugmentationBase3D)ÚIntensityAugmentationBase3D)ÚAugmentationSequentialÚImageSequentialÚManyToManyAugmentationDispatherÚManyToOneAugmentationDispatherÚPatchSequentialÚVideoSequentialrB   rR   rV   r   rG   r   r   r   rD   rT   rW   rE   rU   r   rX   rY   rF   r	   r
   r   rZ   r   rH   r   r   r   r   r   r   r   r   rI   r   rJ   r   r   r   rK   r   r   r   r   r   r   r   r    rL   r!   r"   r$   r#   r%   r&   r'   r(   r)   r*   rM   r+   rN   r,   r-   r.   r/   r0   r3   r1   r2   r4   rO   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   rP   r?   rQ   r@   rC   rS   rA   r[   r   r   N)gÚ__doc__Úkornia.augmentationr   r   Úkornia.augmentation._2dr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   Úkornia.augmentation._2d.baserB   rC   Ú&kornia.augmentation._2d.geometric.baserD   Ú&kornia.augmentation._2d.intensity.baserE   Ú kornia.augmentation._2d.mix.baserF   Úkornia.augmentation._3drG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   Úkornia.augmentation._3d.baserR   rS   Ú&kornia.augmentation._3d.geometric.baserT   Ú&kornia.augmentation._3d.intensity.baserU   Úkornia.augmentation.containerrV   rW   rX   rY   rZ   r[   Ú__all__© ó    ÚXC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\augmentation\__init__.pyÚ<module>rl      só  ðñ$\÷~ 0÷?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷ ?÷@ [Ý NÝ NÝ B÷÷ ÷ ñ ÷ [Ý NÝ N÷÷ ð[Øð[àð[ð ð[ð ð	[ð
 ð[ð ð[ð ð[ð ð[ð "ð[ð "ð[ð ð[ð "ð[ð "ð[ð ð[ð &ð[ð  %ð![ð" ð#[ð$ ð%[ð& ð'[ð( ð)[ð* ð+[ð, ð-[ð. ð/[ð0 ð1[ð2 ð3[ð4 ð5[ð6 ð7[ð8 ð9[ð: ð;[ð< ð=[ð> ð?[ð@ ðA[ðB ðC[ðD ðE[ðF ðG[ðH ðI[ðJ ðK[ðL ðM[ðN ðO[ðP ðQ[ðR ðS[ðT ðU[ðV !ðW[ðX ðY[ðZ ð[[ð\ ð][ð^ ð_[ð` ða[ðb ðc[ðd ðe[ðf ðg[ðh %ði[ðj ðk[ðl ðm[ðn ðo[ðp ðq[ðr ðs[ðt ðu[ðv ðw[ðx ðy[ðz ð{[ð| ð}[ð~ ð[ð@ ðA[ðB ðC[ðD ðE[ðF ðG[ðH ðI[ðJ ðK[ðL ðM[ðN ðO[ðP ðQ[ðR ðS[ðT ðU[ðV ðW[ðX ðY[ðZ ð[[ð\ ð][ð^ ð_[ð` ða[ðb ðc[ðd ðe[ðf ðg[ðh ði[ðj $ðk[ðl $ðm[ðn ðo[ðp ðq[ðr ðs[ðt ðu[‚rj   