2022-10-12 11:08:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-10-29 15:46:40 +00:00
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
2022-10-14 03:26:27 +00:00
|
|
|
|
2022-10-29 17:52:24 +00:00
|
|
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
|
|
|
if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$INSTALL_ENV_DIR/bin:$PATH"; fi
|
2022-10-12 11:08:06 +00:00
|
|
|
|
2022-10-29 17:52:24 +00:00
|
|
|
CONDA_BASEPATH=$(conda info --base)
|
|
|
|
source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # otherwise conda complains about 'shell not initialized' (needed when running in a script)
|
2022-10-13 04:27:14 +00:00
|
|
|
|
2022-10-29 17:52:24 +00:00
|
|
|
conda activate invokeai
|
2022-10-12 11:08:06 +00:00
|
|
|
|
2022-10-29 17:52:24 +00:00
|
|
|
if [ "$0" != "bash" ]; then
|
2022-10-29 15:46:40 +00:00
|
|
|
echo "Do you want to generate images using the"
|
|
|
|
echo "1. command-line"
|
|
|
|
echo "2. browser-based UI"
|
2022-10-29 17:52:24 +00:00
|
|
|
echo "3. open the developer console"
|
|
|
|
read -p "Please enter 1, 2, or 3: " yn
|
2022-10-29 15:46:40 +00:00
|
|
|
case $yn in
|
2022-10-29 17:44:58 +00:00
|
|
|
1 ) printf "\nStarting the InvokeAI command-line..\n"; python scripts/invoke.py;;
|
|
|
|
2 ) printf "\nStarting the InvokeAI browser-based UI..\n"; python scripts/invoke.py --web;;
|
2022-10-29 17:52:24 +00:00
|
|
|
3 ) printf "\nDeveloper Console:\n"; file_name=$(basename "${BASH_SOURCE[0]}"); bash --init-file "$file_name";;
|
2022-10-29 15:46:40 +00:00
|
|
|
* ) echo "Invalid selection"; exit;;
|
|
|
|
esac
|
2022-10-29 18:10:03 +00:00
|
|
|
else # in developer console
|
2022-10-29 17:56:21 +00:00
|
|
|
python --version
|
2022-11-10 18:39:29 +00:00
|
|
|
echo "Press ^D to exit"
|
|
|
|
export PS1="(InvokeAI) \u@\h \w> "
|
2022-10-12 11:08:06 +00:00
|
|
|
fi
|