You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
torchvision.transforms.v2.functional.gaussian_noise (and thus v2.GaussianNoise) currently stubs out PIL images:
raiseValueError("Gaussian Noise is not implemented for PIL images.")
The tensor kernels already support uint8 and float inputs. We should implement the PIL kernel the same way as gaussian_blur: convert with pil_to_tensor, run the existing image kernel, then convert back with to_pil_image.
Proposed change
Register a PIL kernel for gaussian_noise that reuses gaussian_noise_image.
Document that PIL images are supported (uint8 path via pil_to_tensor).
Replace the current negative PIL test with a positive one.
Activity
YeonwooSung commentedon Sep 5, 2026
Implemented in #9653