Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#7911 from vladmandic/torch-version
Browse files Browse the repository at this point in the history
store and print real torch version
  • Loading branch information
AUTOMATIC1111 authored Feb 19, 2023
2 parents 3715ece + 9c7e6d5 commit aa7ddb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,10 +1779,15 @@ def versions_html():
else:
xformers_version = "N/A"

try:
torch_version = torch.__long_version__
except:
torch_version = torch.__version__

return f"""
python: <span title="{sys.version}">{python_version}</span>
 • 
torch: {torch.__version__}
torch: {torch_version}
 • 
xformers: {xformers_version}
 • 
Expand Down
1 change: 1 addition & 0 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

# Truncate version number of nightly/local build of PyTorch to not cause exceptions with CodeFormer or Safetensors
if ".dev" in torch.__version__ or "+git" in torch.__version__:
torch.__long_version__ = torch.__version__
torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0)

from modules import shared, devices, sd_samplers, upscaler, extensions, localization, ui_tempdir, ui_extra_networks
Expand Down

0 comments on commit aa7ddb8

Please sign in to comment.