From 8cd75105301ac40446d97640adb4f2f767e7e82f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 15 Apr 2023 12:58:01 -0400 Subject: [PATCH] separate user vs system extensions --- TODO.md | 1 + modules/shared.py | 2 +- modules/ui_extensions.py | 6 ++++-- user.css | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 329a581ce..ab9dbadd7 100644 --- a/TODO.md +++ b/TODO.md @@ -17,6 +17,7 @@ Stuff to be fixed... - Support UI restart on-the-fly - Stream-load as option - Dont spawn extensions installer +- Remove `models` from git repo ## Integration diff --git a/modules/shared.py b/modules/shared.py index f1cefc1cb..45a57a639 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -257,7 +257,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), { "realesrgan_models_path": OptionInfo(os.path.join(paths.models_path, 'RealESRGAN'), "Path to directory with RealESRGAN model file(s)"), "clip_models_path": OptionInfo(os.path.join(paths.models_path, 'CLIP'), "Path to directory with CLIP model file(s)"), "lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Path to directory with Lora network(s)"), - "lyco-dir": OptionInfo(os.path.join(paths.models_path, 'LyCORIS'), "Path to directory with LyCORIS network(s)"), + "lyco_dir": OptionInfo(os.path.join(paths.models_path, 'LyCORIS'), "Path to directory with LyCORIS network(s)"), # "gfpgan_model": OptionInfo("", "GFPGAN model file name"), })) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index a2b6ce981..4e316238b 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -78,6 +78,7 @@ def extension_table(): Extension + Type URL Version Update @@ -89,7 +90,7 @@ def extension_table(): for ext in extensions.extensions: ext.read_info_from_repo() - remote = f"""{html.escape("built-in" if ext.is_builtin else ext.remote or '')}""" + remote = f"""{html.escape(ext.remote or '')}""" if ext.can_update: ext_status = f"""""" @@ -103,6 +104,7 @@ def extension_table(): code += f""" {html.escape(ext.name)} + {"system" if ext.is_builtin else 'user'} {remote} {ext.version} {ext_status} @@ -175,7 +177,7 @@ def install_extension_from_index(url, hide_tags, sort_column, filter_text): def refresh_available_extensions(url, hide_tags, sort_column): - global available_extensions + global available_extensions # pylint: disable=global-statement import urllib.request with urllib.request.urlopen(url) as response: diff --git a/user.css b/user.css index 83e7e55da..fefb87908 100644 --- a/user.css +++ b/user.css @@ -59,6 +59,9 @@ svg.feather.feather-image, .feather .feather-image { display: none } .tab-nav { zoom: 130%; margin-bottom: 16px; border-bottom: 2px solid #CE6400 !important; padding-bottom: 2px; } .label-wrap { margin: 16px 0px 8px 0px; } .gradio-slider input[type="number"] { width: 4.5em; font-size: 0.8rem; } +#tab_extensions table td, #tab_extensions table th { border: none; padding: 0.5em; } +#tab_extensions table { width: 96vw } +#tab_extensions table thead { background-color: var(--neutral-700); } /* automatic style classes */ .progressDiv { border-radius: 0 !important; position: fixed; top: 318px; right: 26px; max-width: 262px; height: 48px; z-index: 99; }