Commit Graph

464 Commits

Author SHA1 Message Date
caf8f0ae35 Removes console.log from redux-persist patch 2022-11-27 03:35:49 +13:00
cfb87bc116 WIP refactor to unified canvas 2022-11-27 03:35:49 +13:00
c0ad1b3469 Fixes: outpainting temp images show in gallery 2022-11-27 03:35:49 +13:00
4382cd0b91 Moves image uploading to HTTP
- It all seems to work fine
- A lot of cleanup is still needed
- Logging needs to be added
- May need types to be reviewed
2022-11-27 03:35:49 +13:00
1bc1085542 Fixes bbox not resizing in outpainting if partially off screen 2022-11-27 03:35:49 +13:00
82f6402d04 Hides staging area outline on mouseover prev/next 2022-11-27 03:35:49 +13:00
0e7b735611 Fixes error on inpainting paste back
`TypeError: 'float' object cannot be interpreted as an integer`
2022-11-27 03:35:49 +13:00
5304ef504c Fixes wonky canvas layer ordering & compositing 2022-11-27 03:35:49 +13:00
17b295871f Outpainting tab loads to empty canvas instead of upload 2022-11-27 03:35:49 +13:00
70dcfa1684 Builds fresh bundle 2022-11-27 03:35:49 +13:00
5d484273ed Fixes "use all" not setting variationAmount
Now sets to 0 when the image had variations.
2022-11-27 03:35:49 +13:00
179656d541 Adds staging area 2022-11-27 03:35:49 +13:00
73099af6ec Fixes disappearing canvas grid lines 2022-11-27 03:35:49 +13:00
c223d93b4d Fix gallery width size for Outpainting
Also fixes the canvas resizing failing n fast pushes
2022-11-27 03:35:49 +13:00
4e34194479 Increases CFG Scale max to 200 2022-11-27 03:35:49 +13:00
00e2674076 Add Metadata To Viewer 2022-11-27 03:35:49 +13:00
0a2e67df1a Hotkeys improvement 2022-11-27 03:35:49 +13:00
7831468304 Canvas styling 2022-11-27 03:35:49 +13:00
88d02585e7 Limits history to 256 for each of undo and redo 2022-11-27 03:35:49 +13:00
f82e82f1bb Debounce > 300ms 2022-11-27 03:35:49 +13:00
3f1360368d Fixes undo/redo 2022-11-27 03:35:49 +13:00
d5467e7db5 Attempts to fix redux-persist debounce patch 2022-11-27 03:35:49 +13:00
9284983429 Updates package.json to use redux-persist patches 2022-11-27 03:35:49 +13:00
bb79c78fe8 Fixes AttributeError: 'dict' object has no attribute 'invert_mask' 2022-11-27 03:35:49 +13:00
e3735ebb45 Adds debouncing 2022-11-27 03:35:49 +13:00
eb17dfdeaa Patches redux-persist and redux-deep-persist with debounced persists
Our app changes redux state very, very often. As our undo/redo history grows, the calls to persist state start to take in the 100ms range, due to a the deep cloning of the history. This causes very noticeable performance lag.

The deep cloning is required because we need to blacklist certain items in redux from being persisted (e.g. the app's connection status).

Debouncing the whole process of persistence is a simple and effective solution. Unfortunately, `redux-persist` dropped `debounce` between v4 and v5, replacing it with `throttle`. `throttle`, instead of delaying the expensive action until a period of X ms of inactivity, simply ensures the action is executed at least every X ms. Of course, this does not fix our performance issue. 

The patch is very simple. It adds a `debounce` argument - a number of milliseconds - and debounces `redux-persist`'s `update()` method (provided by `createPersistoid`) by that many ms.

Before this, I also tried writing a custom storage adapter for `redux-persist` to debounce the calls to `localStorage.setItem()`. While this worked and was far less invasive, it doesn't actually address the issue. It turns out `setItem()` is a very fast part of the process.

We use `redux-deep-persist` to simplify the `redux-persist` configuration, which can get complicated when you need to blacklist or whitelist deeply nested state. There is also a patch here for that library because it uses the same types as `redux-persist`.

Unfortunately, the last release of `redux-persist` used a package `flat-stream` which was malicious and has been removed from npm. The latest commits to `redux-persist` (about 1 year ago) do not build; we cannot use the master branch. And between the last release and last commit, the changes have all been breaking.

Patching this last release (about 3 years old at this point) directly is far simpler than attempting to fix the upstream library's master branch or figuring out an alternative to the malicious and now non-existent dependency.
2022-11-27 03:35:49 +13:00
1114ac97e2 Fixes (?) spacebar issues 2022-11-27 03:35:49 +13:00
c7ef41af54 Changes "Invert Mask" to "Preserve Masked Areas" 2022-11-27 03:35:49 +13:00
7075a17091 Implements invert mask 2022-11-27 03:35:49 +13:00
7f0fb47cf3 Remove save button from Canvas Controls (cleanup) 2022-11-27 03:35:49 +13:00
775f032c56 Mask Brush Preview now always at 0.5 opacity
The new mask is only visible properly at max opacity but at max opacity the brush preview becomes fully opaque blocking the view. So the mask brush preview no remains at 0.5 no matter what the Brush opacity is.
2022-11-27 03:35:49 +13:00
5410d42da0 Disable stage info in Inpainting Tab 2022-11-27 03:35:49 +13:00
e21e901fa2 Fixes inpainting + code cleanup 2022-11-27 03:35:49 +13:00
00385240e7 Adds mask design file 2022-11-27 03:35:49 +13:00
0a96d2a888 Fixes mask for FF 2022-11-27 03:35:49 +13:00
016551e036 Fixes warning about NaN? 2022-11-27 03:35:49 +13:00
b8bb46042c SVG mask 2022-11-27 03:35:49 +13:00
b44e9c7752 Changes mask to diagonal line pattern 2022-11-27 03:35:49 +13:00
8ed10c732b Revert "Fix Inpainting Canvas Rendering"
This reverts commit 114a74982944fbcd0feb3ce79e81fade4d3da147.
2022-11-27 03:35:49 +13:00
82a53782d0 Fix Inpainting Canvas Rendering 2022-11-27 03:35:49 +13:00
6adebf065f Fixes bad import 2022-11-27 03:35:49 +13:00
83f369053f Fixes issue with intermediates size
Sorry @lstein !
2022-11-27 03:35:49 +13:00
77d3839860 Do not show progress images in the viewer 2022-11-27 03:35:49 +13:00
c02a0da837 Builds fresh bundle 2022-11-27 03:35:49 +13:00
4f4c6bbe33 Fix delete hotkey not working 2022-11-27 03:35:49 +13:00
72ea5453ce Fix broken styling on the Clear Mask button 2022-11-27 03:35:49 +13:00
458081f9c9 Builds fresh bundle 2022-11-27 03:35:49 +13:00
d1fbe81a60 Pins react-hotkeys-hook to v4.0.2
See: https://github.com/JohannesKlauss/react-hotkeys-hook/issues/835
2022-11-27 03:35:49 +13:00
6c7191712f Rebases against development 2022-11-27 03:35:49 +13:00
3ad598761c support for wheel building; webserver broken 2022-11-18 19:34:28 +00:00