2022-10-06 07:07:41 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ "$0" == "bash" ]; then
|
|
|
|
echo "Opening Stable Diffusion UI - Developer Console.."
|
|
|
|
echo ""
|
|
|
|
|
2022-10-22 19:54:13 +02:00
|
|
|
# set legacy and new installer's PATH, if they exist
|
|
|
|
if [ -e "installer" ]; then export PATH="$(pwd)/installer/bin:$PATH"; fi
|
|
|
|
if [ -e "installer_files/env" ]; then export PATH="$(pwd)/installer_files/env/bin:$PATH"; fi
|
2022-10-06 07:07:41 +02:00
|
|
|
|
2022-10-25 16:56:46 +02:00
|
|
|
# activate the installer env
|
|
|
|
CONDA_BASEPATH=$(conda info --base)
|
|
|
|
source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # avoids the 'shell not initialized' error
|
|
|
|
|
|
|
|
conda activate
|
|
|
|
|
2022-10-22 19:54:13 +02:00
|
|
|
# test the environment
|
|
|
|
echo "Environment Info:"
|
|
|
|
which git
|
|
|
|
git --version
|
|
|
|
|
|
|
|
which python
|
|
|
|
python --version
|
2022-10-06 07:07:41 +02:00
|
|
|
|
2022-10-22 19:54:13 +02:00
|
|
|
which conda
|
2022-10-06 07:07:41 +02:00
|
|
|
conda --version
|
2022-10-22 19:54:13 +02:00
|
|
|
|
2022-10-22 19:58:43 +02:00
|
|
|
echo ""
|
|
|
|
|
2022-10-22 19:54:13 +02:00
|
|
|
# activate the environment
|
|
|
|
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-06 07:07:41 +02:00
|
|
|
|
|
|
|
conda activate ./stable-diffusion/env
|
|
|
|
else
|
2022-10-10 16:07:05 +02:00
|
|
|
bash --init-file developer_console.sh
|
2022-10-23 06:53:43 +02:00
|
|
|
fi
|