From 3eb6ee5b88a23267ae02b6bce41b15cb1b9f979b Mon Sep 17 00:00:00 2001 From: Curtis <20732674+CurtisDS@users.noreply.github.com> Date: Sat, 15 Jun 2024 00:35:42 -0400 Subject: [PATCH] xd v1.1.30 - updated code to work with newer version of a1111 for removing subdir buttons that start with "_" - added requirement for lxml_html_clean after it was seperated from the main lxml project. It will now install the package for you. --- install.py | 4 ++++ javascript/event_handlers.js | 4 ++-- scripts/modelpreview.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 install.py diff --git a/install.py b/install.py new file mode 100644 index 0000000..ae4ae95 --- /dev/null +++ b/install.py @@ -0,0 +1,4 @@ +import launch + +if not launch.is_installed("lxml_html_clean"): + launch.run_pip("install lxml_html_clean==0.1.1", "requirements for SD Model Preview XD") \ No newline at end of file diff --git a/javascript/event_handlers.js b/javascript/event_handlers.js index cb02fec..ae7c774 100644 --- a/javascript/event_handlers.js +++ b/javascript/event_handlers.js @@ -172,8 +172,8 @@ onUiUpdate(function() { //##################### Hide Subdir Buttons That Start With '_' ########################## - // Find all divs with class "extra-network-subdirs" - var subdirDivs = document.querySelectorAll(".extra-network-subdirs"); + // Find all divs with class "extra-network-dirs" + var subdirDivs = document.querySelectorAll(".extra-network-dirs"); // Iterate through each div subdirDivs.forEach(function(div) { diff --git a/scripts/modelpreview.py b/scripts/modelpreview.py index 3ea9086..58dd8d2 100644 --- a/scripts/modelpreview.py +++ b/scripts/modelpreview.py @@ -11,7 +11,7 @@ from PIL import Image import base64 import csv from io import BytesIO -from lxml.html.clean import Cleaner +from lxml_html_clean.clean import Cleaner import importlib.util