Commit Graph

8378 Commits

Author SHA1 Message Date
psychedelicious
e6476e3c75 tidy(ui): remove unused stuff 2024-08-30 22:18:50 +10:00
psychedelicious
ac9b5f246d tidy(ui): reduce use of parseify util 2024-08-30 22:18:50 +10:00
psychedelicious
8bc72a2744 feat(ui): refine canvas entity list items & menus 2024-08-30 22:18:50 +10:00
psychedelicious
f76f1d89d7 feat(ui): canvas layer preview, revised reactivity for adapters 2024-08-30 22:18:50 +10:00
psychedelicious
7b54762b5e feat(ui): add SyncableMap
Can be used with useSyncExternal store to make a `Map` reactive.
2024-08-30 22:18:50 +10:00
psychedelicious
bc6faf6a6d tidy(ui): removed unused transform methods from canvasmanager 2024-08-30 22:18:50 +10:00
psychedelicious
e7ae1ac9b2 feat(ui): transform tool ux 2024-08-30 22:18:50 +10:00
psychedelicious
dcb436adb1 feat(ui): rough out canvas mode 2024-08-30 22:18:50 +10:00
psychedelicious
80f0441905 feat(ui): add canvas autosave checkbox 2024-08-30 22:18:50 +10:00
psychedelicious
8cde803654 fix(ui): memory leak when getting image DTO
must unsubscribe!
2024-08-30 22:18:50 +10:00
psychedelicious
62445680ad feat(ui): rework settings menu 2024-08-30 22:18:50 +10:00
psychedelicious
7685e36886 feat(ui): no entities fallback buttons 2024-08-30 22:18:50 +10:00
psychedelicious
4c196844bd perf(ui): optimize gallery image delete button rendering 2024-08-30 22:18:50 +10:00
psychedelicious
b36159bda4 feat(ui): remove "solid" background option 2024-08-30 22:18:50 +10:00
psychedelicious
b02948d49a tidy(ui): organise files and classes 2024-08-30 22:18:50 +10:00
psychedelicious
f442d206be tidy(ui): abstract compositing logic to module 2024-08-30 22:18:50 +10:00
psychedelicious
21ed6bccd8 fix(ui): fix canvas cache property access 2024-08-30 22:18:50 +10:00
psychedelicious
143ce7f00b tidy(ui): clean up CanvasFilter class 2024-08-30 22:18:50 +10:00
psychedelicious
28e716139b tidy(ui): clean up a few bits and bobs 2024-08-30 22:18:50 +10:00
psychedelicious
80a7c0c521 tidy(ui): abstract canvas rendering logic to module 2024-08-30 22:18:50 +10:00
psychedelicious
255ad3d2ad tidy(ui): abstract caching logic to module 2024-08-30 22:18:50 +10:00
psychedelicious
089bc9c7d8 tidy(ui): abstract worker logic to module 2024-08-30 22:18:50 +10:00
psychedelicious
ee7dafaf57 tidy(ui): abstract stage logic into module 2024-08-30 22:18:50 +10:00
psychedelicious
516ecdb0ee feat(ui): add entity group hiding 2024-08-30 22:18:50 +10:00
psychedelicious
b77675f74d feat(ui): move all caching out of redux
While we lose the benefit of the caches persisting across reloads, this is a much simpler way to handle things. If we need a persistent cache, we can explore it in the future.
2024-08-30 22:18:50 +10:00
psychedelicious
eea5c8efad feat(ui): revised rasterization caching
- use `stable-hash` to generate stable, non-crypto hashes for cache entries, instead of using deep object comparisons
- use an object to store image name caches
2024-08-30 22:18:50 +10:00
psychedelicious
09f1aac3a3 feat(ui): revise filter implementation 2024-08-30 22:18:50 +10:00
psychedelicious
dd1dcb5eba fix(ui): add button to delete inpaint mask 2024-08-30 22:18:50 +10:00
psychedelicious
757bd62ebe feat(ui): add contexts/hooks to access entity adapters directly 2024-08-30 22:18:50 +10:00
psychedelicious
5a3127949b feat(ui): add CanvasManagerProviderGate
This context waits to render its children its until the canvas manager is available. Then its children have access to the manager directly via hook.
2024-08-30 22:18:50 +10:00
psychedelicious
ced934c0a3 feat(ui) do not set $canvasManager until ready 2024-08-30 22:18:50 +10:00
psychedelicious
c32445084f fix(ui): inpaint mask naming 2024-08-30 22:18:50 +10:00
psychedelicious
9f1af0cdaa feat(ui): efficient canvas compositing
Also solves issue of exporting layers at different opacities than what is visible
2024-08-30 22:18:50 +10:00
psychedelicious
0d26cab400 feat(ui): allow multiple inpaint masks
This is easier than making it a nullable singleton
2024-08-30 22:18:50 +10:00
psychedelicious
c8de2da3fc fix(ui): missing rasterization cache invalidations 2024-08-30 22:18:50 +10:00
psychedelicious
ca089a105e feat(ui): iterate on filter UI, flow 2024-08-30 22:18:50 +10:00
psychedelicious
22000918d6 fix(ui): rehydration data loss 2024-08-30 22:18:50 +10:00
psychedelicious
6affc28da4 feat(ui): sort log namespaces 2024-08-30 22:18:50 +10:00
psychedelicious
f659995e1c fix(ui): do not merge arrays by index during rehydration 2024-08-30 22:18:50 +10:00
psychedelicious
56fb3e738f fix(ui): clone parsed data during state rehydration
Without this, the objects and arrays in `parsed` could be mutated, and the log statment would show the mutated data.
2024-08-30 22:18:50 +10:00
psychedelicious
56d450a907 fix(ui): fix logger filter
was accidetnally replacing the filter instead of appending to it.
2024-08-30 22:18:50 +10:00
psychedelicious
d3cdcef36b fix(ui): race condition queue status
Sequence of events causing the race condition:
- Enqueue batch
- Invalidate `SessionQueueStatus` tag
- Request updated queue status via HTTP - batch still processing at this point
- Batch completes
- Event emitted saying so
- Optimistically update the queue status cache, it is correct
- HTTP request makes it back and overwrites the optimistic update, indicating the batch is still in progress

