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
bd52a6d8
Commit
bd52a6d8
authored
Jan 28, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more changes for python version warning; add a commandline flag to disable
parent
7d1f2a3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
launch.py
launch.py
+19
-6
No files found.
launch.py
View file @
bd52a6d8
...
...
@@ -18,23 +18,33 @@ skip_install = False
def
check_python_version
():
version
=
sys
.
version_info
if
platform
.
system
()
==
"Windows"
:
is_windows
=
platform
.
system
()
==
"Windows"
major
=
sys
.
version_info
.
major
minor
=
sys
.
version_info
.
minor
micro
=
sys
.
version_info
.
micro
if
is_windows
:
supported_minors
=
[
10
]
else
:
supported_minors
=
[
7
,
8
,
9
,
10
,
11
]
if
not
(
version
.
major
==
3
and
version
.
minor
in
supported_minors
):
if
not
(
major
==
3
and
minor
in
supported_minors
):
import
modules.errors
modules
.
errors
.
print_error_explanation
(
f
"""
This program is tested with 3.10.6 Python, but you have {version.major}.{version.minor}.{version.micro}.
INCOMPATIBLE PYTHON VERSION
This program is tested with 3.10.6 Python, but you have {major}.{minor}.{micro}.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3109/
\
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3109/
{"Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases" if is_windows else ""}
Use --skip-python-version-check to suppress this warning.
"""
)
...
...
@@ -237,6 +247,7 @@ def prepare_environment():
sys
.
argv
,
_
=
extract_arg
(
sys
.
argv
,
'-f'
)
sys
.
argv
,
skip_torch_cuda_test
=
extract_arg
(
sys
.
argv
,
'--skip-torch-cuda-test'
)
sys
.
argv
,
skip_python_version_check
=
extract_arg
(
sys
.
argv
,
'--skip-python-version-check'
)
sys
.
argv
,
reinstall_xformers
=
extract_arg
(
sys
.
argv
,
'--reinstall-xformers'
)
sys
.
argv
,
reinstall_torch
=
extract_arg
(
sys
.
argv
,
'--reinstall-torch'
)
sys
.
argv
,
update_check
=
extract_arg
(
sys
.
argv
,
'--update-check'
)
...
...
@@ -245,6 +256,9 @@ def prepare_environment():
xformers
=
'--xformers'
in
sys
.
argv
ngrok
=
'--ngrok'
in
sys
.
argv
if
not
skip_python_version_check
:
check_python_version
()
commit
=
commit_hash
()
print
(
f
"Python {sys.version}"
)
...
...
@@ -342,6 +356,5 @@ def start():
if
__name__
==
"__main__"
:
check_python_version
()
prepare_environment
()
start
()
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