mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 03:10:21 +00:00
also prevent changing API options via override_settings
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user