Skip to content

Conversation

@dunkeroni
Copy link
Contributor

Summary

Existing ColorCorrectInvocation does not work. It triggers an error if no mask is provided, and when a mask is provided the result is an imagechops.mulitply of the mask and the two inputs, not outputting any actual corrected region.

Refactored node has the following changes:

  1. Mask is now correctly optional
  2. Renamed inputs for increased clarity
  3. Blur Radius input and logic is removed: users have more precise mask blur options with other nodes
  4. Color correction applies to histograms instead of mean and variance
  5. Multiple options for correction channels: RGB, YCbCr, YCbCr-Chroma (color channels only), YCbCr-Luma (Brightness channel only)
image

Color space options will depend on use case. Since channels are corrected independently, the output can have combinations across multiple channels that do not appear in the inputs. This is a bigger issue in RGB, hence the option for YCbCr. From testing a few scenarios, RGB seems to do better when decreasing saturation/contrast, and YCbCr does better when restoring it.

Related Issues / Discussions

Closes #4770
Relevant discussions and mentions of broken node:
https://discord.com/channels/1020123559063990373/1130288930319761428/1424817011204292618
https://discord.com/channels/1020123559063990373/1345587047229816832/1422940609295159504
https://discord.com/channels/1020123559063990373/1178755835162267658/1178755835162267658

QA Instructions

Applied corrections for each colorspace option across multiple degradation methods and resolution combinations.

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added python PRs that change python files invocations PRs that change invocations frontend PRs that change frontend files labels Oct 9, 2025
Copy link
Contributor

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty

@psychedelicious psychedelicious merged commit bd4bb07 into invoke-ai:main Oct 9, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files invocations PRs that change invocations python PRs that change python files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Nodes: Color Correct node - "optional mask" is not optional

2 participants