InvokeAI/invokeai/frontend/web/src
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
..
app fix(ui): handle deleting images in use in generation tab 2024-05-02 23:09:26 -04:00
common feat(ui): rename tab identifiers 2024-05-02 23:09:26 -04:00
features feat(ui): cache control layer mask images 2024-05-03 20:57:18 +10:00
services tidy(ui): excise img2img tab 2024-05-02 23:09:26 -04:00
i18.d.ts fix(ui): improve IDE TS performance by not resolving JSON 2023-06-28 23:55:44 -04:00
i18n.ts feat(ui): handle proxy configs rewriting paths 2024-01-25 13:29:56 +11:00
index.ts tidy(ui): remove commented line 2024-01-22 09:37:26 +11:00
main.tsx chore(ui): format 2024-01-28 19:57:53 +11:00
vite-env.d.ts all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00