mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
fix en display
This commit is contained in:
Submodule extensions-builtin/sd-webui-controlnet updated: 00cd2ca525...137fc1c89a
@@ -428,22 +428,25 @@ function setupExtraNetworksForTab(tabname) {
|
||||
if (window.opts.extra_networks_card_cover === 'cover') {
|
||||
en.style.transition = '';
|
||||
en.style.zIndex = 100;
|
||||
en.style.top = '13em';
|
||||
en.style.position = 'absolute';
|
||||
en.style.right = 'unset';
|
||||
en.style.width = 'unset';
|
||||
en.style.height = 'unset';
|
||||
gradioApp().getElementById(`${tabname}_settings`).parentNode.style.width = 'unset';
|
||||
} else if (window.opts.extra_networks_card_cover === 'sidebar') {
|
||||
en.style.transition = 'width 0.2s ease';
|
||||
en.style.zIndex = 100;
|
||||
en.style.position = 'absolute';
|
||||
en.style.right = '0';
|
||||
en.style.width = `${window.opts.extra_networks_sidebar_width}vw`;
|
||||
en.style.top = '13em';
|
||||
en.style.height = '-webkit-fill-available';
|
||||
en.style.transition = 'width 0.3s ease';
|
||||
en.style.width = `${window.opts.extra_networks_sidebar_width}vw`;
|
||||
gradioApp().getElementById(`${tabname}_settings`).parentNode.style.width = `${100 - 2 - window.opts.extra_networks_sidebar_width}vw`;
|
||||
} else {
|
||||
en.style.transition = '';
|
||||
en.style.zIndex = 0;
|
||||
en.style.top = 0;
|
||||
en.style.position = 'relative';
|
||||
en.style.right = 'unset';
|
||||
en.style.width = 'unset';
|
||||
|
||||
@@ -188,7 +188,8 @@ table.settings-value-table td { padding: 0.4em; border: 1px solid #ccc; max-widt
|
||||
#extensions .date{ opacity: 0.85; font-size: var(--text-sm); }
|
||||
|
||||
/* extra networks */
|
||||
.extra-networks>div { margin: 0; border-bottom: none !important; gap: 0.3em 0; }
|
||||
#txt2img_extra_networks, #img2img_extra_networks, #control_extra_networks { width: 0; }
|
||||
.extra-networks > div { margin: 0; border-bottom: none !important; gap: 0.3em 0; }
|
||||
.extra-networks .second-line { display: flex; width: -moz-available; width: -webkit-fill-available; gap: 0.3em; box-shadow: var(--input-shadow); }
|
||||
.extra-networks .search { flex: 1; }
|
||||
.extra-networks .description { flex: 3; }
|
||||
|
||||
@@ -194,6 +194,8 @@ class ExtraNetworksPage:
|
||||
except Exception as e:
|
||||
self.items = []
|
||||
shared.log.error(f'Extra networks error listing items: class={self.__class__.__name__} tab={tabname} {e}')
|
||||
if os.environ.get('SD_EN_DEBUG', None):
|
||||
errors.display(e, f'Extra networks error listing items: class={self.__class__.__name__} tab={tabname}')
|
||||
for item in self.items:
|
||||
if item is None:
|
||||
continue
|
||||
@@ -332,7 +334,7 @@ class ExtraNetworksPage:
|
||||
if item.get('local_preview', None) is None:
|
||||
item['local_preview'] = f'{base}.{shared.opts.samples_format}'
|
||||
if shared.opts.diffusers_dir in base:
|
||||
match = re.search(r"models--([^/]+)/", base)
|
||||
match = re.search(r"models--([^/^\\]+)[/\\]", base)
|
||||
base = os.path.join(reference_path, match[1])
|
||||
model_path = os.path.join(shared.opts.diffusers_dir, match[0])
|
||||
item['local_preview'] = f'{os.path.join(model_path, match[1])}.{shared.opts.samples_format}'
|
||||
|
||||
Reference in New Issue
Block a user