47 lines
2.5 KiB
Bash
Executable File
47 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
STATE_DIR=$(pwd)/state
|
|
|
|
export TRANSFORMERS_CACHE="${STATE_DIR}/cache/transformers_cache"
|
|
# export TORCH_COMMAND="pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm5.4.2"
|
|
export TORCH_COMMAND="torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2"
|
|
export XFORMERS_PACKAGE="none"
|
|
export HSA_OVERRIDE_GFX_VERSION=10.3.0
|
|
export HCC_AMDGPU_TARGET=gfx1030
|
|
|
|
# cmdline_options="--ui-settings-file=${STATE_DIR}/configs/config.json"
|
|
# cmdline_options="${cmdline_options} --ui-config-file=${STATE_DIR}/configs/ui-config.json"
|
|
# cmdline_options="${cmdline_options} --styles-file=${STATE_DIR}/configs/styles.csv"
|
|
|
|
# cmdline_options="${cmdline_options} --ckpt-dir=${STATE_DIR}/stable-diffusion"
|
|
# cmdline_options="${cmdline_options} --vae-dir=${STATE_DIR}/vae"
|
|
# cmdline_options="${cmdline_options} --hypernetwork-dir=${STATE_DIR}/hypernetworks"
|
|
# cmdline_options="${cmdline_options} --embeddings-dir=${STATE_DIR}/embeddings"
|
|
# cmdline_options="${cmdline_options} --bsrgan-models-path=${STATE_DIR}/models/BSRGAN"
|
|
# cmdline_options="${cmdline_options} --clip-models-path=${STATE_DIR}/models/clip"
|
|
# cmdline_options="${cmdline_options} --codeformer-models-path=${STATE_DIR}/models/Codeformer"
|
|
# # cmdline_options="${cmdline_options} --codeformer-models-path=${STATE_DIR}/models/ControlNet"
|
|
# cmdline_options="${cmdline_options} --esrgan-models-path=${STATE_DIR}/models/ESRGAN"
|
|
# cmdline_options="${cmdline_options} --gfpgan-models-path=${STATE_DIR}/models/GFPGAN"
|
|
# # cmdline_options="${cmdline_options} --gfpgan-models-path=${STATE_DIR}/models/karlo"
|
|
# cmdline_options="${cmdline_options} --ldsr-models-path=${STATE_DIR}/models/LDSR"
|
|
# cmdline_options="${cmdline_options} --realesrgan-models-path=${STATE_DIR}/models/REALESRGAN"
|
|
# cmdline_options="${cmdline_options} --scunet-models-path=${STATE_DIR}/models/ScuNET"
|
|
# cmdline_options="${cmdline_options} --swinir-models-path=${STATE_DIR}/models/SwinIR"
|
|
|
|
# cmdline_options="--data-dir=${STATE_DIR}/data"
|
|
# cmdline_options="${cmdline_options} --models-dir=${STATE_DIR}/models"
|
|
cmdline_options="--theme dark --medvram --token-merging"
|
|
# cmdline_options="--autolaunch --no-download-sd-model --deepdanbooru"
|
|
|
|
ln -sf "$(pwd)/automatic/models/Stable-diffusion" "${STATE_DIR}/stable-diffusion"
|
|
ln -sf "$(pwd)/automatic/outputs" "${STATE_DIR}/outputs"
|
|
|
|
if [ ! -d "venv" ]; then
|
|
# python -m venv --system-site-packages venv
|
|
python -m venv venv
|
|
fi
|
|
source venv/bin/activate
|
|
cd automatic
|
|
python launch.py $cmdline_options "$@"
|
|
cd ..
|