π Geometric Computer Vision Library for Spatial AI
The [0, 1] clamp of the kornia.enhance intensity ops, of the augmentations built on them, and of the linear and Gaussian illumination, plasma and snow augmentations now uses the one-sided derivative from inside the range at a result exactly on 0 or 1, on every torch version. That derivative was 0 on torch 2.14 and later and nonzero on earlier releases: adjust_brightness(x, 0.0), for example, returned its input with a zero gradient at black and white pixels. Plain torch.clamp still gives 0 on torch 2.14 and later; this is a Kornia convention, and a graph captured by torch.jit.trace or torch.export keeps the plain clamp. Values are unchanged, and forward-mode adjust_gamma now gives 0 at a black pixel for a gamma between 0 and 1 on every release.