Also, force the properties to be in a consistent order so that, for example, LoRA strength will always be the line below LoRA model. I've rearranged the properties so that they are saved in the same order that the properties are laid out in the UI
These new samplers will be hidden when diffusers is disabled.
Also, samplers that aren't implemented in diffusers yet will be disabled when using diffusers
* Toast notifications for ED
Adding support for toast notifications for use in Core and user plugins.
* Revert "Toast notifications for ED"
This reverts commit dde51c0cef.
* Toast notifications for ED
Adding support for toast notifications for use in Core and user plugins.
The splash screen will only be shown once.
The splash screen version number can be used to roll out a new splash screen, which will also be shown only once.
Clicking on the EasyAndroidLady icon shows the splash screen again.
Fixes#882
If the load of the model fails during the initialization, an attempt to render an
image using the same model fails because ED doesn't notice that the model has to
be loaded. This PR ensures that the model is being reloaded if the initial load
fails. If the second load attempt fails as well, the user will get a more helpful
error message than 'model not loaded yet'.
Long custom modifiers in a disabled state (e.g. right-click on the image tag) are properly restored as disabled but are incorrectly shown as "active" in the UI. I somehow missed that in https://github.com/cmdr2/stable-diffusion-ui/pull/1062, so here is the fix for that. This change only applies to plugins that try to restore image modifiers, no change to the regular UI.
* Moving to InvokeAI attention weighting syntax
* Fix restoration of disabled image tags
Fix the restoration inactive image tags.
* Undo feature UX cleanup
Just show the undo button when there's no task for a more consistent UI.
* cleanup code
* Revert "cleanup code"
This reverts commit 03199c5a4f.
* Update image-modifiers.js
* Update image-modifiers.js
* 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>
* Moving attention weighting to InvokeAI syntax
() and [] were actually ignored by the legacy parser, so moving the Ctrl+Wheel shortcut to the InvokeAI syntax of '+' and '-'.
* Moving attention weighting to InvokeAI syntax
() and [] were actually ignored by the legacy parser, so moving the Ctrl+Wheel shortcut to the InvokeAI syntax of '+' and '-'.
* Properly cleanup parenthesis
'(image tag)++' need to be trimmed to 'image tag'
* Add parenthesis as needed when adjusting weights
In the InvokeAI syntax, 'image modifier' must become '(image modifier)++' when adjusting weight.
* Code cleanup
Fix a regression introduced by PR 1003 that causes disabled image tags to be restored in an enabled state by the "image modifiers improvements" plugin. No change in the regular UX.
The old code had a 1.6% chance of name collisions (AAb/345 and AAB3/45 would generate the same filename) on Linux and 39% on Windows (base64 is case sensitive, Windows isn't).
This code uses base36 (0-9, A-Z) to avoid case issues. To avoid collisions on fast computers or multi GPU computers, the time resolution of the timestamp is changed from seconds to 0.1ms, and the image number isn't added to the timestamp but appended as an extra character. Due to the limitation of the timestamps to 7 characters, the timecode will repeat every 90 days. This shouldn't be an issue since most sessions will not last this long.
Changing the functionality to remove task from dom when all images have been removed. This will save system memory in the browser allowing better performance.
By default, uvicorn uses the 'Content Type' value from 'Computer\HKEY_CLASSES_ROOT\.css' for the Content-Type header in its responses. Some systems have this set to 'application/x-css', an outdated content type used in the early days of CSS. Modern browsers ignore stylesheets that don't have the content-type 'text/css'. This change hardcodes the Content-Type to 'text/css', ignoring the registry.
* Download all: Add Metadata download
* Harmonise capitalisation
* Add JSzip, download popup
* 'Save all' popup
- add ZIP download with JSON and folder support
- Popup to prevent accidental trigger of an image download
- Use FileSaver polyfill for better browser support
* remove debug output
* Make DownloadImages a tertiary button
* Refresh the image count as user types
Currently I have to change the focus for the image count to refresh. This change makes it immediate. I've been wondering if 'change' should merely be replaced by 'keyup' but decided against it for accessibility reasons (people who might be using accessibility tools with alternative input methods).
* Add a debounce
Setting a debounce of 300ms on keyup.
* Custom Image Modifiers dialog tweaks
Couple minor usability improvements for the custom image modifiers dialog:
- set the focus to the textbox when opening the dialog
- pressing the Escape key closes the dialog
* Adding keyboard shortcuts
Escape to cancel the changes, Ctrl+Enter to confirm the changes. No change to the existing UI behavior using the mouse.
* Make the overlay focusable
Allows the keyboard shortcuts to work if user clicks on the main window rather than the textbox itself.
* Disable spell and grammar correction
* Fix restoration of weighted tasks with truncated modifiers
* Reverting this change
Will create a separate PR for this as needed. Doesn't impact the other bug fix.
* Update utils.js
Image modifiers may be temporarily hidden by plugins like searchable modifier search box, and when restoring a task (e.g. use settings) the image modifier s copied with the hidden class set, which makes it look like it's missing.
By notifying plugins that the image tags have been refreshed, it allows it to act accordingly (in this case by making sure image tags are visible).
* Reverts the recent 'torch.mps' changes since .mps is only available in torch v2.0, which isn't yet released.
* Includes Hotfitx 984
* Enables 'cpu-only' option when running on Apple silicon.
Changes:
* autodetect if MPS is available and the pytorch version has MPS support.
* change logic from "is the device CPU?" to "is the device not CUDA?".
* set PYTORCH_ENABLE_MPS_FALLBACK=1
Known issues:
* Some samplers (eg DDIM) will fail on MPS unless forced to CPU-only mode
* Preserve full names for shortened modifiers
The PR https://github.com/cmdr2/stable-diffusion-ui/pull/779/files added code to preserve the full names of truncated image modifiers, but only in the "short image modifiers" code path. This PR fixes that by preserving the full car name for truncated modifier names too.
* Pick the full modifier name
The previous code selected the entire innerText from the modifier-car-label element, but for truncated modifiers this would also include the tooltip text. This modification fixes that by only picking specifically the full modifier name.
* Only pick the full modifier name
Previous code would pick up the tooltip text too, causing a mismatch of strings in the comparison.
* Display the truncated image modifier names
What we process and compare is always the full image modifier string, but we still want to display a shortened string when applicable.
Currently one has to click on the model name to select a model. Clicking on the file icon won't work and doesn't do anything. This change fixes that behavior by allowing the user to click on either the model name or the file icon to select a model.
Some users on 4K screens zoom in their browser display, but this causes the editor buttons on the top right to be out of view, and since the editor is not scrollable, they have to zoom out to be able to hit 'save'.
This change fixes that by making the image editor window vertically scrollable if it gets too large. No UI change on smaller screens (e.g. phones).
This is purely a DOM update to be able to identify the custom category a given custom image modifier is part of, e.g. using .closest() from a custom modifier plugin. No UI change.
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.
The preview options button overlaps the image task container when the window is reduced because of the float:right property of the button. This technique makes the parent div grow as needed when it contains a floated element, resulting in cleaner display.
* Slider for preview image size
Add a slider to the system settings so that users can configure the max size of thumbnails
* Remove debug output
* Fix var definition
* Move slider to 'display settings' menu
* thumbnail slider CSS
Reloading of image tags with ((weight modifiers)) doesn't reuse the modifier card even if it exists, which means images are not restored either. This change fixes that behavior by ensuring proper matching of the tags with existing modifiers.
No change in existing UI behavior, this change allows image modifier plugins to (optionally) pass the card image as a base64-encoded image rather than a source file.