mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
toil(invoke): more meaningful messaging
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
This commit is contained in:
parent
98fe49cb55
commit
3ac0f11e97
@ -5,23 +5,28 @@ call .venv\Scripts\activate.bat
|
|||||||
echo Do you want to generate images using the
|
echo Do you want to generate images using the
|
||||||
echo 1. command-line
|
echo 1. command-line
|
||||||
echo 2. browser-based UI
|
echo 2. browser-based UI
|
||||||
|
echo OR
|
||||||
echo 3. open the developer console
|
echo 3. open the developer console
|
||||||
set /P restore="Please enter 1, 2 or 3: "
|
set /p choice="Please enter 1, 2 or 3: "
|
||||||
IF /I "%restore%" == "1" (
|
if /i "%choice%" == "1" (
|
||||||
echo Starting the InvokeAI command-line..
|
echo Starting the InvokeAI command-line.
|
||||||
.venv\Scripts\python scripts\invoke.py
|
.venv\Scripts\python scripts\invoke.py
|
||||||
) ELSE IF /I "%restore%" == "2" (
|
) else if /i "%choice%" == "2" (
|
||||||
echo Starting the InvokeAI browser-based UI..
|
echo Starting the InvokeAI browser-based UI.
|
||||||
.venv\Scripts\python scripts\invoke.py --web
|
.venv\Scripts\python scripts\invoke.py --web
|
||||||
) ELSE IF /I "%restore%" == "3" (
|
) else if /i "%choice%" == "3" (
|
||||||
echo Developer Console
|
echo Developer Console
|
||||||
echo 'python' command is:
|
echo Python command is:
|
||||||
where python
|
where python
|
||||||
echo 'python' version is:
|
echo Python version is:
|
||||||
python --version
|
python --version
|
||||||
echo Type 'exit' to quit this shell
|
echo *************************
|
||||||
call cmd
|
echo You are now in the system shell, with the local InvokeAI Python virtual environment activated,
|
||||||
) ELSE (
|
echo so that you can troubleshoot this InvokeAI installation as necessary.
|
||||||
|
echo *************************
|
||||||
|
echo *** Type `exit` to quit this shell and deactivate the Python virtual environment ***
|
||||||
|
call cmd /k
|
||||||
|
) else (
|
||||||
echo Invalid selection
|
echo Invalid selection
|
||||||
pause
|
pause
|
||||||
exit /b
|
exit /b
|
||||||
|
@ -1,30 +1,41 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
set -euo pipefail
|
set -eu
|
||||||
IFS=$'\n\t'
|
|
||||||
|
|
||||||
source .venv/bin/activate
|
. .venv/bin/activate
|
||||||
|
|
||||||
if [ "$(uname -s)" == "Darwin" ]; then
|
echo "Do you want to generate images using the"
|
||||||
export PYTORCH_ENABLE_MPS_FALLBACK=1
|
echo "1. command-line"
|
||||||
fi
|
echo "2. browser-based UI"
|
||||||
|
echo "OR"
|
||||||
|
echo "3. open the developer console"
|
||||||
|
echo "Please enter 1, 2, or 3:"
|
||||||
|
read choice
|
||||||
|
|
||||||
if [ "$0" != "bash" ]; then
|
case $choice in
|
||||||
echo "Do you want to generate images using the"
|
1)
|
||||||
echo "1. command-line"
|
printf "\nStarting the InvokeAI command-line..\n";
|
||||||
echo "2. browser-based UI"
|
.venv/bin/python scripts/invoke.py;
|
||||||
echo "3. open the developer console"
|
;;
|
||||||
read -p "Please enter 1, 2, or 3: " yn
|
2)
|
||||||
case $yn in
|
printf "\nStarting the InvokeAI browser-based UI..\n";
|
||||||
1 ) printf "\nStarting the InvokeAI command-line..\n"; .venv/bin/python scripts/invoke.py;;
|
.venv/bin/python scripts/invoke.py --web;
|
||||||
2 ) printf "\nStarting the InvokeAI browser-based UI..\n"; .venv/bin/python scripts/invoke.py --web;;
|
;;
|
||||||
3 ) printf "\nDeveloper Console:\n"; file_name=$(basename "${BASH_SOURCE[0]}"); bash --init-file "$file_name";;
|
3)
|
||||||
* ) echo "Invalid selection"; exit;;
|
printf "\nDeveloper Console:\n";
|
||||||
esac
|
printf "Python command is:\n\t";
|
||||||
else # in developer console
|
which python;
|
||||||
echo "'python' command is:"
|
printf "Python version is:\n\t";
|
||||||
which python
|
python --version;
|
||||||
echo "'python' version is:"
|
echo "*************************"
|
||||||
python --version
|
echo "You are now in your user shell ($SHELL) with the local InvokeAI Python virtual environment activated,";
|
||||||
echo "Type 'exit' to quit this shell"
|
echo "so that you can troubleshoot this InvokeAI installation as necessary.";
|
||||||
fi
|
printf "*************************\n"
|
||||||
|
echo "*** Type \`exit\` to quit this shell and deactivate the Python virtual environment *** ";
|
||||||
|
/usr/bin/env "$SHELL";
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid selection";
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user