diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-18 19:25:18 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-18 19:25:18 +0000 |
commit | f3d83fd68ab2458f0a24fb242e557b95c1294bb1 (patch) | |
tree | ebc699c6c11aea4a9e66f6b2d0593ea1988f4289 /modules/shared.py | |
parent | 21086e60a9e4ad6f677ccc7719be651356c18a2e (diff) | |
download | stable-diffusion-webui-gfx803-f3d83fd68ab2458f0a24fb242e557b95c1294bb1.tar.gz stable-diffusion-webui-gfx803-f3d83fd68ab2458f0a24fb242e557b95c1294bb1.tar.bz2 stable-diffusion-webui-gfx803-f3d83fd68ab2458f0a24fb242e557b95c1294bb1.zip |
add read access to settings for jsavascript
add an option to disable lightbox modal
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index eb4db55a..78de9f9e 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -159,6 +159,7 @@ class Options: "interrogate_clip_max_length": OptionInfo(48, "Interrogate: maximum description length", gr.Slider, {"minimum": 1, "maximum": 256, "step": 1}),
"interrogate_clip_dict_limit": OptionInfo(1500, "Interrogate: maximum number of lines in text file (0 = No limit)"),
"sd_model_checkpoint": OptionInfo(None, "Stable Diffusion checkpoint", gr.Radio, lambda: {"choices": [x.title for x in modules.sd_models.checkpoints_list.values()]}),
+ "js_modal_lightbox": OptionInfo(True, "Enable full page image viewer"),
}
def __init__(self):
@@ -193,6 +194,10 @@ class Options: item = self.data_labels.get(key)
item.onchange = func
+ def dumpjson(self):
+ d = {k: self.data.get(k, self.data_labels.get(k).default) for k in self.data_labels.keys()}
+ return json.dumps(d)
+
opts = Options()
if os.path.exists(config_filename):
|