mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
make reloading UI scripts optional when doing Reload UI, and off by default
This commit is contained in:
parent
79cbc92abf
commit
daa1b33247
@ -109,7 +109,7 @@ def initialize_rest(*, reload_script_modules=False):
|
||||
with startup_timer.subcategory("load scripts"):
|
||||
scripts.load_scripts()
|
||||
|
||||
if reload_script_modules:
|
||||
if reload_script_modules and shared.opts.enable_reloading_ui_scripts:
|
||||
for module in [module for name, module in sys.modules.items() if name.startswith("modules.ui")]:
|
||||
importlib.reload(module)
|
||||
startup_timer.record("reload script modules")
|
||||
|
@ -315,6 +315,8 @@ options_templates.update(options_section(('ui', "User interface", "ui"), {
|
||||
"show_progress_in_title": OptionInfo(True, "Show generation progress in window title."),
|
||||
"send_seed": OptionInfo(True, "Send seed when sending prompt or image to other interface"),
|
||||
"send_size": OptionInfo(True, "Send size when sending prompt or image to another interface"),
|
||||
"enable_reloading_ui_scripts": OptionInfo(False, "Reload UI scripts when using Reload UI option").info("useful for developing: if you make changes to UI scripts code, it is applied when the UI is reloded."),
|
||||
|
||||
}))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user