-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Consolidate and generalize saturation/luminosity adjusters #4425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Now allows increasing and inverting. Accepts any color PIL format and channel designation.
|
@dunkeroni - This is technically elegant, but functionally less user friendly. I don't think the average user would know how to use this What are your thoughts on how we could make it more accessible? |
We can combine mode and channel to a single dropdown list. It would get a bit more wordy, but "Red (RGB)" and "Magenta (CMYK)" are at least clear in their effects. "Luminance (YCbCr)" is obscure but recognizable to the people who would have need of it. Method could also be split off to a separate node, so there would be an "Offset Image Channel" and a "Scale Image Channel" node. That would let the offset version accept an integer [-255, 255], which is a bit more correct. |
|
@hipsterusername take a look at the updated formats and let me know what you think. |
Previous math was unclear and had issues with 0 values.
|
This seems incredibly useful. @psychedelicious - Do you have any ideas for node version patterns when a node (or set of nodes) is superseded by a new set? Just have the new nodes start at v1, and not worry about it? |
|
@hipsterusername Yes, just start with |
|
Thanks @dunkeroni ! |
Rebase failed
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Description
Now allows increasing values (previous versions could only multiply by values <= 1)
Now allows inverting.
Now allows offsets in addition to multiplication.
Accepts any color PIL format and channel designation.
Now operates in PIL formats, does not need to convert to OpenCV and back.
This can be used to affect Hue (HSV channel 0) since PIL represents it as 8-bit, but it does not replace the Hue adjust node since Hue is a degree rotation and uses different math.
Update: Split into two nodes with human-readable inputs. Also applied more stringent type-casting in the code to avoid some oddities that were appearing with uint8 clipping.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Example node view:

Channel options list:

Added/updated tests?