mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-21 00:35:38 +08:00
ImageInvert applied 1.0 - image across the whole tensor, so a 4 channel RGBA image came back with its transparency flipped: opaque pixels became transparent and vice versa. Alpha stores coverage, not color, so leave it alone and only invert RGB. Matches GIMP, ImageMagick and Blender, and the existing srgb_to_linear/hlg_to_linear handling in nodes_images.py. Reported in #5610.
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/