diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-21 05:58:15 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-21 05:58:15 +0000 |
commit | d02c4da483a656331f641224fe5da5f694580066 (patch) | |
tree | 9c73c355b64e48955f1617e416febf338e94fe3a /modules/options.py | |
parent | df595ae3135ef12c135f43ef2a0f792708aab4b3 (diff) | |
download | stable-diffusion-webui-gfx803-d02c4da483a656331f641224fe5da5f694580066.tar.gz stable-diffusion-webui-gfx803-d02c4da483a656331f641224fe5da5f694580066.tar.bz2 stable-diffusion-webui-gfx803-d02c4da483a656331f641224fe5da5f694580066.zip |
also prevent changing API options via override_settings
Diffstat (limited to 'modules/options.py')
-rw-r--r-- | modules/options.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/options.py b/modules/options.py index 41d1b672..758b1ce5 100644 --- a/modules/options.py +++ b/modules/options.py @@ -116,7 +116,7 @@ class Options: return super(Options, self).__getattribute__(item)
- def set(self, key, value, is_api=False):
+ def set(self, key, value, is_api=False, run_callbacks=True):
"""sets an option and calls its onchange callback, returning True if the option changed and False otherwise"""
oldval = self.data.get(key, None)
@@ -135,7 +135,7 @@ class Options: except RuntimeError:
return False
- if option.onchange is not None:
+ if run_callbacks and option.onchange is not None:
try:
option.onchange()
except Exception as e:
|