From 4f2df2d1889a8289db4ce4bd63b0880dd2956e3a Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:19:03 -0700 Subject: [PATCH 1/3] Properly reset LoRA selection from Use Settings --- ui/media/js/dnd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 1ac967ae..ebcce132 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -350,7 +350,7 @@ function restoreTaskToUI(task, fieldsToSkip) { } if (!('use_lora_model' in task.reqBody)) { - loraModelField.value = "None" + loraModelField.value = "" loraModelField.dispatchEvent(new Event("change")) } From 5e45f3723264e99b3669ec525a5b18ef2ff35cfb Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:33:05 -0700 Subject: [PATCH 2/3] Fix the tooltip display for long modifiers --- ui/media/css/modifier-thumbnails.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/media/css/modifier-thumbnails.css b/ui/media/css/modifier-thumbnails.css index 9b462e57..c6fb8107 100644 --- a/ui/media/css/modifier-thumbnails.css +++ b/ui/media/css/modifier-thumbnails.css @@ -153,6 +153,10 @@ position: absolute; z-index: 3; } +.modifier-card-overlay:hover ~ .modifier-card-container .modifier-card-label.tooltip .tooltip-text { + visibility: visible; + opacity: 1; +} .modifier-card:hover > .modifier-card-image-container .modifier-card-image-overlay { opacity: 1; } @@ -220,4 +224,4 @@ #modifier-settings-config textarea { width: 90%; height: 150px; -} \ No newline at end of file +} From 9ee38d0b7004aaee712dc22d232eda66351dee11 Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Sun, 9 Apr 2023 18:38:36 -0700 Subject: [PATCH 3/3] Fix the styling of disabled image modifiers 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. --- 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 194565c4..eaea07f6 100644 --- a/ui/media/js/image-modifiers.js +++ b/ui/media/js/image-modifiers.js @@ -230,7 +230,7 @@ function refreshInactiveTags(inactiveTags) { // update cards let overlays = document.querySelector('#editor-inputs-tags-list').querySelectorAll('.modifier-card-overlay') overlays.forEach (i => { - let modifierName = i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].innerText + let modifierName = i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].dataset.fullName if (inactiveTags?.find(element => element === modifierName) !== undefined) { i.parentElement.classList.add('modifier-toggle-inactive') }