Skip to content

Commit

Permalink
Merge pull request #3779 from vladmandic/dev
Browse files Browse the repository at this point in the history
dev merge
  • Loading branch information
vladmandic authored Feb 24, 2025
2 parents 3e1c379 + 76b63d8 commit 8d5f91d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Update for 2025-02-24

Primarily a hotfix/service release plus few UI improvements and one exciting new feature: Remote-VAE!

- **Remote Decode**
- final step of image generate, VAE decode, is by far the most memory intensive operation and can easily result in out-of-memory errors
what can be done? Well, *Huggingface* is now providing *free-of-charge* **remote-VAE-decode** service!
Expand All @@ -27,6 +29,7 @@
- fix torch import on compile
- infotext parser force delimiter before params
- handle pipeline class switch errors
- improve extensions options compatibility

## Update for 2025-02-18

Expand Down
18 changes: 17 additions & 1 deletion modules/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,23 @@


class OptionInfo:
def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None, folder=None, submit=None, comment_before='', comment_after=''):
def __init__(
self,
default=None,
label="",
component=None,
component_args=None,
onchange=None,
section=None,
refresh=None,
folder=None,
submit=None,
comment_before='',
comment_after='',
category_id=None, # pylint: disable=unused-argument
*args, # pylint: disable=unused-argument
**kwargs, # pylint: disable=unused-argument
): # pylint: disable=keyword-arg-before-vararg
self.default = default
self.label = label
self.component = component
Expand Down
20 changes: 15 additions & 5 deletions modules/ui_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def check_access():


def apply_changes(disable_list, update_list, disable_all):
check_access()
if shared.cmd_opts.disable_extension_access:
shared.log.error('Extension: apply changes disallowed because public access is enabled and insecure is not specified')
return
shared.log.debug(f'Extensions apply: disable={disable_list} update={update_list}')
disabled = json.loads(disable_list)
assert type(disabled) == list, f"wrong disable_list data for apply_changes: {disable_list}"
Expand All @@ -94,7 +96,9 @@ def apply_changes(disable_list, update_list, disable_all):


def check_updates(_id_task, disable_list, search_text, sort_column):
check_access()
if shared.cmd_opts.disable_extension_access:
shared.log.error('Extension: apply changes disallowed because public access is enabled and insecure is not specified')
return
disabled = json.loads(disable_list)
assert type(disabled) == list, f"wrong disable_list data for apply_and_restart: {disable_list}"
exts = [ext for ext in extensions.extensions if ext.remote is not None and ext.name not in disabled]
Expand Down Expand Up @@ -141,15 +145,21 @@ def normalize_git_url(url):


def install_extension_from_url(dirname, url, branch_name, search_text, sort_column):
check_access()
assert url, 'No URL specified'
if shared.cmd_opts.disable_extension_access:
shared.log.error('Extension: apply changes disallowed because public access is enabled and insecure is not specified')
return ['', '']
if url is None or len(url) == 0:
shared.log.error('Extension: url is not specified')
return ['', '']
if dirname is None or dirname == "":
*parts, last_part = url.split('/') # pylint: disable=unused-variable
last_part = normalize_git_url(last_part)
dirname = last_part
target_dir = os.path.join(extensions.extensions_dir, dirname)
shared.log.info(f'Installing extension: {url} into {target_dir}')
assert not os.path.exists(target_dir), f'Extension directory already exists: {target_dir}'
if os.path.exists(target_dir):
shared.log.error(f'Extension: path="{target_dir}" directory already exists')
return ['', '']
normalized_url = normalize_git_url(url)
assert len([x for x in extensions.extensions if normalize_git_url(x.remote) == normalized_url]) == 0, 'Extension with this URL is already installed'
tmpdir = os.path.join(paths.data_path, "tmp", dirname)
Expand Down
4 changes: 3 additions & 1 deletion webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ def start_ui():
shared.log.info(f'Local URL: {local_url}')
if shared.cmd_opts.listen:
if not gradio_auth_creds:
shared.log.warning('Public interface enabled without authentication')
shared.log.warning('Public URL: enabled without authentication')
if shared.cmd_opts.insecure:
shared.log.warning('Public URL: enabled with insecure flag')
proto = 'https' if shared.cmd_opts.tls_keyfile is not None else 'http'
external_ip = get_external_ip()
if external_ip is not None:
Expand Down

0 comments on commit 8d5f91d

Please sign in to comment.