upgrade diffusers

This commit is contained in:
Vladimir Mandic
2023-09-14 09:38:17 -04:00
parent 25133420f4
commit 484dae8dbd
7 changed files with 22 additions and 14 deletions
+11 -6
View File
@@ -153,13 +153,18 @@ function setupExtraNetworksForTab(tabname) {
tabs.appendChild(div);
div.appendChild(search);
div.appendChild(description);
let searchTimer = null;
search.addEventListener('input', (evt) => {
const searchTerm = search.value.toLowerCase();
gradioApp().querySelectorAll(`#${tabname}_extra_tabs div.card`).forEach((elem) => {
let text = `${elem.querySelector('.name').textContent.toLowerCase()} ${elem.querySelector('.search_term').textContent.toLowerCase()}`;
text = text.replace('models--', 'Diffusers');
elem.style.display = text.indexOf(searchTerm) === -1 ? 'none' : '';
});
if (searchTimer) clearTimeout(searchTimer);
searchTimer = setTimeout(() => {
const searchTerm = search.value.toLowerCase();
gradioApp().querySelectorAll(`#${tabname}_extra_tabs div.card`).forEach((elem) => {
let text = `${elem.querySelector('.name').textContent.toLowerCase()} ${elem.querySelector('.search_term').textContent.toLowerCase()}`;
text = text.replace('models--', 'Diffusers');
elem.style.display = text.indexOf(searchTerm) === -1 ? 'none' : '';
});
searchTimer = null;
}, 100);
});
let hoverTimer = null;
+1 -1
View File
@@ -230,7 +230,7 @@ table.settings-value-table td { padding: 0.4em; border: 1px solid #ccc; max-widt
.extra-networks .description { flex: 3; }
.extra-networks .tab-nav > button { margin-right: 0; height: 24px; padding: 2px 4px 2px 4px; }
.extra-networks-tab { padding: 0 !important; }
.extra-network-subdirs { background: var(--input-background-fill); overflow-x: hidden; overflow-y: auto; min-width: 20%; padding-top: 0.5em; }
.extra-network-subdirs { background: var(--input-background-fill); overflow-x: hidden; overflow-y: auto; min-width: max(20%, 120px); padding-top: 0.5em; }
.extra-networks-page { display: flex }
.extra-networks .custom-button { width: 120px; width: 100%; background: none; justify-content: left; text-align: left; padding: 2px 8px 2px 16px; text-indent: -8px; box-shadow: none; line-break: auto; }
.extra-networks .custom-button:hover { background: var(--button-primary-background-fill) }