aboutsummaryrefslogtreecommitdiff
path: root/webui.bat
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-09 08:37:19 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-09-09 08:37:19 +0300
commit1fd2c22919f85e1403b7169d6ef8cc4abf4288cc (patch)
treee027e8ded3fb6ce7ec50795039743417147302b4 /webui.bat
parent0c63aa95e131c4cf9148ca65203558786d515e05 (diff)
brought manual instructions up to date
reworked launching with different parameters
Diffstat (limited to 'webui.bat')
-rw-r--r--webui.bat19
1 files changed, 7 insertions, 12 deletions
diff --git a/webui.bat b/webui.bat
index 1d49fe4a..a7ed9c80 100644
--- a/webui.bat
+++ b/webui.bat
@@ -1,19 +1,14 @@
@echo off
-set PYTHON=python
-set GIT=git
-set COMMANDLINE_ARGS=%*
-set VENV_DIR=venv
-
-if exist webui.settings.bat (
- call webui.settings.bat
-)
+if not defined PYTHON (set PYTHON=python)
+if not defined GIT (set GIT=git)
+if not defined COMMANDLINE_ARGS (set COMMANDLINE_ARGS=%*)
+if not defined VENV_DIR (set VENV_DIR=venv)
+if not defined TORCH_COMMAND (set TORCH_COMMAND=pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113)
+if not defined REQS_FILE (set REQS_FILE=requirements_versions.txt)
mkdir tmp 2>NUL
-set TORCH_COMMAND=pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
-set REQS_FILE=requirements_versions.txt
-
%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :check_git
echo Couldn't launch python
@@ -26,7 +21,7 @@ echo Couldn't launch git
goto :show_stdout_stderr
:setup_venv
-if [%VENV_DIR%] == [] goto :skip_venv
+if [%VENV_DIR%] == [-] goto :skip_venv
dir %VENV_DIR%\Scripts\Python.exe >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :activate_venv