InvokeAI/invokeai/frontend/web
Lincoln Stein f060e321eb
NSFW checker and watermark nodes (#3923)
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ X] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission


## Have you discussed this change with the InvokeAI team?
- [ X] Yes
- [ ] No, because:

      
## Have you updated all relevant documentation?
- [X ] Yes
- [] No

## 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 `active` field
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-watermark` command, which is part of the
`invisible-watermark` library:

```
$ invisible-watermark -v -a decode -t bytes -m dwtDct -l 64 ./bluebird-watermark.png 
decode time ms: 14.129877090454102
InvokeAI
```

Note that the `-l` (length) argument is mandatory. It is set to 64 here
because the watermark `InvokeAI` is 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:
```
invisible_watermark: false
nsfw_checker: false
```
or at launch time with `--no-invisible_watermark` and
`--no-nsfw_checker`.
2023-07-26 10:14:10 -04:00
..
.husky feat(ui): migrate theming to chakra ui 2023-03-06 20:03:39 +11:00
.yarn/releases all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
config fix(ui): fix canvas crash by rolling back swagger-parser 2023-06-30 12:24:28 +10:00
dist rebuild schema 2023-07-24 08:25:39 -04:00
docs dummy commit to make github actions run 2023-06-04 22:55:35 +10:00
public/locales revert: Translation strings 2023-07-27 00:12:23 +10:00
scripts fix(ui): fix all circular dependencies 2023-07-22 22:48:39 +10:00
src NSFW checker and watermark nodes (#3923) 2023-07-26 10:14:10 -04:00
static move static into invokeai.frontend.web directory for dist install 2023-05-22 16:48:17 -04:00
tests Partial migration of UI to nodes API (#3195) 2023-04-22 13:10:20 +10:00
__init__.py Revert "Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram" 2023-03-06 14:29:39 +13:00
.eslintignore move static into invokeai.frontend.web directory for dist install 2023-05-22 16:48:17 -04:00
.eslintrc.js ui: gallery enhancements (#3752) 2023-07-13 20:31:10 +00:00
.gitignore build(ui): add yalc to gitignore 2023-05-11 11:55:51 +10:00
.prettierignore fix(ui): fix all eslint & prettier issues 2023-07-22 23:45:24 +10:00
.prettierrc.js feat(ui): migrate theming to chakra ui 2023-03-06 20:03:39 +11:00
.yarnrc all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
.yarnrc.yml all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
favicon.ico all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
index.html feat(ui): migrate theming to chakra ui 2023-03-06 20:03:39 +11:00
package.json chore(ui): bump chakra versions 2023-07-27 00:12:23 +10:00
tsconfig.json feat(ui): update openapi-fetch; fix upload issue 2023-07-07 16:36:42 +10:00
tsconfig.node.json feat(ui): improved node parsing 2023-06-26 11:53:54 +10:00
vite.config.ts build(ui): treeshake lodash via lodash-es 2023-04-28 21:56:43 +10:00
yarn.lock chore(ui): bump chakra versions 2023-07-27 00:12:23 +10:00