9 Commits

Author SHA1 Message Date
Chenlei Hu
9bffd67fc9 Lint unused import (#5973)
* Lint unused import

* nit

* Remove unused imports

* revert fix_torch import

* nit
2024-12-09 15:24:39 -05:00
Denys Smirnov
675326c9ab Fix alpha in PorterDuffImageComposite. (#3411)
There were two bugs in PorterDuffImageComposite.

The first one is the fact that it uses the mask input directly as alpha, missing the conversion (`1-a`). The fix is similar to 83773598.

The second one is that all color composition formulas assume alpha premultiplied values, while the input is not premultiplied.

This change fixes both of these issue.
2024-06-04 16:37:11 -04:00
comfyanonymous
837735980f Fix SplitImageWithAlpha and JoinImageWithAlpha. 2023-10-08 15:52:10 -04:00
comfyanonymous
89c54095c4 JoinImageWithAlpha now works with any mask shape. 2023-10-04 15:54:34 -04:00
comfyanonymous
241f3fd93a Change a few things in #1578. 2023-10-04 15:43:41 -04:00
MoonRide303
ff93847989 Corrected joining images with alpha (for RGBA input), and checking scaling conditions 2023-10-04 19:04:52 +02:00
MoonRide303
9f9f688bec Adding default alpha when splitting RGB images 2023-10-04 19:04:52 +02:00
MoonRide303
1c06c81343 Change channel type to MASK (reduced redundancy, increased usability) 2023-10-04 19:04:52 +02:00
MoonRide303
a138e66970 Added support for Porter-Duff image compositing 2023-10-04 19:04:48 +02:00