Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
52f6e943
Commit
52f6e943
authored
Jan 16, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add --skip-install option to prevent running pip in launch.py and speedup launch a bit
parent
55947857
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
launch.py
launch.py
+7
-0
No files found.
launch.py
View file @
52f6e943
...
...
@@ -14,6 +14,7 @@ python = sys.executable
git
=
os
.
environ
.
get
(
'GIT'
,
"git"
)
index_url
=
os
.
environ
.
get
(
'INDEX_URL'
,
""
)
stored_commit_hash
=
None
skip_install
=
False
def
commit_hash
():
...
...
@@ -89,6 +90,9 @@ def run_python(code, desc=None, errdesc=None):
def
run_pip
(
args
,
desc
=
None
):
if
skip_install
:
return
index_url_line
=
f
' --index-url {index_url}'
if
index_url
!=
''
else
''
return
run
(
f
'"{python}" -m pip {args} --prefer-binary{index_url_line}'
,
desc
=
f
"Installing {desc}"
,
errdesc
=
f
"Couldn't install {desc}"
)
...
...
@@ -173,6 +177,8 @@ def run_extensions_installers(settings_file):
def
prepare_environment
():
global
skip_install
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"
)
commandline_args
=
os
.
environ
.
get
(
'COMMANDLINE_ARGS'
,
""
)
...
...
@@ -206,6 +212,7 @@ def prepare_environment():
sys
.
argv
,
reinstall_xformers
=
extract_arg
(
sys
.
argv
,
'--reinstall-xformers'
)
sys
.
argv
,
update_check
=
extract_arg
(
sys
.
argv
,
'--update-check'
)
sys
.
argv
,
run_tests
,
test_dir
=
extract_opt
(
sys
.
argv
,
'--tests'
)
sys
.
argv
,
skip_install
=
extract_arg
(
sys
.
argv
,
'--skip-install'
)
xformers
=
'--xformers'
in
sys
.
argv
ngrok
=
'--ngrok'
in
sys
.
argv
...
...
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