From 27e319dc4f09a2f040043948e5c52965976f8491 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sat, 11 Mar 2023 21:22:52 +0300 Subject: [PATCH] alternative solution for #8089 --- modules/shared.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/shared.py b/modules/shared.py index 4e229353..2fb9e3b5 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -116,7 +116,10 @@ parser.add_argument("--no-download-sd-model", action='store_true', help="don't d script_loading.preload_extensions(extensions.extensions_dir, parser) script_loading.preload_extensions(extensions.extensions_builtin_dir, parser) -cmd_opts = parser.parse_args() +if os.environ.get('IGNORE_CMD_ARGS_ERRORS', None) is None: + cmd_opts = parser.parse_args() +else: + cmd_opts, _ = parser.parse_known_args() restricted_opts = { "samples_filename_pattern",