From 2b8c199e561089b8f37fc7348cf2987bfae2c25a Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 2 May 2023 10:52:58 +0530
Subject: [PATCH 01/61] Create PRIVACY.md
---
PRIVACY.md | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 PRIVACY.md
diff --git a/PRIVACY.md b/PRIVACY.md
new file mode 100644
index 00000000..e33e2180
--- /dev/null
+++ b/PRIVACY.md
@@ -0,0 +1,8 @@
+// placeholder until a more formal and legal-sounding privacy policy document is written. but the information below is true.
+
+This is a summary of how Easy Diffusion uses your data or tracks you:
+* The short answer is - Easy Diffusion does *not* use your data, and does not track you.
+* Easy Diffusion does not send your prompts or usage or analytics to anyone. There is no tracking. We don't even know how many people use Easy Diffusion, let alone their prompts.
+* Easy Diffusion fetches updates to the code whenever it starts up. It does this by contacting GitHub directly, via SSL (secure connection). Only your computer and GitHub and [this repository](https://github.com/cmdr2/stable-diffusion-ui) are involved, and no third party is involved. Some countries intercepts SSL connections, that's not something we can do much about.
+* Easy Diffusion fetches the models from huggingface.co and github.com, if they don't exist on your PC. For e.g. if the safety checker (NSFW) model doesn't exist, it'll try to download it.
+* Occasionally, antivirus software are known to *incorrectly* flag and delete some model files, which will result in Easy Diffusion re-downloading `pytorch_model.bin`. This *incorrect deletion* affects other Stable Diffusion UIs as well, like Invoke AI - https://itch.io/post/7509488
From 35d36f9eb300b0da640311805141b186e19b8ee7 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 2 May 2023 10:53:17 +0530
Subject: [PATCH 02/61] Update PRIVACY.md
---
PRIVACY.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PRIVACY.md b/PRIVACY.md
index e33e2180..9d813724 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -1,7 +1,7 @@
// placeholder until a more formal and legal-sounding privacy policy document is written. but the information below is true.
This is a summary of how Easy Diffusion uses your data or tracks you:
-* The short answer is - Easy Diffusion does *not* use your data, and does not track you.
+* The short answer is - Easy Diffusion does *not* use your data, and does *not* track you.
* Easy Diffusion does not send your prompts or usage or analytics to anyone. There is no tracking. We don't even know how many people use Easy Diffusion, let alone their prompts.
* Easy Diffusion fetches updates to the code whenever it starts up. It does this by contacting GitHub directly, via SSL (secure connection). Only your computer and GitHub and [this repository](https://github.com/cmdr2/stable-diffusion-ui) are involved, and no third party is involved. Some countries intercepts SSL connections, that's not something we can do much about.
* Easy Diffusion fetches the models from huggingface.co and github.com, if they don't exist on your PC. For e.g. if the safety checker (NSFW) model doesn't exist, it'll try to download it.
From c1e5c8dc86c7d3c921d4b6d87a3e18c34488db63 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 2 May 2023 11:00:57 +0530
Subject: [PATCH 03/61] Update PRIVACY.md
---
PRIVACY.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PRIVACY.md b/PRIVACY.md
index 9d813724..bda8a2a8 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -3,6 +3,6 @@
This is a summary of how Easy Diffusion uses your data or tracks you:
* The short answer is - Easy Diffusion does *not* use your data, and does *not* track you.
* Easy Diffusion does not send your prompts or usage or analytics to anyone. There is no tracking. We don't even know how many people use Easy Diffusion, let alone their prompts.
-* Easy Diffusion fetches updates to the code whenever it starts up. It does this by contacting GitHub directly, via SSL (secure connection). Only your computer and GitHub and [this repository](https://github.com/cmdr2/stable-diffusion-ui) are involved, and no third party is involved. Some countries intercepts SSL connections, that's not something we can do much about.
+* Easy Diffusion fetches updates to the code whenever it starts up. It does this by contacting GitHub directly, via SSL (secure connection). Only your computer and GitHub and [this repository](https://github.com/cmdr2/stable-diffusion-ui) are involved, and no third party is involved. Some countries intercepts SSL connections, that's not something we can do much about. GitHub does *not* share statistics (even with me) about how many people fetched code updates.
* Easy Diffusion fetches the models from huggingface.co and github.com, if they don't exist on your PC. For e.g. if the safety checker (NSFW) model doesn't exist, it'll try to download it.
* Occasionally, antivirus software are known to *incorrectly* flag and delete some model files, which will result in Easy Diffusion re-downloading `pytorch_model.bin`. This *incorrect deletion* affects other Stable Diffusion UIs as well, like Invoke AI - https://itch.io/post/7509488
From 49599dc3baef01f32d89dae809abaac2f17cb15e Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 2 May 2023 11:03:09 +0530
Subject: [PATCH 04/61] Update PRIVACY.md
---
PRIVACY.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PRIVACY.md b/PRIVACY.md
index bda8a2a8..ce1b4e1f 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -1,6 +1,6 @@
// placeholder until a more formal and legal-sounding privacy policy document is written. but the information below is true.
-This is a summary of how Easy Diffusion uses your data or tracks you:
+This is a summary of whether Easy Diffusion uses your data or tracks you:
* The short answer is - Easy Diffusion does *not* use your data, and does *not* track you.
* Easy Diffusion does not send your prompts or usage or analytics to anyone. There is no tracking. We don't even know how many people use Easy Diffusion, let alone their prompts.
* Easy Diffusion fetches updates to the code whenever it starts up. It does this by contacting GitHub directly, via SSL (secure connection). Only your computer and GitHub and [this repository](https://github.com/cmdr2/stable-diffusion-ui) are involved, and no third party is involved. Some countries intercepts SSL connections, that's not something we can do much about. GitHub does *not* share statistics (even with me) about how many people fetched code updates.
From 5a9e74cef765afe80e68ffc3800d91dac8c385c5 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 2 May 2023 11:05:58 +0530
Subject: [PATCH 05/61] Update PRIVACY.md
---
PRIVACY.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/PRIVACY.md b/PRIVACY.md
index ce1b4e1f..6c997997 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -5,4 +5,5 @@ This is a summary of whether Easy Diffusion uses your data or tracks you:
* Easy Diffusion does not send your prompts or usage or analytics to anyone. There is no tracking. We don't even know how many people use Easy Diffusion, let alone their prompts.
* Easy Diffusion fetches updates to the code whenever it starts up. It does this by contacting GitHub directly, via SSL (secure connection). Only your computer and GitHub and [this repository](https://github.com/cmdr2/stable-diffusion-ui) are involved, and no third party is involved. Some countries intercepts SSL connections, that's not something we can do much about. GitHub does *not* share statistics (even with me) about how many people fetched code updates.
* Easy Diffusion fetches the models from huggingface.co and github.com, if they don't exist on your PC. For e.g. if the safety checker (NSFW) model doesn't exist, it'll try to download it.
+* Easy Diffusion fetches code packages from pypi.org, which is the standard hosting service for all Python projects. That's where packages installed via `pip install` are stored.
* Occasionally, antivirus software are known to *incorrectly* flag and delete some model files, which will result in Easy Diffusion re-downloading `pytorch_model.bin`. This *incorrect deletion* affects other Stable Diffusion UIs as well, like Invoke AI - https://itch.io/post/7509488
From 843d22d0d42b5f5c64789b5016bad7b41310e37d Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Wed, 3 May 2023 14:53:18 +0530
Subject: [PATCH 06/61] Update README.md
---
README.md | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 3cb0bf8e..54d66221 100644
--- a/README.md
+++ b/README.md
@@ -17,9 +17,11 @@ Click the download button for your operating system:
**Hardware requirements:**
-- **Windows:** NVIDIA graphics card, or run on your CPU
-- **Linux:** NVIDIA or AMD graphics card, or run on your CPU
-- **Mac:** M1 or M2, or run on your CPU
+- **Windows:** NVIDIA graphics card, or run on your CPU.
+- **Linux:** NVIDIA or AMD graphics card, or run on your CPU.
+- **Mac:** M1 or M2, or run on your CPU.
+- Minimum 8 GB of system RAM.
+- Atleast 25 GB of space on the hard disk.
The installer will take care of whatever is needed. If you face any problems, you can join the friendly [Discord community](https://discord.com/invite/u9yhsFmEkB) and ask for assistance.
@@ -113,14 +115,6 @@ Useful for judging (and stopping) an image quickly, without waiting for it to fi
![Screenshot of task queue](https://user-images.githubusercontent.com/844287/217043984-0b35f73b-1318-47cb-9eed-a2a91b430490.png)
-
-# System Requirements
-1. Windows 10/11, or Linux. Experimental support for Mac is coming soon.
-2. An NVIDIA graphics card, preferably with 4GB or more of VRAM. If you don't have a compatible graphics card, it'll automatically run in the slower "CPU Mode".
-3. Minimum 8 GB of RAM and 25GB of disk space.
-
-You don't need to install or struggle with Python, Anaconda, Docker etc. The installer will take care of whatever is needed.
-
----
# How to use?
From 3f9ec378a0094d7f3d25114a7d5c73a36206fdb1 Mon Sep 17 00:00:00 2001
From: patriceac <48073125+patriceac@users.noreply.github.com>
Date: Thu, 4 May 2023 09:16:19 -0700
Subject: [PATCH 07/61] Fix restoration of inactive image modifiers
---
ui/media/js/image-modifiers.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/media/js/image-modifiers.js b/ui/media/js/image-modifiers.js
index fd4ecaf1..69f31ab1 100644
--- a/ui/media/js/image-modifiers.js
+++ b/ui/media/js/image-modifiers.js
@@ -246,7 +246,7 @@ function refreshInactiveTags(inactiveTags) {
overlays.forEach((i) => {
let modifierName = i.parentElement.getElementsByClassName("modifier-card-label")[0].getElementsByTagName("p")[0]
.dataset.fullName
- if (inactiveTags?.find((element) => element === modifierName) !== undefined) {
+ if (inactiveTags?.find((element) => trimModifiers(element) === modifierName) !== undefined) {
i.parentElement.classList.add("modifier-toggle-inactive")
}
})
From fec21408962b451c693cae271c57289ca350538f Mon Sep 17 00:00:00 2001
From: Olivia Godone-Maresca
Date: Thu, 4 May 2023 19:36:10 -0400
Subject: [PATCH 08/61] Allow grabbing the image to scroll zoomed in images
---
ui/media/css/image-modal.css | 8 +++++
ui/media/js/image-modal.js | 63 ++++++++++++++++++++++++++++++++++--
2 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/ui/media/css/image-modal.css b/ui/media/css/image-modal.css
index 1001807c..64096003 100644
--- a/ui/media/css/image-modal.css
+++ b/ui/media/css/image-modal.css
@@ -70,6 +70,14 @@
max-height: calc(100vh - (var(--popup-padding) * 2) - 4px);
}
+#viewFullSizeImgModal img:not(.natural-zoom) {
+ cursor: grab;
+}
+
+#viewFullSizeImgModal .grabbing img:not(.natural-zoom) {
+ cursor: grabbing;
+}
+
#viewFullSizeImgModal .content > div::-webkit-scrollbar-track, #viewFullSizeImgModal .content > div::-webkit-scrollbar-corner {
background: rgba(0, 0, 0, .5)
}
diff --git a/ui/media/js/image-modal.js b/ui/media/js/image-modal.js
index 3a97c4d8..28c1eaf2 100644
--- a/ui/media/js/image-modal.js
+++ b/ui/media/js/image-modal.js
@@ -63,15 +63,73 @@ const imageModal = (function() {
setZoomLevel(imageContainer.querySelector("img")?.classList?.contains("natural-zoom"))
)
- const state = {
+ const initialState = () => ({
previous: undefined,
next: undefined,
+
+ start: {
+ x: 0,
+ y: 0,
+ },
+
+ scroll: {
+ x: 0,
+ y: 0,
+ },
+ })
+
+ const state = initialState()
+
+ // Allow grabbing the image to scroll
+ const stopGrabbing = (e) => {
+ if(imageContainer.classList.contains("grabbing")) {
+ imageContainer.classList.remove("grabbing")
+ e?.preventDefault()
+ console.log(`stopGrabbing()`, e)
+ }
+ }
+
+ const addImageGrabbing = (image) => {
+ image?.addEventListener('mousedown', (e) => {
+ if (!image.classList.contains("natural-zoom")) {
+ e.stopPropagation()
+ e.stopImmediatePropagation()
+ e.preventDefault()
+
+ imageContainer.classList.add("grabbing")
+ state.start.x = e.pageX - imageContainer.offsetLeft
+ state.scroll.x = imageContainer.scrollLeft
+ state.start.y = e.pageY - imageContainer.offsetTop
+ state.scroll.y = imageContainer.scrollTop
+ }
+ })
+
+ image?.addEventListener('mouseup', stopGrabbing)
+ image?.addEventListener('mouseleave', stopGrabbing)
+ image?.addEventListener('mousemove', (e) => {
+ if(imageContainer.classList.contains("grabbing")) {
+ e.stopPropagation()
+ e.stopImmediatePropagation()
+ e.preventDefault()
+
+ // Might need to increase this multiplier based on the image size to window size ratio
+ // The default 1:1 is pretty slow
+ const multiplier = 1.0
+
+ const deltaX = e.pageX - imageContainer.offsetLeft - state.start.x
+ imageContainer.scrollLeft = state.scroll.x - (deltaX * multiplier)
+ const deltaY = e.pageY - imageContainer.offsetTop - state.start.y
+ imageContainer.scrollTop = state.scroll.y - (deltaY * multiplier)
+ }
+ })
}
const clear = () => {
imageContainer.innerHTML = ""
- Object.keys(state).forEach((key) => delete state[key])
+ Object.entries(initialState()).forEach(([key, value]) => state[key] = value)
+
+ stopGrabbing()
}
const close = () => {
@@ -95,6 +153,7 @@ const imageModal = (function() {
const src = typeof options === "string" ? options : options.src
const imgElem = createElement("img", { src }, "natural-zoom")
+ addImageGrabbing(imgElem)
imageContainer.appendChild(imgElem)
modalElem.classList.add("active")
document.body.style.overflow = "hidden"
From 2d1be6186e7037b146fe8062145e8593990db719 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Wed, 10 May 2023 20:19:17 +0530
Subject: [PATCH 09/61] sdkit 1.0.88 - Fix LoRA in low VRAM mode
---
scripts/check_modules.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check_modules.py b/scripts/check_modules.py
index 031f7d66..3fcfce14 100644
--- a/scripts/check_modules.py
+++ b/scripts/check_modules.py
@@ -18,7 +18,7 @@ os_name = platform.system()
modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1"),
- "sdkit": "1.0.87",
+ "sdkit": "1.0.88",
"stable-diffusion-sdkit": "2.1.4",
"rich": "12.6.0",
"uvicorn": "0.19.0",
From 08f44472f8bd0052fcb04cb443180b13cc961a6e Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Wed, 10 May 2023 20:20:59 +0530
Subject: [PATCH 10/61] changelog
---
CHANGES.md | 1 +
ui/index.html | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGES.md b/CHANGES.md
index 9fe2cff0..570d0c72 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -21,6 +21,7 @@
Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed.
### Detailed changelog
+* 2.5.36 - 10 May 2023 - (beta-only) Bug fix for "meta" error when using a LoRA in 'low' VRAM usage mode.
* 2.5.35 - 3 May 2023 - (beta-only) First round of VRAM Optimizations for the "Test Diffusers" version. This change significantly reduces the amount of VRAM used by the diffusers version during image generation. The VRAM usage is still not equal to the "non-diffusers" version, but more optimizations are coming soon.
* 2.5.34 - 22 Apr 2023 - Don't start the browser in an incognito new profile (on Windows). Thanks @JeLuf.
* 2.5.33 - 21 Apr 2023 - Install PyTorch 2.0 on new installations (on Windows and Linux).
diff --git a/ui/index.html b/ui/index.html
index be522689..d196b99d 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -30,7 +30,7 @@
Easy Diffusion
- v2.5.35
+ v2.5.36
From 566a83ce3f14af592903ef0417575229e3b5277a Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Thu, 11 May 2023 14:49:15 +0530
Subject: [PATCH 11/61] sdkit 1.0.89 - use half precision in test diffusers for
low vram usage mode'
---
scripts/check_modules.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check_modules.py b/scripts/check_modules.py
index 3fcfce14..b9797515 100644
--- a/scripts/check_modules.py
+++ b/scripts/check_modules.py
@@ -18,7 +18,7 @@ os_name = platform.system()
modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1"),
- "sdkit": "1.0.88",
+ "sdkit": "1.0.89",
"stable-diffusion-sdkit": "2.1.4",
"rich": "12.6.0",
"uvicorn": "0.19.0",
From 4bca739b3d64f3a5827475bd50c52a9025d6e31d Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Thu, 11 May 2023 14:52:30 +0530
Subject: [PATCH 12/61] changelog
---
CHANGES.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.md b/CHANGES.md
index 570d0c72..d6d93bd7 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -21,6 +21,7 @@
Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed.
### Detailed changelog
+* 2.5.36 - 11 May 2023 - (beta-only) Another VRAM optimization for "low" VRAM usage mode.
* 2.5.36 - 10 May 2023 - (beta-only) Bug fix for "meta" error when using a LoRA in 'low' VRAM usage mode.
* 2.5.35 - 3 May 2023 - (beta-only) First round of VRAM Optimizations for the "Test Diffusers" version. This change significantly reduces the amount of VRAM used by the diffusers version during image generation. The VRAM usage is still not equal to the "non-diffusers" version, but more optimizations are coming soon.
* 2.5.34 - 22 Apr 2023 - Don't start the browser in an incognito new profile (on Windows). Thanks @JeLuf.
From add05228bdb34278e0393cfb47ccbcd79392b9fc Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Thu, 11 May 2023 16:30:06 +0530
Subject: [PATCH 13/61] sdkit 1.0.91 - use slice size 1 for low vram usage
mode, to reduce VRAM usage
---
scripts/check_modules.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check_modules.py b/scripts/check_modules.py
index b9797515..8da111e0 100644
--- a/scripts/check_modules.py
+++ b/scripts/check_modules.py
@@ -18,7 +18,7 @@ os_name = platform.system()
modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1"),
- "sdkit": "1.0.89",
+ "sdkit": "1.0.91",
"stable-diffusion-sdkit": "2.1.4",
"rich": "12.6.0",
"uvicorn": "0.19.0",
From 1cba62af242c9ebfd1109b18bc0d8fafeda463a2 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Thu, 11 May 2023 16:30:32 +0530
Subject: [PATCH 14/61] changelog
---
CHANGES.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.md b/CHANGES.md
index d6d93bd7..6168fcc3 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -21,7 +21,7 @@
Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed.
### Detailed changelog
-* 2.5.36 - 11 May 2023 - (beta-only) Another VRAM optimization for "low" VRAM usage mode.
+* 2.5.36 - 11 May 2023 - (beta-only) More VRAM optimizations for "low" VRAM usage mode.
* 2.5.36 - 10 May 2023 - (beta-only) Bug fix for "meta" error when using a LoRA in 'low' VRAM usage mode.
* 2.5.35 - 3 May 2023 - (beta-only) First round of VRAM Optimizations for the "Test Diffusers" version. This change significantly reduces the amount of VRAM used by the diffusers version during image generation. The VRAM usage is still not equal to the "non-diffusers" version, but more optimizations are coming soon.
* 2.5.34 - 22 Apr 2023 - Don't start the browser in an incognito new profile (on Windows). Thanks @JeLuf.
From 7240c91db722b0c92803f62131f20a887276c5c7 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Fri, 12 May 2023 14:48:48 +0530
Subject: [PATCH 15/61] Update CHANGES.md
---
CHANGES.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.md b/CHANGES.md
index 6168fcc3..f2432505 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -23,6 +23,7 @@ Our focus continues to remain on an easy installation experience, and an easy us
### Detailed changelog
* 2.5.36 - 11 May 2023 - (beta-only) More VRAM optimizations for "low" VRAM usage mode.
* 2.5.36 - 10 May 2023 - (beta-only) Bug fix for "meta" error when using a LoRA in 'low' VRAM usage mode.
+* 2.5.35 - 8 May 2023 - Allow dragging a zoomed-in image (after opening an image with the "expand" button). Thanks @ogmaresca.
* 2.5.35 - 3 May 2023 - (beta-only) First round of VRAM Optimizations for the "Test Diffusers" version. This change significantly reduces the amount of VRAM used by the diffusers version during image generation. The VRAM usage is still not equal to the "non-diffusers" version, but more optimizations are coming soon.
* 2.5.34 - 22 Apr 2023 - Don't start the browser in an incognito new profile (on Windows). Thanks @JeLuf.
* 2.5.33 - 21 Apr 2023 - Install PyTorch 2.0 on new installations (on Windows and Linux).
From 8142fd0701d63a35dd8782ebd0b340d4b2d93aeb Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Fri, 12 May 2023 14:50:04 +0530
Subject: [PATCH 16/61] Update CHANGES.md
---
CHANGES.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.md b/CHANGES.md
index f2432505..d6ac5cda 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,7 @@
### Major Changes
- **Nearly twice as fast** - significantly faster speed of image generation. Code contributions are welcome to make our project even faster: https://github.com/easydiffusion/sdkit/#is-it-fast
- **Mac M1/M2 support** - Experimental support for Mac M1/M2. Thanks @michaelgallacher, @JeLuf and vishae.
+- **AMD support for Linux** - Experimental support for AMD GPUs on Linux. Thanks @DianaNites and @JeLuf.
- **Full support for Stable Diffusion 2.1 (including CPU)** - supports loading v1.4 or v2.0 or v2.1 models seamlessly. No need to enable "Test SD2", and no need to add `sd2_` to your SD 2.0 model file names. Works on CPU as well.
- **Memory optimized Stable Diffusion 2.1** - you can now use Stable Diffusion 2.1 models, with the same low VRAM optimizations that we've always had for SD 1.4. Please note, the SD 2.0 and 2.1 models require more GPU and System RAM, as compared to the SD 1.4 and 1.5 models.
- **11 new samplers!** - explore the new samplers, some of which can generate great images in less than 10 inference steps! We've added the Karras and UniPC samplers. Thanks @Schorny for the UniPC samplers.
From 45db4bb0367e237244ccf675c1f2b9c3522e5255 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Fri, 12 May 2023 16:49:13 +0530
Subject: [PATCH 17/61] sdkit 1.0.92 - more vram optimizations for
low,balanced,high - reduces VRAM usage by 20% (especially with larger images)
---
scripts/check_modules.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check_modules.py b/scripts/check_modules.py
index 8da111e0..21392011 100644
--- a/scripts/check_modules.py
+++ b/scripts/check_modules.py
@@ -18,7 +18,7 @@ os_name = platform.system()
modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1"),
- "sdkit": "1.0.91",
+ "sdkit": "1.0.92",
"stable-diffusion-sdkit": "2.1.4",
"rich": "12.6.0",
"uvicorn": "0.19.0",
From 366bc7275981f1b4d3eb76a40d0d1faa11764419 Mon Sep 17 00:00:00 2001
From: JeLuF
Date: Mon, 15 May 2023 17:01:21 +0200
Subject: [PATCH 18/61] Add GTX1630 to list of FP32 GPUs
https://discord.com/channels/1014774730907209781/1014774732018683926/1107677076233912340
---
ui/easydiffusion/device_manager.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/easydiffusion/device_manager.py b/ui/easydiffusion/device_manager.py
index 59c07ea3..5dd244b7 100644
--- a/ui/easydiffusion/device_manager.py
+++ b/ui/easydiffusion/device_manager.py
@@ -165,6 +165,7 @@ def needs_to_force_full_precision(context):
and (
" 1660" in device_name
or " 1650" in device_name
+ or " 1630" in device_name
or " t400" in device_name
or " t550" in device_name
or " t600" in device_name
From 7562a882f4699084c3e07a6ad69b04b513ca2ab9 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 16 May 2023 16:02:20 +0530
Subject: [PATCH 19/61] sdkit 1.0.93 - lower vram usage for balanced mode, by
using attention slice of 1
---
scripts/check_modules.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check_modules.py b/scripts/check_modules.py
index 21392011..18549217 100644
--- a/scripts/check_modules.py
+++ b/scripts/check_modules.py
@@ -18,7 +18,7 @@ os_name = platform.system()
modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1"),
- "sdkit": "1.0.92",
+ "sdkit": "1.0.93",
"stable-diffusion-sdkit": "2.1.4",
"rich": "12.6.0",
"uvicorn": "0.19.0",
From 1605c5fbccb46f66dae672bd8fb2f41e3e7989c6 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Tue, 16 May 2023 16:03:12 +0530
Subject: [PATCH 20/61] changelog
---
CHANGES.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.md b/CHANGES.md
index d6ac5cda..3b910ae6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -22,6 +22,7 @@
Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed.
### Detailed changelog
+* 2.5.36 - 16 May 2023 - (beta-only) More VRAM optimizations for "balanced" VRAM usage mode.
* 2.5.36 - 11 May 2023 - (beta-only) More VRAM optimizations for "low" VRAM usage mode.
* 2.5.36 - 10 May 2023 - (beta-only) Bug fix for "meta" error when using a LoRA in 'low' VRAM usage mode.
* 2.5.35 - 8 May 2023 - Allow dragging a zoomed-in image (after opening an image with the "expand" button). Thanks @ogmaresca.
From 9410879b73cbac56ed23624c71fe74e9e642b985 Mon Sep 17 00:00:00 2001
From: patriceac <48073125+patriceac@users.noreply.github.com>
Date: Tue, 16 May 2023 17:43:14 -0700
Subject: [PATCH 21/61] Fix error when removing image
Error report: https://discord.com/channels/1014774730907209781/1085803885500825600/1108150298289115187
---
ui/plugins/ui/Autoscroll.plugin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/plugins/ui/Autoscroll.plugin.js b/ui/plugins/ui/Autoscroll.plugin.js
index 26969365..336e8b50 100644
--- a/ui/plugins/ui/Autoscroll.plugin.js
+++ b/ui/plugins/ui/Autoscroll.plugin.js
@@ -23,7 +23,7 @@
img.addEventListener(
"load",
function() {
- img.closest(".imageTaskContainer").scrollIntoView()
+ img?.closest(".imageTaskContainer").scrollIntoView()
},
{ once: true }
)
From 9d408a62bfd4c895807ef1b5e154550cf93ca661 Mon Sep 17 00:00:00 2001
From: Olivia Godone-Maresca
Date: Wed, 17 May 2023 21:13:06 -0400
Subject: [PATCH 22/61] Add DDPM and DEIS samplers for diffusers 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
---
README.md | 2 +-
ui/index.html | 18 ++++++++++--------
ui/media/js/parameters.js | 21 +++++++++++++++------
3 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 3cb0bf8e..2d7fcf5a 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ Just delete the `EasyDiffusion` folder to uninstall all the downloaded packages.
### Image generation
- **Supports**: "*Text to Image*" and "*Image to Image*".
-- **19 Samplers**: `ddim`, `plms`, `heun`, `euler`, `euler_a`, `dpm2`, `dpm2_a`, `lms`, `dpm_solver_stability`, `dpmpp_2s_a`, `dpmpp_2m`, `dpmpp_sde`, `dpm_fast`, `dpm_adaptive`, `unipc_snr`, `unipc_tu`, `unipc_tq`, `unipc_snr_2`, `unipc_tu_2`.
+- **21 Samplers**: `ddim`, `plms`, `heun`, `euler`, `euler_a`, `dpm2`, `dpm2_a`, `lms`, `dpm_solver_stability`, `dpmpp_2s_a`, `dpmpp_2m`, `dpmpp_sde`, `dpm_fast`, `dpm_adaptive`, `ddpm`, `deis`, `unipc_snr`, `unipc_tu`, `unipc_tq`, `unipc_snr_2`, `unipc_tu_2`.
- **In-Painting**: Specify areas of your image to paint into.
- **Simple Drawing Tool**: Draw basic images to guide the AI, without needing an external drawing program.
- **Face Correction (GFPGAN)**
diff --git a/ui/index.html b/ui/index.html
index d196b99d..53632610 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -154,16 +154,18 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
Click to learn more about samplers
diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js
index 75abecd7..8c38f2f5 100644
--- a/ui/media/js/parameters.js
+++ b/ui/media/js/parameters.js
@@ -388,15 +388,24 @@ async function getAppConfig() {
if (config.net && config.net.listen_port !== undefined) {
listenPortField.value = config.net.listen_port
}
- if (config.test_diffusers === undefined || config.update_branch === "main") {
- testDiffusers.checked = false
+
+ const testDiffusersEnabled = config.test_diffusers && config.update_branch !== "main"
+ testDiffusers.checked = testDiffusersEnabled
+
+ if (!testDiffusersEnabled) {
document.querySelector("#lora_model_container").style.display = "none"
document.querySelector("#lora_alpha_container").style.display = "none"
+
+ document.querySelectorAll("#sampler_name option.diffusers-only").forEach(option => {
+ option.style.display = "none"
+ })
} else {
- testDiffusers.checked = config.test_diffusers && config.update_branch !== "main"
- document.querySelector("#lora_model_container").style.display = testDiffusers.checked ? "" : "none"
- document.querySelector("#lora_alpha_container").style.display =
- testDiffusers.checked && loraModelField.value !== "" ? "" : "none"
+ document.querySelector("#lora_model_container").style.display = ""
+ document.querySelector("#lora_alpha_container").style.display = loraModelField.value ? "" : "none"
+
+ document.querySelectorAll("#sampler_name option.k_diffusion-only").forEach(option => {
+ option.disabled = true
+ })
}
console.log("get config status response", config)
From d3dd15eb63f0f1de3c5654ca224508d4e3350830 Mon Sep 17 00:00:00 2001
From: Olivia Godone-Maresca
Date: Wed, 17 May 2023 21:44:28 -0400
Subject: [PATCH 23/61] Fix unipc_tu
---
ui/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/index.html b/ui/index.html
index 53632610..32d31b34 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -162,7 +162,7 @@
-
+
From 00603ce124d6a137e7e6001cd01fb2007737cd82 Mon Sep 17 00:00:00 2001
From: JeLuF
Date: Thu, 18 May 2023 13:55:45 +0200
Subject: [PATCH 24/61] Add Clip Skip support
---
ui/easydiffusion/model_manager.py | 12 +++++++++++-
ui/easydiffusion/types.py | 1 +
ui/index.html | 11 +++++++----
ui/media/js/auto-save.js | 1 +
ui/media/js/dnd.js | 8 ++++++++
ui/media/js/engine.js | 2 ++
ui/media/js/main.js | 7 +++++++
ui/media/js/parameters.js | 1 +
8 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py
index 7bf56575..324dcec9 100644
--- a/ui/easydiffusion/model_manager.py
+++ b/ui/easydiffusion/model_manager.py
@@ -122,7 +122,7 @@ def reload_models_if_necessary(context: Context, task_data: TaskData):
if context.model_paths.get(model_type) != path
}
- if set_vram_optimizations(context): # reload SD
+ if set_vram_optimizations(context) or set_clip_skip(context, task_data): # reload SD
models_to_reload["stable-diffusion"] = model_paths_in_req["stable-diffusion"]
for model_type, model_path_in_req in models_to_reload.items():
@@ -157,6 +157,16 @@ def set_vram_optimizations(context: Context):
return False
+def set_clip_skip(context: Context, task_data: TaskData):
+ clip_skip = task_data.clip_skip
+
+ if clip_skip != context.clip_skip:
+ context.clip_skip = clip_skip
+ return True
+
+ return False
+
+
def make_model_folders():
for model_type in KNOWN_MODEL_TYPES:
model_dir_path = os.path.join(app.MODELS_DIR, model_type)
diff --git a/ui/easydiffusion/types.py b/ui/easydiffusion/types.py
index 7462355f..7a5201ab 100644
--- a/ui/easydiffusion/types.py
+++ b/ui/easydiffusion/types.py
@@ -48,6 +48,7 @@ class TaskData(BaseModel):
metadata_output_format: str = "txt" # or "json"
stream_image_progress: bool = False
stream_image_progress_interval: int = 5
+ clip_skip: bool = False
class MergeRequest(BaseModel):
diff --git a/ui/index.html b/ui/index.html
index d196b99d..45263e4b 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -135,10 +135,13 @@
Click to learn more about custom models
-
+
`
- logError(msg, event, outputMsg)
}
break
}
@@ -888,15 +884,15 @@ function onTaskCompleted(task, reqBody, instance, outputContainer, stepUpdate) {
1. If you have set an initial image, please try reducing its dimension to ${MAX_INIT_IMAGE_DIMENSION}x${MAX_INIT_IMAGE_DIMENSION} or smaller.
2. Try picking a lower level in the 'GPU Memory Usage' setting (in the 'Settings' tab).
3. Try generating a smaller image. `
- } else if (msg.toLowerCase().includes("DefaultCPUAllocator: not enough memory")) {
+ } else if (msg.includes("DefaultCPUAllocator: not enough memory")) {
msg += `
Reason: Your computer is running out of system RAM!
-
+
Suggestions:
1. Try closing unnecessary programs and browser tabs.
2. If that doesn't help, please increase your computer's virtual memory by following these steps for
- Windows, or
+ Windows or
Linux.
3. Try restarting your computer. `
}
From 8554b0eab2a355c5472c42ccad039b01c7f18d67 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Wed, 24 May 2023 16:02:53 +0530
Subject: [PATCH 45/61] Better reporting of model load errors - sends the
report to the browser UI during the next image rendering task
---
ui/easydiffusion/model_manager.py | 23 ++++++++++++++++++++++-
ui/easydiffusion/renderer.py | 1 +
ui/easydiffusion/task_manager.py | 1 +
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py
index d6a227be..0a1f1b5c 100644
--- a/ui/easydiffusion/model_manager.py
+++ b/ui/easydiffusion/model_manager.py
@@ -53,15 +53,21 @@ def load_default_models(context: Context):
scan_model=context.model_paths[model_type] != None
and not context.model_paths[model_type].endswith(".safetensors"),
)
+ if model_type in context.model_load_errors:
+ del context.model_load_errors[model_type]
except Exception as e:
log.error(f"[red]Error while loading {model_type} model: {context.model_paths[model_type]}[/red]")
log.exception(e)
del context.model_paths[model_type]
+ context.model_load_errors[model_type] = str(e) # storing the entire Exception can lead to memory leaks
+
def unload_all(context: Context):
for model_type in KNOWN_MODEL_TYPES:
unload_model(context, model_type)
+ if model_type in context.model_load_errors:
+ del context.model_load_errors[model_type]
def resolve_model_to_use(model_name: str = None, model_type: str = None):
@@ -132,7 +138,14 @@ def reload_models_if_necessary(context: Context, task_data: TaskData):
context.model_paths[model_type] = model_path_in_req
action_fn = unload_model if context.model_paths[model_type] is None else load_model
- action_fn(context, model_type, scan_model=False) # we've scanned them already
+ try:
+ action_fn(context, model_type, scan_model=False) # we've scanned them already
+ if model_type in context.model_load_errors:
+ del context.model_load_errors[model_type]
+ except Exception as e:
+ log.exception(e)
+ if action_fn == load_model:
+ context.model_load_errors[model_type] = str(e) # storing the entire Exception can lead to memory leaks
def resolve_model_paths(task_data: TaskData):
@@ -149,6 +162,14 @@ def resolve_model_paths(task_data: TaskData):
task_data.use_upscale = resolve_model_to_use(task_data.use_upscale, "realesrgan")
+def fail_if_models_did_not_load(context: Context):
+ for model_type in KNOWN_MODEL_TYPES:
+ if model_type in context.model_load_errors:
+ e = context.model_load_errors[model_type]
+ raise Exception(f"Could not load the {model_type} model! Reason: " + e)
+ # concat 'e', don't use in format string (injection attack)
+
+
def set_vram_optimizations(context: Context):
config = app.getConfig()
vram_usage_level = config.get("vram_usage_level", "balanced")
diff --git a/ui/easydiffusion/renderer.py b/ui/easydiffusion/renderer.py
index c60c42df..e2dae34f 100644
--- a/ui/easydiffusion/renderer.py
+++ b/ui/easydiffusion/renderer.py
@@ -33,6 +33,7 @@ def init(device):
context.stop_processing = False
context.temp_images = {}
context.partial_x_samples = None
+ context.model_load_errors = {}
from easydiffusion import app
diff --git a/ui/easydiffusion/task_manager.py b/ui/easydiffusion/task_manager.py
index c11acbec..a91cd9c6 100644
--- a/ui/easydiffusion/task_manager.py
+++ b/ui/easydiffusion/task_manager.py
@@ -336,6 +336,7 @@ def thread_render(device):
current_state = ServerStates.LoadingModel
model_manager.resolve_model_paths(task.task_data)
model_manager.reload_models_if_necessary(renderer.context, task.task_data)
+ model_manager.fail_if_models_did_not_load(renderer.context)
current_state = ServerStates.Rendering
task.response = renderer.make_images(
From db265309a57d576f2ec08433c56c33b8f8bb27a4 Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Wed, 24 May 2023 16:24:29 +0530
Subject: [PATCH 46/61] Show an explanation for why the CPU toggle is disabled;
utility class for alert() and confirm() that matches the ED theme; code
formatting
---
ui/media/js/main.js | 19 +++------
ui/media/js/parameters.js | 19 +++++++--
ui/media/js/utils.js | 90 +++++++++++++++++++++++++--------------
3 files changed, 79 insertions(+), 49 deletions(-)
diff --git a/ui/media/js/main.js b/ui/media/js/main.js
index 473ed780..ecd8ad73 100644
--- a/ui/media/js/main.js
+++ b/ui/media/js/main.js
@@ -261,20 +261,11 @@ function shiftOrConfirm(e, prompt, fn) {
if (e.shiftKey || !confirmDangerousActionsField.checked) {
fn(e)
} else {
- $.confirm({
- theme: "modern",
- title: prompt,
- useBootstrap: false,
- animateFromElement: false,
- content:
- 'Tip: To skip this dialog, use shift-click or disable the "Confirm dangerous actions" setting in the Settings tab.',
- buttons: {
- yes: () => {
- fn(e)
- },
- cancel: () => {},
- },
- })
+ confirm(
+ 'Tip: To skip this dialog, use shift-click or disable the "Confirm dangerous actions" setting in the Settings tab.',
+ prompt,
+ fn
+ )
}
}
diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js
index f51b5290..4c7240eb 100644
--- a/ui/media/js/parameters.js
+++ b/ui/media/js/parameters.js
@@ -191,7 +191,8 @@ var PARAMETERS = [
id: "listen_port",
type: ParameterType.custom,
label: "Network port",
- note: "Port that this server listens to. The '9000' part in 'http://localhost:9000'. Please restart the program after changing this.",
+ note:
+ "Port that this server listens to. The '9000' part in 'http://localhost:9000'. Please restart the program after changing this.",
icon: "fa-anchor",
render: (parameter) => {
return ``
@@ -396,14 +397,14 @@ async function getAppConfig() {
document.querySelector("#lora_model_container").style.display = "none"
document.querySelector("#lora_alpha_container").style.display = "none"
- document.querySelectorAll("#sampler_name option.diffusers-only").forEach(option => {
+ document.querySelectorAll("#sampler_name option.diffusers-only").forEach((option) => {
option.style.display = "none"
})
} else {
document.querySelector("#lora_model_container").style.display = ""
document.querySelector("#lora_alpha_container").style.display = loraModelField.value ? "" : "none"
- document.querySelectorAll("#sampler_name option.k_diffusion-only").forEach(option => {
+ document.querySelectorAll("#sampler_name option.k_diffusion-only").forEach((option) => {
option.disabled = true
})
document.querySelector("#clip_skip_config").classList.remove("displayNone")
@@ -568,6 +569,16 @@ async function getSystemInfo() {
if (allDeviceIds.length === 0) {
useCPUField.checked = true
useCPUField.disabled = true // no compatible GPUs, so make the CPU mandatory
+
+ getParameterSettingsEntry("use_cpu").addEventListener("click", function() {
+ alert(
+ "Sorry, we could not find a compatible graphics card! Easy Diffusion supports graphics cards with minimum 2 GB of RAM. " +
+ "Only NVIDIA cards are supported on Windows. NVIDIA and AMD cards are supported on Linux.
" +
+ "If you have a compatible graphics card, please try updating to the latest drivers.
" +
+ "Only the CPU can be used for generating images, without a compatible graphics card.",
+ "No compatible graphics card found!"
+ )
+ })
}
autoPickGPUsField.checked = devices["config"] === "auto"
@@ -586,7 +597,7 @@ async function getSystemInfo() {
$("#use_gpus").val(activeDeviceIds)
}
- document.dispatchEvent(new CustomEvent("system_info_update", { detail: devices}))
+ document.dispatchEvent(new CustomEvent("system_info_update", { detail: devices }))
setHostInfo(res["hosts"])
let force = false
if (res["enforce_output_dir"] !== undefined) {
diff --git a/ui/media/js/utils.js b/ui/media/js/utils.js
index d1578d8e..16778b2d 100644
--- a/ui/media/js/utils.js
+++ b/ui/media/js/utils.js
@@ -843,57 +843,85 @@ function createTab(request) {
/* TOAST NOTIFICATIONS */
function showToast(message, duration = 5000, error = false) {
- const toast = document.createElement("div");
- toast.classList.add("toast-notification");
+ const toast = document.createElement("div")
+ toast.classList.add("toast-notification")
if (error === true) {
- toast.classList.add("toast-notification-error");
+ toast.classList.add("toast-notification-error")
}
- toast.innerHTML = message;
- document.body.appendChild(toast);
+ toast.innerHTML = message
+ document.body.appendChild(toast)
// Set the position of the toast on the screen
- const toastCount = document.querySelectorAll(".toast-notification").length;
- const toastHeight = toast.offsetHeight;
+ const toastCount = document.querySelectorAll(".toast-notification").length
+ const toastHeight = toast.offsetHeight
const previousToastsHeight = Array.from(document.querySelectorAll(".toast-notification"))
.slice(0, -1) // exclude current toast
- .reduce((totalHeight, toast) => totalHeight + toast.offsetHeight + 10, 0); // add 10 pixels for spacing
- toast.style.bottom = `${10 + previousToastsHeight}px`;
- toast.style.right = "10px";
+ .reduce((totalHeight, toast) => totalHeight + toast.offsetHeight + 10, 0) // add 10 pixels for spacing
+ toast.style.bottom = `${10 + previousToastsHeight}px`
+ toast.style.right = "10px"
// Delay the removal of the toast until animation has completed
const removeToast = () => {
- toast.classList.add("hide");
+ toast.classList.add("hide")
const removeTimeoutId = setTimeout(() => {
- toast.remove();
+ toast.remove()
// Adjust the position of remaining toasts
- const remainingToasts = document.querySelectorAll(".toast-notification");
- const removedToastBottom = toast.getBoundingClientRect().bottom;
-
+ const remainingToasts = document.querySelectorAll(".toast-notification")
+ const removedToastBottom = toast.getBoundingClientRect().bottom
+
remainingToasts.forEach((toast) => {
if (toast.getBoundingClientRect().bottom < removedToastBottom) {
- toast.classList.add("slide-down");
+ toast.classList.add("slide-down")
}
- });
-
+ })
+
// Wait for the slide-down animation to complete
setTimeout(() => {
// Remove the slide-down class after the animation has completed
- const slidingToasts = document.querySelectorAll(".slide-down");
+ const slidingToasts = document.querySelectorAll(".slide-down")
slidingToasts.forEach((toast) => {
- toast.classList.remove("slide-down");
- });
-
+ toast.classList.remove("slide-down")
+ })
+
// Adjust the position of remaining toasts again, in case there are multiple toasts being removed at once
- const remainingToastsDown = document.querySelectorAll(".toast-notification");
- let heightSoFar = 0;
+ const remainingToastsDown = document.querySelectorAll(".toast-notification")
+ let heightSoFar = 0
remainingToastsDown.forEach((toast) => {
- toast.style.bottom = `${10 + heightSoFar}px`;
- heightSoFar += toast.offsetHeight + 10; // add 10 pixels for spacing
- });
- }, 0); // The duration of the slide-down animation (in milliseconds)
- }, 500);
- };
+ toast.style.bottom = `${10 + heightSoFar}px`
+ heightSoFar += toast.offsetHeight + 10 // add 10 pixels for spacing
+ })
+ }, 0) // The duration of the slide-down animation (in milliseconds)
+ }, 500)
+ }
// Remove the toast after specified duration
- setTimeout(removeToast, duration);
+ setTimeout(removeToast, duration)
+}
+
+function alert(msg, title) {
+ title = title || ""
+ $.alert({
+ theme: "modern",
+ title: title,
+ useBootstrap: false,
+ animateFromElement: false,
+ content: msg,
+ })
+}
+
+function confirm(msg, title, fn) {
+ title = title || ""
+ $.confirm({
+ theme: "modern",
+ title: title,
+ useBootstrap: false,
+ animateFromElement: false,
+ content: msg,
+ buttons: {
+ yes: () => {
+ fn(e)
+ },
+ cancel: () => {},
+ },
+ })
}
From 3d7e16cfd944540a0e5b9a0f0c8c10b760f6cf7d Mon Sep 17 00:00:00 2001
From: cmdr2
Date: Wed, 24 May 2023 16:29:58 +0530
Subject: [PATCH 47/61] changelog
---
CHANGES.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.md b/CHANGES.md
index d8e5c3f0..a1e49336 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -22,6 +22,7 @@
Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed.
### Detailed changelog
+* 2.5.38 - 24 May 2023 - Better reporting of errors, and show an explanation if the user cannot disable the "Use CPU" setting.
* 2.5.38 - 23 May 2023 - Add Latent Upscaler as another option for upscaling images. Thanks @JeLuf for the implementation of the Latent Upscaler model.
* 2.5.37 - 19 May 2023 - (beta-only) Two more samplers: DDPM and DEIS. Also disables the samplers that aren't working yet in the Diffusers version. Thanks @ogmaresca.
* 2.5.37 - 19 May 2023 - (beta-only) Support CLIP-Skip. You can set this option under the models dropdown. Thanks @JeLuf.
From 3ea74af76d32f005eaed7df6bc9245e99f99ffd6 Mon Sep 17 00:00:00 2001
From: JeLuF
Date: Wed, 24 May 2023 19:29:54 +0200
Subject: [PATCH 48/61] Fix confirmation dialog By splitting the confirmation
function into two halves, the closure was lost
---
ui/media/js/main.js | 2 +-
ui/media/js/utils.js | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/ui/media/js/main.js b/ui/media/js/main.js
index ecd8ad73..fa37600a 100644
--- a/ui/media/js/main.js
+++ b/ui/media/js/main.js
@@ -264,7 +264,7 @@ function shiftOrConfirm(e, prompt, fn) {
confirm(
'Tip: To skip this dialog, use shift-click or disable the "Confirm dangerous actions" setting in the Settings tab.',
prompt,
- fn
+ () => { fn(e) }
)
}
}
diff --git a/ui/media/js/utils.js b/ui/media/js/utils.js
index 16778b2d..6ddb0ae6 100644
--- a/ui/media/js/utils.js
+++ b/ui/media/js/utils.js
@@ -918,9 +918,7 @@ function confirm(msg, title, fn) {
animateFromElement: false,
content: msg,
buttons: {
- yes: () => {
- fn(e)
- },
+ yes: fn,
cancel: () => {},
},
})
From 9dfa300083eba3b5f059c889f7c55e6468a27271 Mon Sep 17 00:00:00 2001
From: JeLuF
Date: Thu, 25 May 2023 00:16:14 +0200
Subject: [PATCH 49/61] Add seamless tiling support
---
ui/easydiffusion/types.py | 1 +
ui/index.html | 9 +++++++++
ui/media/js/auto-save.js | 1 +
ui/media/js/dnd.js | 8 ++++++++
ui/media/js/engine.js | 3 ++-
ui/media/js/main.js | 7 +++++++
6 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/ui/easydiffusion/types.py b/ui/easydiffusion/types.py
index a76f489a..e4426714 100644
--- a/ui/easydiffusion/types.py
+++ b/ui/easydiffusion/types.py
@@ -23,6 +23,7 @@ class GenerateImageRequest(BaseModel):
sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms"
hypernetwork_strength: float = 0
lora_alpha: float = 0
+ tiling: str = "none" # "none", "x", "y", "xy"
class TaskData(BaseModel):
diff --git a/ui/index.html b/ui/index.html
index dc4eb7f0..4814446b 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -236,6 +236,15 @@