From ee9fdf7f62984dc30770fb1a73e68736b319746f Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 30 Jan 2023 14:56:28 +0300 Subject: [PATCH 1/3] Add --skip-version-check to disable messages asking users to upgrade torch. --- modules/shared.py | 2 ++ webui.py | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/shared.py b/modules/shared.py index 96a2572fe..69634fd80 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -105,6 +105,8 @@ parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requ 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) parser.add_argument("--gradio-queue", action='store_true', help="Uses gradio queue; experimental option; breaks restart UI button") +parser.add_argument("--skip-version-check", action='store_true', help="Do not check versions of torch and xformers") + script_loading.preload_extensions(extensions.extensions_dir, parser) diff --git a/webui.py b/webui.py index 0d0b83649..5b5c21399 100644 --- a/webui.py +++ b/webui.py @@ -52,6 +52,9 @@ else: def check_versions(): + if shared.cmd_opts.skip_version_check: + return + expected_torch_version = "1.13.1" if version.parse(torch.__version__) < version.parse(expected_torch_version): @@ -59,7 +62,10 @@ def check_versions(): You are running torch {torch.__version__}. The program is tested to work with torch {expected_torch_version}. To reinstall the desired version, run with commandline flag --reinstall-torch. -Beware that this will cause a lot of large files to be downloaded. +Beware that this will cause a lot of large files to be downloaded, as well as +there are reports of issues with training tab on the latest version. + +Use --skip-version-check commandline argument to disable this check. """.strip()) expected_xformers_version = "0.0.16rc425" @@ -71,6 +77,8 @@ Beware that this will cause a lot of large files to be downloaded. You are running xformers {xformers.__version__}. The program is tested to work with xformers {expected_xformers_version}. To reinstall the desired version, run with commandline flag --reinstall-xformers. + +Use --skip-version-check commandline argument to disable this check. """.strip()) From 19de2a626b92bcfe83a97477f20d0faf9b3204c0 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 30 Jan 2023 15:48:09 +0300 Subject: [PATCH 2/3] make linux launch.py use XFORMERS_PACKAGE var too; thanks, acncagua --- launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch.py b/launch.py index 25909469c..c44c48fad 100644 --- a/launch.py +++ b/launch.py @@ -290,7 +290,7 @@ def prepare_environment(): if not is_installed("xformers"): exit(0) elif platform.system() == "Linux": - run_pip("install xformers==0.0.16rc425", "xformers") + run_pip(f"install xformers=={xformers_package}", "xformers") if not is_installed("pyngrok") and ngrok: run_pip("install pyngrok", "ngrok") From 2c1bb46c7ad5b4536f6587d327a03f0ff7811c5d Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 30 Jan 2023 18:48:10 +0300 Subject: [PATCH 3/3] amend the error in previous commit --- launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch.py b/launch.py index c44c48fad..9fd766d1a 100644 --- a/launch.py +++ b/launch.py @@ -290,7 +290,7 @@ def prepare_environment(): if not is_installed("xformers"): exit(0) elif platform.system() == "Linux": - run_pip(f"install xformers=={xformers_package}", "xformers") + run_pip(f"install {xformers_package}", "xformers") if not is_installed("pyngrok") and ngrok: run_pip("install pyngrok", "ngrok")