diff options
author | MalumaDev <piano.lu92@gmail.com> | 2022-10-16 19:06:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 19:06:21 +0000 |
commit | 589215df22d24d560101ba2b1fd7aaf3233f466e (patch) | |
tree | fb253871ea958aeffb6a7b73a8e945090cfb799f /modules/ui.py | |
parent | ae0fdad64a7a61a18b4ec09f66bc81405b96c0bd (diff) | |
parent | c8045c5ad4f99deb3a19add06e0457de1df62b05 (diff) | |
download | stable-diffusion-webui-gfx803-589215df22d24d560101ba2b1fd7aaf3233f466e.tar.gz stable-diffusion-webui-gfx803-589215df22d24d560101ba2b1fd7aaf3233f466e.tar.bz2 stable-diffusion-webui-gfx803-589215df22d24d560101ba2b1fd7aaf3233f466e.zip |
Merge branch 'master' into test_resolve_conflicts
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py index 32536b2d..7c095cb4 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -25,7 +25,8 @@ import gradio.routes from modules import sd_hijack, sd_models
from modules.paths import script_path
-from modules.shared import opts, cmd_opts,aesthetic_embeddings
+
+from modules.shared import opts, cmd_opts, restricted_opts, aesthetic_embeddings
if cmd_opts.deepdanbooru:
from modules.deepbooru import get_deepbooru_tags
@@ -1505,6 +1506,9 @@ Requested path was: {f} if comp_args and isinstance(comp_args, dict) and comp_args.get('visible') is False:
continue
+ if cmd_opts.hide_ui_dir_config and key in restricted_opts:
+ continue
+
oldval = opts.data.get(key, None)
opts.data[key] = value
@@ -1522,6 +1526,9 @@ Requested path was: {f} if not opts.same_type(value, opts.data_labels[key].default):
return gr.update(visible=True), opts.dumpjson()
+ if cmd_opts.hide_ui_dir_config and key in restricted_opts:
+ return gr.update(value=oldval), opts.dumpjson()
+
oldval = opts.data.get(key, None)
opts.data[key] = value
|