mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-16 11:09:00 +02:00
.github
NSIS
media
scripts
Developer Console.cmd
Start Stable Diffusion UI.cmd
bootstrap.bat
bootstrap.sh
check_models.py
check_modules.py
developer_console.sh
functions.sh
get_config.py
install_status.txt
on_env_start.bat
on_env_start.sh
on_sd_start.bat
on_sd_start.sh
start.sh
win_enable_long_filepaths.ps1
ui
.gitignore
.prettierignore
.prettierrc.json
3rd-PARTY-LICENSES
CHANGES.md
CONTRIBUTING.md
CreativeML Open RAIL-M License
How to install and run.txt
LICENSE
README BEFORE YOU RUN THIS.txt
README.md
build.bat
build.sh
environment.yaml
package.json
54 lines
1.4 KiB
Bash
Executable File
54 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
if [ "$0" == "bash" ]; then
|
|
echo "Opening Stable Diffusion UI - Developer Console.."
|
|
echo ""
|
|
|
|
# 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
|
|
|
|
# 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
|
|
|
|
# test the environment
|
|
echo "Environment Info:"
|
|
which git
|
|
git --version
|
|
|
|
which conda
|
|
conda --version
|
|
|
|
echo ""
|
|
|
|
# activate the legacy environment (if present) and set PYTHONPATH
|
|
if [ -e "installer_files/env" ]; then
|
|
export PYTHONPATH="$(pwd)/installer_files/env/lib/python3.8/site-packages"
|
|
fi
|
|
if [ -e "stable-diffusion/env" ]; then
|
|
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)
|
|
|
|
conda activate ./stable-diffusion/env
|
|
|
|
export PYTHONPATH="$(pwd)/stable-diffusion/env/lib/python3.8/site-packages"
|
|
fi
|
|
|
|
which python
|
|
python --version
|
|
|
|
echo "PYTHONPATH=$PYTHONPATH"
|
|
|
|
# done
|
|
|
|
echo ""
|
|
else
|
|
file_name=$(basename "${BASH_SOURCE[0]}")
|
|
bash --init-file "$file_name"
|
|
fi
|