diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-05 13:20:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 13:20:40 +0000 |
commit | 37ba0070ec14d35addf00f6ae88b7b6c7a1c8ae6 (patch) | |
tree | baaf04c26d2bd325d322084ae7fc4ba367836753 /modules/shared.py | |
parent | b8435e632f7ba0da12a2c8e9c788dda519279d24 (diff) | |
parent | c9b2eef6a3b986fafdd1c13a3fb14969cbe909ca (diff) | |
download | stable-diffusion-webui-gfx803-37ba0070ec14d35addf00f6ae88b7b6c7a1c8ae6.tar.gz stable-diffusion-webui-gfx803-37ba0070ec14d35addf00f6ae88b7b6c7a1c8ae6.tar.bz2 stable-diffusion-webui-gfx803-37ba0070ec14d35addf00f6ae88b7b6c7a1c8ae6.zip |
Merge branch 'master' into feat/allow-origins
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py index e83cbcdf..70b998ff 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -87,6 +87,9 @@ parser.add_argument("--ui-debug-mode", action='store_true', help="Don't load mod parser.add_argument("--device-id", type=str, help="Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before)", default=None)
parser.add_argument("--administrator", action='store_true', help="Administrator rights", default=False)
parser.add_argument("--cors-allow-origins", type=str, help="Allowed CORS origins", default=None)
+parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None)
+parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None)
+parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None)
cmd_opts = parser.parse_args()
restricted_opts = {
@@ -318,6 +321,7 @@ options_templates.update(options_section(('system', "System"), { options_templates.update(options_section(('training', "Training"), {
"unload_models_when_training": OptionInfo(False, "Move VAE and CLIP to RAM when training if possible. Saves VRAM."),
+ "save_optimizer_state": OptionInfo(False, "Saves Optimizer state as separate *.optim file. Training can be resumed with HN itself and matching optim file."),
"dataset_filename_word_regex": OptionInfo("", "Filename word regex"),
"dataset_filename_join_string": OptionInfo(" ", "Filename join string"),
"training_image_repeats_per_epoch": OptionInfo(1, "Number of repeats for a single input image per epoch; used only for displaying epoch number", gr.Number, {"precision": 0}),
@@ -407,7 +411,8 @@ class Options: if key in self.data or key in self.data_labels:
assert not cmd_opts.freeze_settings, "changing settings is disabled"
- comp_args = opts.data_labels[key].component_args
+ info = opts.data_labels.get(key, None)
+ comp_args = info.component_args if info else None
if isinstance(comp_args, dict) and comp_args.get('visible', True) is False:
raise RuntimeError(f"not possible to set {key} because it is restricted")
|