Skip to content

Commit 38cd968

Browse files
committed
stability and use improvements to binary & source installers
- Pass command-line arguments through to invoke.py via the .bat and .sh scripts. - Remove obsolete warning message from binary install.bat - Make sure that current working directory matches where .bat file is installed
1 parent 0111304 commit 38cd968

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

binary_installer/install.bat.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ if "%1" == "use-cache" (
1919
)
2020

2121
echo ***** Installing InvokeAI.. *****
22-
echo "USING development BRANCH. REMEMBER TO CHANGE TO main BEFORE RELEASE"
2322
@rem Config
2423
set INSTALL_ENV_DIR=%cd%\installer_files\env
2524
@rem https://mamba.readthedocs.io/en/latest/installation.html

binary_installer/invoke.bat.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@echo off
22

3+
PUSHD "%~dp0"
34
call .venv\Scripts\activate.bat
45

56
echo Do you want to generate images using the
@@ -10,10 +11,10 @@ echo 3. open the developer console
1011
set /p choice="Please enter 1, 2 or 3: "
1112
if /i "%choice%" == "1" (
1213
echo Starting the InvokeAI command-line.
13-
.venv\Scripts\python scripts\invoke.py
14+
.venv\Scripts\python scripts\invoke.py %*
1415
) else if /i "%choice%" == "2" (
1516
echo Starting the InvokeAI browser-based UI.
16-
.venv\Scripts\python scripts\invoke.py --web
17+
.venv\Scripts\python scripts\invoke.py --web %*
1718
) else if /i "%choice%" == "3" (
1819
echo Developer Console
1920
echo Python command is:

binary_installer/invoke.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ read choice
2020
case $choice in
2121
1)
2222
printf "\nStarting the InvokeAI command-line..\n";
23-
.venv/bin/python scripts/invoke.py;
23+
.venv/bin/python scripts/invoke.py $*;
2424
;;
2525
2)
2626
printf "\nStarting the InvokeAI browser-based UI..\n";
27-
.venv/bin/python scripts/invoke.py --web;
27+
.venv/bin/python scripts/invoke.py --web $*;
2828
;;
2929
3)
3030
printf "\nDeveloper Console:\n";

source_installer/invoke.bat.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@echo off
22

3+
PUSHD "%~dp0"
34
set INSTALL_ENV_DIR=%cd%\installer_files\env
45
set PATH=%INSTALL_ENV_DIR%;%INSTALL_ENV_DIR%\Library\bin;%INSTALL_ENV_DIR%\Scripts;%INSTALL_ENV_DIR%\Library\usr\bin;%PATH%
56

@@ -12,10 +13,10 @@ echo 3. open the developer console
1213
set /P restore="Please enter 1, 2 or 3: "
1314
IF /I "%restore%" == "1" (
1415
echo Starting the InvokeAI command-line..
15-
python scripts\invoke.py
16+
python scripts\invoke.py %*
1617
) ELSE IF /I "%restore%" == "2" (
1718
echo Starting the InvokeAI browser-based UI..
18-
python scripts\invoke.py --web
19+
python scripts\invoke.py --web %*
1920
) ELSE IF /I "%restore%" == "3" (
2021
echo Developer Console
2122
call where python

source_installer/invoke.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ if [ "$0" != "bash" ]; then
2222
echo "3. open the developer console"
2323
read -p "Please enter 1, 2, or 3: " yn
2424
case $yn in
25-
1 ) printf "\nStarting the InvokeAI command-line..\n"; python scripts/invoke.py;;
26-
2 ) printf "\nStarting the InvokeAI browser-based UI..\n"; python scripts/invoke.py --web;;
25+
1 ) printf "\nStarting the InvokeAI command-line..\n"; python scripts/invoke.py $*;;
26+
2 ) printf "\nStarting the InvokeAI browser-based UI..\n"; python scripts/invoke.py --web $*;;
2727
3 ) printf "\nDeveloper Console:\n"; file_name=$(basename "${BASH_SOURCE[0]}"); bash --init-file "$file_name";;
2828
* ) echo "Invalid selection"; exit;;
2929
esac

0 commit comments

Comments
 (0)