aboutsummaryrefslogtreecommitdiffstats
path: root/launch.py
diff options
context:
space:
mode:
authorDepFA <35278260+dfaker@users.noreply.github.com>2022-10-16 09:49:28 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-10-18 12:10:09 +0000
commit68e83f40bf143e25639875b27e8ad3e32b382db5 (patch)
tree5fbfab7694f2da0e726e1374b7e11bbcb524801d /launch.py
parent02622b19191f5f5112db7633c0630e5c7df1b2f7 (diff)
downloadstable-diffusion-webui-gfx803-68e83f40bf143e25639875b27e8ad3e32b382db5.tar.gz
stable-diffusion-webui-gfx803-68e83f40bf143e25639875b27e8ad3e32b382db5.tar.bz2
stable-diffusion-webui-gfx803-68e83f40bf143e25639875b27e8ad3e32b382db5.zip
add update warning to launch.py
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/launch.py b/launch.py
index 7520cfee..1b133633 100644
--- a/launch.py
+++ b/launch.py
@@ -5,6 +5,7 @@ import sys
import importlib.util
import shlex
import platform
+import requests
dir_repos = "repositories"
python = sys.executable
@@ -126,6 +127,16 @@ def prepare_enviroment():
print(f"Python {sys.version}")
print(f"Commit hash: {commit}")
+ try:
+ commits = requests.get('https://api.github.com/repos/AUTOMATIC1111/stable-diffusion-webui/branches/master').json()
+ if commit != "<none>" and commits['commit']['sha'] != commit:
+ print("--------------------------------------------------------")
+ print("| You are not up to date with the most recent release. |")
+ print("| Consider running `git pull` to update. |")
+ print("--------------------------------------------------------")
+ except Exception as e:
+ pass
+
if not is_installed("torch") or not is_installed("torchvision"):
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")