Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
e511b867
Commit
e511b867
authored
Oct 16, 2022
by
DepFA
Committed by
AUTOMATIC1111
Oct 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make update check commandline option, give response on all paths.
parent
a647cbc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
launch.py
launch.py
+19
-10
No files found.
launch.py
View file @
e511b867
...
...
@@ -86,7 +86,24 @@ def git_clone(url, dir, name, commithash=None):
if
commithash
is
not
None
:
run
(
f
'"{git}" -C {dir} checkout {commithash}'
,
None
,
"Couldn't checkout {name}'s hash: {commithash}"
)
def
version_check
(
commit
):
try
:
import
requests
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
(
"--------------------------------------------------------"
)
elif
commits
[
'commit'
][
'sha'
]
==
commit
:
print
(
"You are up to date with the most recent release."
)
else
:
print
(
"Not a git clone, can't perform version check."
)
except
Exception
as
e
:
print
(
"versipm check failed"
,
e
)
def
prepare_enviroment
():
torch_command
=
os
.
environ
.
get
(
'TORCH_COMMAND'
,
"pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
)
requirements_file
=
os
.
environ
.
get
(
'REQS_FILE'
,
"requirements_versions.txt"
)
...
...
@@ -165,16 +182,8 @@ def prepare_enviroment():
sys
.
argv
+=
args
try
:
import
requests
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
'--update-check'
in
args
:
version_check
(
commit
)
if
"--exit"
in
args
:
print
(
"Exiting because of --exit argument"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment