* Add support for LoRA to dnd.js
Adds support for LoRA to dnd.js (task restoration, use settings, etc.).
* Correct extensions for LoRA
---------
Co-authored-by: cmdr2 <shashank.shekhar.global@gmail.com>
The Inpainting toggle doesn't get restored at the very first attempt.
Repro steps:
1. Create a task with a source image and enable the inpainting toggle.
2. Copy the task to the clipboard
3. Refresh the page (F5)
4. Paste the task from the clipboard
Expected result:
The task gets restored and the toggle is ON.
Actual result:
The task is restored, but the toggle is OFF.
To fix that, we have to restore the toggle's state after loading the source image.
Here is a more robust fix for task restoration in dnd.js. Task restoration will fail if the JSON contains "use_face_correction": false, which can happen under some circumstances.
The fix checks if the filename passed to getModelPath is actually a string, which covers both the previous scenario (filename === null) and this new one (filename === false).
In dnd.js, when models are restored in the UI, there is code that strips the path from the model file name. Now that we allow models to be hosted in subfolders, this code break the task restoration (e.g. use settings, D&D, copy/paste) because "/my models/model.ckpt" becomes "model.ckpt", which won't be found.
https://discord.com/channels/1014774730907209781/1014780368890630164/1063726724573052948
parseContent(text) doesn't check the text content being passed actually described a task, which causes some corner case scenarios to break (image task settings are incorrectly cleared because an empty image task is created).
Only triggers events when there actually was a state change. Also opportunistically removed the hardcoded delay in favor of an even-driven flow, which makes the whole thing more robust and much more reactive.
* fixed tools for image editor to be more modular and made cursor an actual cursor change
* fixed eraser cursor positioning
* updated opacity to not have a 100 option
* separated clear into an actions section
* added history support for image editor. ctrl-z and ctrl-y both work now
* removed extra console log debugging stuff
* updated buttons style
* updated the button ui on the main page as requested
* updated with a bunch of bugfixes