ai-suite-rocm-local/stablediffusion-rocm/install.sh

41 lines
988 B
Bash
Raw Normal View History

2024-06-30 22:06:23 +02:00
#!/bin/bash
source ../utils.sh
python_exec=venv/bin/python3.10
2024-08-10 21:27:45 +02:00
# Function to install/update StableDiffusion
2024-06-30 22:06:23 +02:00
install_stablediffusion() {
if [ -d "webui" ]; then
2024-08-10 21:27:45 +02:00
echo "StableDiffusion repository already exists."
yes_or_no "Do you want to update StableDiffusion WebUI (dev branch) ?" && {
cd webui
git pull
echo "StableDiffusion WebUI successfully updated."
}
2024-06-30 22:06:23 +02:00
else
echo "Cloning StableDiffusion repository..."
git clone -b dev https://github.com/AUTOMATIC1111/stable-diffusion-webui webui
2024-08-10 21:27:45 +02:00
echo "Running StableDiffusion setup..."
$python_exec webui/launch.py --skip-torch-cuda-test --exit
ln -s webui/models models
ln -s webui/outputs outputs
2024-06-30 22:06:23 +02:00
fi
2024-08-10 21:27:45 +02:00
2024-06-30 22:06:23 +02:00
}
# Main function
main() {
prepare_env
# Install StableDiffusion
install_stablediffusion
clean
2024-08-10 21:27:45 +02:00
echo "StableDiffusion installation/update complete. Use ./run.sh to start"
2024-06-30 22:06:23 +02:00
}
# Run main function
main