-
Notifications
You must be signed in to change notification settings - Fork 2.7k
NSFW checker and watermark nodes #3923
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
psychedelicious
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this all makes sense and implements the NSFW checks and watermark in a very nodely way. Requesting a number of small changes, and one larger design change.
invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildLinearTextToImageGraph.ts
Outdated
Show resolved
Hide resolved
invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasImageToImageGraph.ts
Show resolved
Hide resolved
- add `addNSFWCheckerToGraph` and `addWatermarkerToGraph` functions - use them in all linear graph creation - add state & toggles to settings modal to enable these - trigger queries for app config on socket connect - disable the nsfw/watermark booleans if we get the app config and they are not available
91e903c to
db48f32
Compare
|
feat(ui): add nsfw & watermark to linear ui
|
|
This is ready for review. NSFW & Watermarking functionalityIn Settings, there are toggles for NSFW checker and watermarker. There are 4 possible combinations of these two toggles:
Test the following with every combination AND for both NSFW and non-NSFW outputs:
Expected results:
NSFW & Watermarking installation/availability
|
- assets path has changed
needed to be updated after adding the nsfw checker node to the graph
|
Both nsfw and watermark options have been removed from |
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
This PR adds NSFW checker and invisible watermark fields. The NSFW checker takes an image input and produces an image output. If NSFW content is detected, the output image will be blurred and a "caution" icon pasted into its upper left corner. A boolean
activefield controls whether the checker is active. If turned off it simply returns a copy of the image.The invisible watermark node adds an invisible text to the image, defaulting to "InvokeAI". To decode the watermark use the
invisible-watermarkcommand, which is part of theinvisible-watermarklibrary:Note that the
-l(length) argument is mandatory. It is set to 64 here because the watermarkInvokeAIis 8 bytes/64 bits long. The length must match in order for the watermark to be decoded correctly.Both nodes are now incorporated into the linear Text2Image and Image2Image UIs, including the canvas. They are not implemented for inpaint currently.
The nodes can be disabled with configuration options:
or at launch time with
--no-invisible_watermarkand--no-nsfw_checker.