mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Add temporary "disable all extensions" option for debugging use
This commit is contained in:
parent
955df7751e
commit
2a4d3d2124
@ -206,6 +206,10 @@ def list_extensions(settings_file):
|
|||||||
print(e, file=sys.stderr)
|
print(e, file=sys.stderr)
|
||||||
|
|
||||||
disabled_extensions = set(settings.get('disabled_extensions', []))
|
disabled_extensions = set(settings.get('disabled_extensions', []))
|
||||||
|
disable_all_extensions = settings.get('disable_all_extensions', False)
|
||||||
|
|
||||||
|
if disable_all_extensions:
|
||||||
|
return []
|
||||||
|
|
||||||
return [x for x in os.listdir(extensions_dir) if x not in disabled_extensions]
|
return [x for x in os.listdir(extensions_dir) if x not in disabled_extensions]
|
||||||
|
|
||||||
|
@ -97,6 +97,10 @@ def list_extensions():
|
|||||||
if not os.path.isdir(extensions_dir):
|
if not os.path.isdir(extensions_dir):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if shared.opts.disable_all_extensions:
|
||||||
|
print("*** \"Disable all extensions\" option was set, will not load any extensions ***")
|
||||||
|
return
|
||||||
|
|
||||||
extension_paths = []
|
extension_paths = []
|
||||||
for dirname in [extensions_dir, extensions_builtin_dir]:
|
for dirname in [extensions_dir, extensions_builtin_dir]:
|
||||||
if not os.path.isdir(dirname):
|
if not os.path.isdir(dirname):
|
||||||
|
@ -422,7 +422,8 @@ options_templates.update(options_section(('postprocessing', "Postprocessing"), {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
options_templates.update(options_section((None, "Hidden options"), {
|
options_templates.update(options_section((None, "Hidden options"), {
|
||||||
"disabled_extensions": OptionInfo([], "Disable those extensions"),
|
"disabled_extensions": OptionInfo([], "Disable these extensions"),
|
||||||
|
"disable_all_extensions": OptionInfo(False, "Disable all extensions (preserves the list of disabled extensions)"),
|
||||||
"sd_checkpoint_hash": OptionInfo("", "SHA256 hash of the current checkpoint"),
|
"sd_checkpoint_hash": OptionInfo("", "SHA256 hash of the current checkpoint"),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user