Skip to content

Commit b9c3f4e

Browse files
Merge pull request AUTOMATIC1111#16092 from viking1304/bash-python-version
Prioritize python3.10 over python3 if both are available on Linux and Mac (with fallback)
2 parents 41ac139 + ec3c31e commit b9c3f4e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

webui-macos-env.sh

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
# Please modify webui-user.sh to change these instead of this file #
55
####################################################################
66

7-
if [[ -x "$(command -v python3.10)" ]]
8-
then
9-
python_cmd="python3.10"
10-
fi
11-
127
export install_dir="$HOME"
138
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
149
export PYTORCH_ENABLE_MPS_FALLBACK=1

webui.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ fi
4444
# python3 executable
4545
if [[ -z "${python_cmd}" ]]
4646
then
47-
python_cmd="python3"
47+
python_cmd="python3.10"
48+
fi
49+
if [[ ! -x "$(command -v "${python_cmd}")" ]]
50+
then
51+
python_cmd="python3"
4852
fi
4953

5054
# git executable

0 commit comments

Comments
 (0)