add stablediffusion-forge

This commit is contained in:
Mathieu Broillet 2024-08-19 18:34:52 +02:00
parent 4b8e648a86
commit 2eac054623
Signed by: mathieu
GPG Key ID: A08E484FE95074C1
3 changed files with 62 additions and 0 deletions

4
stablediffusion-forge-rocm/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
venv/
webui/
models/
outputs/

View File

@ -0,0 +1,40 @@
#!/bin/bash
source ../utils.sh
python_exec=venv/bin/python3.10
# Function to install/update StableDiffusion
install_stablediffusionforge() {
if [ -d "webui" ]; then
echo "StableDiffusionForge repository already exists."
yes_or_no "Do you want to update StableDiffusionForge WebUI ?" && {
cd webui
git pull
echo "StableDiffusionForge WebUI successfully updated."
}
else
echo "Cloning StableDiffusionForge repository..."
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge webui
echo "Running StableDiffusionForge setup..."
$python_exec webui/launch.py --skip-torch-cuda-test --exit
ln -s webui/models models
ln -s webui/outputs outputs
fi
}
# Main function
main() {
prepare_env
# Install StableDiffusionForge
install_stablediffusionforge
clean
echo "StableDiffusion installation/update complete. Use ./run.sh to start"
}
# Run main function
main

View File

@ -0,0 +1,18 @@
#!/bin/bash
source ../utils.sh
python_exec=venv/bin/python3.10
# Main function
main() {
# Create virtual environment
use_venv
# Prints ROCM info with available GPUs
rocm-smi
# Start SD
TORCH_BLAS_PREFER_HIPBLASLT=0 $python_exec webui/launch.py --listen --enable-insecure-extension-access # --opt-split-attention
}
main