diff --git a/CHANGELOG.md b/CHANGELOG.md index c510104e5..0f13614e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ Thanks to @BinaryQuantumSoul for his hard work on this project! Given huge number of changes with *+3443/-3342 commits diff over the past year, a completely different backend/engine and a change of focus, it is time to give credit to original [author](https://github.com/auTOMATIC1111), and move on! -## Update for 2024-05-02 +## Update for 2024-05-04 - **Features**: - **ModernUI** preview of the new [ModernUI](https://github.com/BinaryQuantumSoul/sdnext-modernui) @@ -103,6 +103,7 @@ it is time to give credit to original [author](https://github.com/auTOMATIC1111) - More efficient in-browser callbacks - Updated all system requirements - UI log monitor will auto-reconnect to server on server restart + - UI styles includes indicator for active styles - Support controlnet manually downloads models in both standalone and diffusers format For standalone, simply copy safetensors file to `models/control/controlnet` folder For diffusers format, create folder with model name in `models/control/controlnet/` diff --git a/javascript/extraNetworks.js b/javascript/extraNetworks.js index 96ac263a4..ad224759a 100644 --- a/javascript/extraNetworks.js +++ b/javascript/extraNetworks.js @@ -294,10 +294,20 @@ function selectStyle(name) { function applyStyles(styles) { let newStyles = []; - if (styles) newStyles = Array.isArray(styles) ? styles : [styles]; + if (styles) { + newStyles = Array.isArray(styles) ? styles : [styles]; + } else { + const tabname = getENActiveTab(); + styles = gradioApp().querySelectorAll(`#${tabname}_styles .token span`); + newStyles = Array.from(styles).map((el) => el.textContent).filter((el) => el.length > 0); + } const index = newStyles.indexOf(desiredStyle); if (index > -1) newStyles.splice(index, 1); else newStyles.push(desiredStyle); + gradioApp().querySelectorAll('.extra-network-cards .card').forEach((el) => { + if (newStyles.includes(el.getAttribute('data-name'))) el.style.boxShadow = '0 0 2px 4px var(--button-primary-border-color)'; + else el.style.boxShadow = 'none'; + }); return newStyles.join('|'); } diff --git a/javascript/startup.js b/javascript/startup.js index 12fedfd94..ab930645f 100644 --- a/javascript/startup.js +++ b/javascript/startup.js @@ -31,6 +31,7 @@ async function initStartup() { // post startup tasks that may take longer but are not critical setHints(); + applyStyles(); initIndexDB(); } diff --git a/requirements.txt b/requirements.txt index 92cdfc6bd..200f43a19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,13 +43,13 @@ torchsde==0.2.6 clip-interrogator==0.6.0 antlr4-python3-runtime==4.9.3 requests==2.31.0 -tqdm==4.66.2 -accelerate==0.29.3 +tqdm==4.66.4 +accelerate==0.30.0 opencv-contrib-python-headless==4.9.0.80 diffusers==0.27.2 einops==0.4.1 gradio==3.43.2 -huggingface_hub==0.22.2 +huggingface_hub==0.23.0 numexpr==2.8.8 numpy==1.26.4 numba==0.59.1 @@ -57,7 +57,7 @@ pandas protobuf==3.20.3 pytorch_lightning==1.9.4 tokenizers==0.19.1 -transformers==4.40.0 +transformers==4.40.1 tomesd==0.1.3 urllib3==1.26.18 Pillow==10.3.0