diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-18 12:18:02 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-18 12:18:02 +0000 |
commit | 433a7525c1f5eb5963340e0cc45d31038ede3f7e (patch) | |
tree | e22de1ca338a839a66481bd711161c811177f91d | |
parent | 4c605c5174a9b211c3a88e9aff5f5be92b53fd92 (diff) | |
download | stable-diffusion-webui-gfx803-433a7525c1f5eb5963340e0cc45d31038ede3f7e.tar.gz stable-diffusion-webui-gfx803-433a7525c1f5eb5963340e0cc45d31038ede3f7e.tar.bz2 stable-diffusion-webui-gfx803-433a7525c1f5eb5963340e0cc45d31038ede3f7e.zip |
remove shared option for update check (because it is not an argument of webui)
have launch.py examine both COMMANDLINE_ARGS as well as argv for its arguments
-rw-r--r-- | launch.py | 19 | ||||
-rw-r--r-- | modules/shared.py | 1 |
2 files changed, 9 insertions, 11 deletions
@@ -127,13 +127,14 @@ def prepare_enviroment(): codeformer_commit_hash = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af")
blip_commit_hash = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9")
- args = shlex.split(commandline_args)
+ sys.argv += shlex.split(commandline_args)
- args, skip_torch_cuda_test = extract_arg(args, '--skip-torch-cuda-test')
- args, reinstall_xformers = extract_arg(args, '--reinstall-xformers')
- xformers = '--xformers' in args
- deepdanbooru = '--deepdanbooru' in args
- ngrok = '--ngrok' in args
+ sys.argv, skip_torch_cuda_test = extract_arg(sys.argv, '--skip-torch-cuda-test')
+ sys.argv, reinstall_xformers = extract_arg(sys.argv, '--reinstall-xformers')
+ sys.argv, update_check = extract_arg(sys.argv, '--update-check')
+ xformers = '--xformers' in sys.argv
+ deepdanbooru = '--deepdanbooru' in sys.argv
+ ngrok = '--ngrok' in sys.argv
try:
commit = run(f"{git} rev-parse HEAD").strip()
@@ -180,12 +181,10 @@ def prepare_enviroment(): run_pip(f"install -r {requirements_file}", "requirements for Web UI")
- sys.argv += args
-
- if '--update-check' in args:
+ if update_check:
version_check(commit)
- if "--exit" in args:
+ if "--exit" in sys.argv:
print("Exiting because of --exit argument")
exit(0)
diff --git a/modules/shared.py b/modules/shared.py index 50dc46ae..c0d87168 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -76,7 +76,6 @@ parser.add_argument("--disable-console-progressbars", action='store_true', help= parser.add_argument("--enable-console-prompts", action='store_true', help="print prompts to console when generating with txt2img and img2img", default=False)
parser.add_argument('--vae-path', type=str, help='Path to Variational Autoencoders model', default=None)
parser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=False)
-parser.add_argument("--update-check", action='store_true', help="enable http check to confirm that the currently running version is the most recent release.", default=False)
cmd_opts = parser.parse_args()
restricted_opts = [
|