FIxed by not invalidating the cache.
2024-08-30 22:18:50 +10:00
psychedelicious
19434e73b4 fix(ui): handle opacity for masks 2024-08-30 22:18:50 +10:00
psychedelicious
f7b3df9583 feat(ui): default background to checkerboard 2024-08-30 22:18:50 +10:00
psychedelicious
4da4b3bd50 feat(ui): clean up logging namespaces, allow skipping namespaces 2024-08-30 22:18:50 +10:00
psychedelicious
e83513882a chore(ui): bump ui library 2024-08-30 22:18:50 +10:00
psychedelicious
5adc784b6b fix(ui): do not allow drawing if layer disabled 2024-08-30 22:18:50 +10:00
psychedelicious
f177513523 fix(ui): stale state causing race conditions & extraneous renders 2024-08-30 22:18:50 +10:00
psychedelicious
8ebcf79b1a fix(ui): do not clear buffer when rendering "real" objects 2024-08-30 22:18:50 +10:00
psychedelicious
c7e5f24704 tidy(ui): remove "filter" from CanvasImageState 2024-08-30 22:18:50 +10:00
psychedelicious
ab3eb32ec8 feat(ui): better editable title 2024-08-30 22:18:50 +10:00
psychedelicious
d76509e5cb fix(ui): stroke eraserline 2024-08-30 22:18:50 +10:00
psychedelicious
04f56aab82 feat(ui): restore transparency effect for control layers 2024-08-30 22:18:50 +10:00
psychedelicious
c7913cbbbb feat(ui): use text cursor for entity title 2024-08-30 22:18:50 +10:00
psychedelicious
0556468518 tidy(ui): remove extraneous logging in CanvasStateApi 2024-08-30 22:18:49 +10:00
psychedelicious
1c7ef827b6 feat(ui): better buffer commit logic 2024-08-30 22:18:49 +10:00
psychedelicious
5720ed4d64 feat(ui): render buffer separately from "real" objects 2024-08-30 22:18:49 +10:00
psychedelicious
7f05af4a68 fix(ui): pixelRect should always be integer 2024-08-30 22:18:49 +10:00
psychedelicious
6db615ed5a fix(ui): only update stage attrs when stage itself is dragged 2024-08-30 22:18:49 +10:00
psychedelicious
465f020c86 feat(ui): add line simplification
This fixes some awkward issues where line segments stack up.
2024-08-30 22:18:49 +10:00
psychedelicious
f05b77088f fix(ui): various things listening when they need not listen 2024-08-30 22:18:49 +10:00
psychedelicious
80a5abf1ad feat(ui): layer opacity via caching 2024-08-30 22:18:49 +10:00
psychedelicious
7a6e8de60f feat(ui): reset view fits all visible objects 2024-08-30 22:18:49 +10:00
psychedelicious
8364fa74cf fix(ui): rerenders when changing canvas scale 2024-08-30 22:18:49 +10:00
psychedelicious
14f4566dd0 fix(ui): do not render rasterized layer unless renderObjects=true 2024-08-30 22:18:49 +10:00
psychedelicious
6145378923 feat(ui): revise app layout strategy, add interaction scopes for hotkeys 2024-08-30 22:18:49 +10:00
psychedelicious
68e2606427 feat(ui): tweak mask patterns 2024-08-30 22:18:49 +10:00
psychedelicious
0f3eb04d1a fix(ui): dynamic prompts recalcs when presets are loaded 2024-08-30 22:18:49 +10:00
psychedelicious
4a355323b2 fix(ui): use style preset prompts correctly 2024-08-30 22:18:49 +10:00
psychedelicious
8601fbb4ea fix(ui): discard selected staging image not all other images 2024-08-30 22:18:49 +10:00
psychedelicious
db885aa180 fix(ui): respect image size in staging preview 2024-08-30 22:18:49 +10:00
psychedelicious
c18fb980a2 tidy(ui): cleanup after events change 2024-08-30 22:18:49 +10:00
psychedelicious
b630dbdf20 feat(ui): move socket event handling out of redux
Download events and invocation status events (including progress images) are very frequent. There's no real need for these to pass through redux. Handling them outside redux is a significant performance win - far fewer store subscription calls, far fewer trips through middleware.

