InvokeAI/invokeai/frontend/web
psychedelicious af9f0e0963 feat(ui): cache control layer mask images
When invoking with control layers, we were creating and uploading the mask images on every enqueue, even when the mask didn't change. The mask image can be cached to greatly reduce the number of uploads.

With this change, we are a bit smarter about the mask images:
- Check if there is an uploaded mask image name
- If so, attempt to retrieve its DTO. Typically it will be in the RTKQ cache, so there is no network request, but it will make a network request if not cached to confirm the image actually exists on the server.
- If we don't have an uploaded mask image name, or the request fails, we go ahead and upload the generated blob
- Update the layer's state with a reference to this uploaded image for next time
- Continue as before

Any time we modify the mask (drawing/erasing, resetting the layer), we invalidate that cached image name (set it to null).

We now only upload images when we need to and generation starts faster.
2024-05-03 20:57:18 +10:00
..
.storybook chore(ui): lint 2024-04-19 09:32:56 -04:00
patches feat(ui): patch reselect to use lruMemoize only 2024-01-06 00:03:07 +11:00
public feat(ui): clearer viewer/editor context switching 2024-05-02 23:09:26 -04:00
scripts feat(ui): add script to clean translations 2024-03-14 11:38:29 +11:00
src feat(ui): cache control layer mask images 2024-05-03 20:57:18 +10:00
static/docs feat(ui): update assets 2024-01-12 08:02:59 +11:00
__init__.py Run python black 2023-07-28 09:46:44 -04:00
.eslintignore fix(ui): fix workflow editor model selector, excise ONNX 2024-01-03 13:18:50 +11:00
.eslintrc.js build(ui): restore i18n eslint rule 2024-03-01 10:42:33 +11:00
.gitignore tests(ui): enable vitest type testing 2024-03-01 10:42:33 +11:00
.prettierignore fix(ui): fix workflow editor model selector, excise ONNX 2024-01-03 13:18:50 +11:00
.prettierrc.js chore(ui): use new prettier config 2024-01-28 19:57:53 +11:00
index.html Add ID to the HTML link element 2024-04-15 07:54:36 +10:00
knip.ts Scope project files to src dir (enables --production) 2024-04-15 09:14:49 +10:00
package.json chore(ui): bump @invoke-ai/ui-library 2024-05-02 23:09:26 -04:00
pnpm-lock.yaml chore(ui): bump @invoke-ai/ui-library 2024-05-02 23:09:26 -04:00
README.md docs: move frontend docs to mkdocs 2024-03-13 22:43:20 +11:00
tsconfig.json chore(ui): lint 2024-03-01 10:42:33 +11:00
tsconfig.node.json fix(ui): fix package build 2024-03-01 10:42:33 +11:00
vite.config.mts build(ui): do not fail build on eslint error in dev mode 2024-03-01 10:42:33 +11:00