mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
installer and extra networks tweaks
This commit is contained in:
+17
-6
@@ -1,11 +1,22 @@
|
||||
# Change Log for SD.Next
|
||||
|
||||
- fix startup issue with incorrect config
|
||||
- image viewer: fixes for non-chromium browsers and mobile users and add option to download image
|
||||
- extra network: fix corrupt display on refesh when new extra network type found
|
||||
- diffusers: option to move base and/or refiner model to cpu to free up vram
|
||||
- diffusers: model downloader options to specify model variant/revision/mirror
|
||||
- diffusers: updated hints for settings
|
||||
## Update for 07/10/2023
|
||||
|
||||
- diffusers:
|
||||
- option to move base and/or refiner model to cpu to free up vram
|
||||
- model downloader options to specify model variant / revision / mirror
|
||||
- now you can download `fp16` variant directly for reduced memory footprint
|
||||
- updated hints for settings
|
||||
- extra network:
|
||||
- fix corrupt display on refesh when new extra network type found
|
||||
- additional ui tweaks
|
||||
- generate thumbnails from previews only if preview resolution is above 1k
|
||||
- image viewer:
|
||||
- fixes for non-chromium browsers and mobile users and add option to download image
|
||||
- option to download image directly from image viewer
|
||||
- general
|
||||
- fix startup issue with incorrect config
|
||||
- installer should always check requirements on upgrades
|
||||
|
||||
## Update for 07/08/2023
|
||||
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ def pip(arg: str, ignore: bool = False, quiet: bool = False):
|
||||
|
||||
# install package using pip if not already installed
|
||||
def install(package, friendly: str = None, ignore: bool = False):
|
||||
if args.reinstall:
|
||||
if args.reinstall or args.upgrade:
|
||||
global quick_allowed # pylint: disable=global-statement
|
||||
quick_allowed = False
|
||||
if args.use_ipex and package == "pytorch_lightning==1.9.4":
|
||||
|
||||
@@ -14,8 +14,11 @@ function setupExtraNetworksForTab(tabname) {
|
||||
description.classList.add('description');
|
||||
tabs.appendChild(refresh);
|
||||
tabs.appendChild(close);
|
||||
tabs.appendChild(search);
|
||||
tabs.appendChild(description);
|
||||
div = document.createElement('div');
|
||||
div.classList.add('second-line');
|
||||
tabs.appendChild(div);
|
||||
div.appendChild(search);
|
||||
div.appendChild(description);
|
||||
search.addEventListener('input', (evt) => {
|
||||
searchTerm = search.value.toLowerCase();
|
||||
gradioApp().querySelectorAll(`#${tabname}_extra_tabs div.card`).forEach((elem) => {
|
||||
|
||||
@@ -495,14 +495,15 @@ table.settings-value-table td{
|
||||
.extension-button { font-size: 95% !important; width: 6em; }
|
||||
|
||||
/* extra networks */
|
||||
.extra-networks > div { margin: 0; border-bottom: none !important; }
|
||||
.extra-networks .search { width: 150px; position: absolute; right: 0; height: unset !important; }
|
||||
.extra-networks .description { margin-top: 8px; }
|
||||
.extra-networks > div { margin: 0; gap: 0.2em; border-bottom: none !important; }
|
||||
.extra-networks .second-line { display: flex; width: -webkit-fill-available; gap: 0.2em; }
|
||||
.extra-networks .search { flex: 1; }
|
||||
.extra-networks .description { flex: 3; }
|
||||
.extra-networks .tab-nav > button { margin-right: 0; height: auto; 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: 80px; max-width: 120px; }
|
||||
.extra-network-subdirs { background: var(--input-background-fill); overflow-x: hidden; overflow-y: auto; min-width: 120px; }
|
||||
.extra-networks-page { display: flex }
|
||||
.extra-networks .custom-button { min-width: 80px; max-width: 120px; width: 100%; background: none; justify-content: left; text-align: left; padding: 2px 8px 2px 8px; box-shadow: none; line-break: auto; }
|
||||
.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) }
|
||||
.extra-network-cards { display: flex; flex-wrap: wrap; overflow-y: scroll; overflow-x: hidden; width: -webkit-fill-available; }
|
||||
.extra-network-cards .card { height: fit-content; margin: 0.5em; position: relative; scroll-snap-align: start; scroll-margin-top: 0; }
|
||||
|
||||
+1
-1
@@ -591,7 +591,7 @@ options_templates.update(options_section(('upscaling', "Upscaling"), {
|
||||
options_templates.update(options_section(('extra_networks', "Extra Networks"), {
|
||||
"ui_extra_networks_tab_reorder": OptionInfo("Checkpoints, Lora, LyCORIS, Textual Inversion, Hypernetworks", "Extra networks tab order"),
|
||||
"extra_networks_card_cover": OptionInfo("inline", "UI position", gr.Radio, lambda: {"choices": ["cover", "inline", "sidebar"]}),
|
||||
"extra_networks_height": OptionInfo(47, "UI height (%)", gr.Slider, {"minimum": 10, "maximum": 100, "step": 1}),
|
||||
"extra_networks_height": OptionInfo(53, "UI height (%)", gr.Slider, {"minimum": 10, "maximum": 100, "step": 1}),
|
||||
"extra_networks_sidebar_width": OptionInfo(35, "UI sidebar width (%)", gr.Slider, {"minimum": 10, "maximum": 80, "step": 1}),
|
||||
"extra_networks_card_lazy": OptionInfo(True, "UI card preview lazy loading"),
|
||||
"extra_networks_card_size": OptionInfo(200, "UI card size (px)", gr.Slider, {"minimum": 20, "maximum": 2000, "step": 1}),
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ def create_ui(startup_timer = None):
|
||||
elif category == "cfg":
|
||||
with FormRow():
|
||||
cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=6.0, elem_id="txt2img_cfg_scale")
|
||||
clip_skip = gr.Slider(label='CLIP skip', value=1, minimum=1, maximum=4, step=1, elem_id='txt2img_clip_skip', interactive=True)
|
||||
clip_skip = gr.Slider(label='CLIP skip', value=1, minimum=1, maximum=14, step=1, elem_id='txt2img_clip_skip', interactive=True)
|
||||
elif category == "seed":
|
||||
seed, reuse_seed, subseed, reuse_subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox = create_seed_inputs('txt2img')
|
||||
elif category == "checkboxes":
|
||||
|
||||
@@ -136,11 +136,12 @@ class ExtraNetworksPage:
|
||||
continue
|
||||
try:
|
||||
img = Image.open(f)
|
||||
img = img.convert('RGB')
|
||||
img.thumbnail((512, 512), Image.HAMMING)
|
||||
img.save(fn)
|
||||
img.close()
|
||||
created += 1
|
||||
if img.width > 1024 or img.height > 1024:
|
||||
img = img.convert('RGB')
|
||||
img.thumbnail((512, 512), Image.HAMMING)
|
||||
img.save(fn)
|
||||
img.close()
|
||||
created += 1
|
||||
except Exception as e:
|
||||
shared.log.error(f'Extra network error creating thumbnail: {f} {e}')
|
||||
if len(self.missing_thumbs) > 0:
|
||||
@@ -305,8 +306,8 @@ def create_ui(container, button, tabname, skip_indexing = False):
|
||||
with gr.Tabs(elem_id=tabname+"_extra_tabs"):
|
||||
button_refresh = ToolButton(refresh_symbol, elem_id=tabname+"_extra_refresh")
|
||||
button_close = ToolButton(close_symbol, elem_id=tabname+"_extra_close")
|
||||
ui.search = gr.Textbox('', show_label=False, elem_id=tabname+"_extra_search", placeholder="Search...", visible=True, elem_classes="textbox")
|
||||
ui.description = gr.TextArea('', show_label=False, elem_id=tabname+"_description", placeholder="Save/Replace Extra Network Description...", lines=2, elem_classes="textbox")
|
||||
ui.search = gr.Textbox('', show_label=False, elem_id=tabname+"_extra_search", placeholder="Search...", elem_classes="textbox", lines=1)
|
||||
ui.description = gr.TextArea('', show_label=False, elem_id=tabname+"_description", placeholder="Save/Replace Extra Network Description...", elem_classes="textbox", lines=1)
|
||||
|
||||
ui.button_save_preview = gr.Button('Save preview', elem_id=tabname+"_save_preview", visible=False)
|
||||
ui.preview_target_filename = gr.Textbox('Preview save filename', elem_id=tabname+"_preview_filename", visible=False)
|
||||
|
||||
Reference in New Issue
Block a user