Skip to content

Commit

Permalink
Add --skip-version-check to disable messages asking users to upgrade …
Browse files Browse the repository at this point in the history
…torch.
  • Loading branch information
AUTOMATIC1111 committed Jan 30, 2023
1 parent aa4688e commit ee9fdf7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
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)
Expand Down
10 changes: 9 additions & 1 deletion webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,20 @@


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):
errors.print_error_explanation(f"""
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"
Expand All @@ -71,6 +77,8 @@ def check_versions():
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())


Expand Down

0 comments on commit ee9fdf7

Please sign in to comment.