All event handling is moved outside middleware. Cleanup of unused actions and listeners to follow.
2024-08-30 22:18:49 +10:00
psychedelicious
29ac1b5e01 fix(ui): rebase conflicts 2024-08-30 22:18:49 +10:00
psychedelicious
506d3b079e fix(ui): update compositing rect when fill changes 2024-08-30 22:18:49 +10:00
psychedelicious
0670e6b53a feat(ui): add canvas background style 2024-08-30 22:18:49 +10:00
psychedelicious
76124ea35b feat(ui): mask layers choose own opacity 2024-08-30 22:18:49 +10:00
psychedelicious
6eae3470cd feat(ui): mask fill patterns 2024-08-30 22:18:49 +10:00
psychedelicious
c7ba7ac876 build(ui): add vite types to tsconfig 2024-08-30 22:18:49 +10:00
psychedelicious
edc733abd9 fix(ui): do not smooth pixel data when using eyeDropper 2024-08-30 22:18:49 +10:00
psychedelicious
a56ded664e tidy(ui): tool components & translations 2024-08-30 22:18:49 +10:00
psychedelicious
31ace5fb0c feat(ui): rough out eyedropper tool
It's a bit slow bc we are converting the stage to canvas on every mouse move. Also need to improve the visual but it works.
2024-08-30 22:18:49 +10:00
psychedelicious
11010236b3 fix(ui): ip adapters work 2024-08-30 22:18:49 +10:00
psychedelicious
5f061ac1e2 feat(ui): rename layers 2024-08-30 22:18:49 +10:00
psychedelicious
72919fa34e feat(ui): revise entity menus 2024-08-30 22:18:49 +10:00
psychedelicious
d5ca99fc3c feat(ui): split control layers from raster layers for UI and internal state, same rendering as raster layers 2024-08-30 22:18:49 +10:00
psychedelicious
e49b72ee4e feat(ui): implement cache for image rasterization, rip out some old controladapters code 2024-08-30 22:18:49 +10:00
psychedelicious
abe8db8154 feat(ui, app): use layer as control (wip) 2024-08-30 22:18:49 +10:00
psychedelicious
e0e5941384 feat(ui): add contextmenu for canvas entities 2024-08-30 22:18:49 +10:00
psychedelicious
86e1f4e8b0 feat(ui): more better logging & naming 2024-08-30 22:18:49 +10:00
psychedelicious
447d873ef0 feat(ui): better logging w/ path 2024-08-30 22:18:49 +10:00
psychedelicious
b21d613ce4 feat(ui): always show marks on canvas scale slider 2024-08-30 22:18:49 +10:00
psychedelicious
fc91adb32f fix(ui): do not import button from chakra 2024-08-30 22:18:49 +10:00
psychedelicious
71885db5fd fix(ui): scaled bbox preview 2024-08-30 22:18:49 +10:00
psychedelicious
b88d14b3df feat(ui): tidy up atoms 2024-08-30 22:18:49 +10:00
psychedelicious
d98d35a8a8 feat(ui): convert all my pubsubs to atoms
its the same but better
2024-08-30 22:18:49 +10:00
psychedelicious
87bc0ebd73 feat(ui): add trnalsation 2024-08-30 22:18:49 +10:00
psychedelicious
7b6ba3f690 fix(ui): give up on thumbnail loading, causes flash during transformer 2024-08-30 22:18:49 +10:00
psychedelicious
b0d8948428 fix(ui): depth anything v2 2024-08-30 22:18:49 +10:00
psychedelicious
b32d681cee tidy(ui): remove unused code, comments 2024-08-30 22:18:49 +10:00
psychedelicious
11a66d1d09 fix(ui): staging area works 2024-08-30 22:18:49 +10:00
psychedelicious
e41987f08c feat(nodes): temp disable canvas output crop 2024-08-30 22:18:49 +10:00
psychedelicious
34b57ec188 fix(ui): max scale 1 when reset view 2024-08-30 22:18:49 +10:00
psychedelicious
d74843be31 feat(ui): better scale changer component, reset view functionality 2024-08-30 22:18:49 +10:00
psychedelicious
1216c6f9c9 fix(ui): img2img 2024-08-30 22:18:49 +10:00
psychedelicious
865b6017d3 feat(ui): add manual scale controls 2024-08-30 22:18:49 +10:00
psychedelicious
922a021821 fix(ui): do not await clearBuffer 2024-08-30 22:18:49 +10:00
psychedelicious
0b5f4cac57 feat(ui): dnd image into layer 2024-08-30 22:18:49 +10:00
psychedelicious
c988c58c63 fix(ui): do not await commitBuffer 2024-08-30 22:18:49 +10:00
psychedelicious
ceb8cbf59e fix(ui): properly destroy entities in manager cleanup 2024-08-30 22:18:49 +10:00
psychedelicious
52e9f43c46 tidy(ui): clearer component names for regional guidance 2024-08-30 22:18:49 +10:00
psychedelicious
4e5e7761fc tidy(ui): clearer component names for ip adapter 2024-08-30 22:18:49 +10:00
psychedelicious
9879999a65 tidy(ui): clearer component names for inpaint mask 2024-08-30 22:18:49 +10:00
psychedelicious
bedaca70a3 tidy(ui): clearer component names for control adapters 2024-08-30 22:18:49 +10:00
psychedelicious
2dd2225d2e feat(ui): simplify canvas list item headers 2024-08-30 22:18:49 +10:00
psychedelicious
d82031eec1 fix(ui): ip adapter list item 2024-08-30 22:18:49 +10:00
psychedelicious
e5f2860b74 tidy(ui): clean up unused logic 2024-08-30 22:18:49 +10:00
psychedelicious
fa3560bb61 feat(ui): clean up state, add mutex for image loading, add thumbnail loading 2024-08-30 22:18:49 +10:00
psychedelicious
9b23f6ce30 chore(ui): add async-mutex dep 2024-08-30 22:18:49 +10:00
psychedelicious
5d6aa6cfd5 feat(ui): txt2img, img2img, inpaint & outpaint working 2024-08-30 22:18:49 +10:00
psychedelicious
7d1819335f feat(ui): no padding on transformer outlines 2024-08-30 22:18:49 +10:00
psychedelicious
539e7a3f2d feat(ui): restore object count to layer titles 2024-08-30 22:18:49 +10:00
psychedelicious
1686924ac8 tidy(ui): "useIsEntitySelected" -> "useEntityIsSelected" 2024-08-30 22:18:49 +10:00
psychedelicious
556c1dc67b tidy(ui): move transformer statics into class 2024-08-30 22:18:49 +10:00
psychedelicious
00f7093e65 tidy(ui): massive cleanup
- create a context for entity identifiers, massively simplifying UI for each entity int he list
- consolidate common redux actions
- remove now-unused code
2024-08-30 22:18:49 +10:00
psychedelicious
79eb11dce9 perf(ui): do not add duplicate points to lines 2024-08-30 22:18:49 +10:00
psychedelicious
0bf48c0d41 feat(ui): up line tension to 0.3 2024-08-30 22:18:49 +10:00
psychedelicious
3f33e5f770 perf(ui): disable stroke, perfect draw on compositing rect 2024-08-30 22:18:49 +10:00
psychedelicious
da3888ba9e tidy(ui): remove unused code, initial image 2024-08-30 22:18:49 +10:00
psychedelicious
a2f91b1055 tidy(ui): remove unused state & actions 2024-08-30 22:18:49 +10:00
psychedelicious
d26095dfa1 feat(ui): region mask rendering 2024-08-30 22:18:49 +10:00
psychedelicious
83e786bd1e feat(ui): esc cancels drawing buffer
maybe this is not wanted? we'll see
2024-08-30 22:18:49 +10:00
psychedelicious
4cae12a507 fix(ui): render transformer over objects, fix issue w/ inpaint rect color 2024-08-30 22:18:49 +10:00
psychedelicious
d8e3708e0f fix(ui): brush preview fill for inpaint/region 2024-08-30 22:18:49 +10:00
psychedelicious
f4de2fd3b1 fix(ui): no objects rendered until vis toggled 2024-08-30 22:18:49 +10:00
psychedelicious
e1cb30bbb4 feat(ui): inpaint mask transform 2024-08-30 22:18:49 +10:00
psychedelicious
97e0edc549 fix(ui): layer accidental early set isFirstRender=false 2024-08-30 22:18:49 +10:00
psychedelicious
f4e66bf14f fix(ui): inpaint mask rendering 2024-08-30 22:18:49 +10:00
psychedelicious
a6a7fe8aba feat(ui): wip inpaint mask uses new API 2024-08-30 22:18:49 +10:00
psychedelicious
a273f72560 feat(ui): move updatePosition to transformer 2024-08-30 22:18:49 +10:00
psychedelicious
b5126f45d6 feat(ui): move resetScale to transformer 2024-08-30 22:18:49 +10:00
psychedelicious
ba3bb7cbf3 tidy(ui): more imperative naming 2024-08-30 22:18:49 +10:00
psychedelicious
608279487b tidy(ui): use imperative names for setters in stateapi 2024-08-30 22:18:49 +10:00
psychedelicious
72b5374916 fix(ui): commit drawing buffer on tool change, fixing bbox not calculating 2024-08-30 22:18:49 +10:00
psychedelicious
08b03212ca fix(ui): sync transformer when requesting bbox calc 2024-08-30 22:18:49 +10:00
psychedelicious
7e341a05a1 tidy(ui): rename union CanvasEntity -> CanvasEntityState 2024-08-30 22:18:49 +10:00
psychedelicious
e665d08ee1 fix(ui): request rect calc immediately on transform, hiding rect 2024-08-30 22:18:49 +10:00
psychedelicious
ba6362dc9d feat(ui): move bbox calculation to transformer 2024-08-30 22:18:49 +10:00
psychedelicious
48f0797c43 feat(ui): use set for transformer subscriptions 2024-08-30 22:18:49 +10:00
psychedelicious
640b0c4939 tidy(ui): clean up worker tasks when complete 2024-08-30 22:18:49 +10:00