Skip to content

Commit 48a1582

Browse files
committed
remove the pip install stuff because it does not work as i hoped it would
1 parent bef1931 commit 48a1582

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

launch.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ def run_extensions_installers(settings_file):
188188
def prepare_environment():
189189
global skip_install
190190

191-
pip_installer_location = os.environ.get('PIP_INSTALLER_LOCATION', None)
192-
193191
torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117")
194192
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
195193
commandline_args = os.environ.get('COMMANDLINE_ARGS', "")
@@ -231,9 +229,6 @@ def prepare_environment():
231229
print(f"Python {sys.version}")
232230
print(f"Commit hash: {commit}")
233231

234-
if pip_installer_location is not None and not is_installed("pip"):
235-
run(f'"{python}" "{pip_installer_location}"', "Installing pip", "Couldn't install pip")
236-
237232
if reinstall_torch or not is_installed("torch") or not is_installed("torchvision"):
238233
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
239234

requirements_versions.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ accelerate==0.12.0
44
basicsr==1.4.2
55
gfpgan==1.3.8
66
gradio==3.16.2
7-
fastapi==0.82.0
87
numpy==1.23.3
98
Pillow==9.4.0
109
realesrgan==0.3.0

webui.bat

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ set ERROR_REPORTING=FALSE
99
mkdir tmp 2>NUL
1010

1111
%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt
12-
if %ERRORLEVEL% == 0 goto :start_venv
12+
if %ERRORLEVEL% == 0 goto :check_pip
1313
echo Couldn't launch python
1414
goto :show_stdout_stderr
1515

16+
:check_pip
17+
%PYTHON% -mpip --help >tmp/stdout.txt 2>tmp/stderr.txt
18+
if %ERRORLEVEL% == 0 goto :start_venv
19+
if "%PIP_INSTALLER_LOCATION%" == "" goto :show_stdout_stderr
20+
%PYTHON% "%PIP_INSTALLER_LOCATION%" >tmp/stdout.txt 2>tmp/stderr.txt
21+
if %ERRORLEVEL% == 0 goto :start_venv
22+
echo Couldn't install pip
23+
goto :show_stdout_stderr
24+
1625
:start_venv
1726
if ["%VENV_DIR%"] == ["-"] goto :skip_venv
1827
if ["%SKIP_VENV%"] == ["1"] goto :skip_venv
@@ -46,7 +55,7 @@ pause
4655
exit /b
4756

4857
:accelerate_launch
49-
echo "Accelerating"
58+
echo Accelerating
5059
%ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py
5160
pause
5261
exit /b

0 commit comments

Comments
 (0)