| #!/bin/bash |
|
|
| |
| if ! command -v brew &> /dev/null; then |
| echo "Homebrew is not installed. Please install Homebrew first." |
| exit 1 |
| fi |
|
|
| |
| echo "Installing required packages..." |
| brew install cmake protobuf rust python@3.10 git wget |
|
|
| |
| echo "Cloning stable-diffusion-webui repository..." |
| git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui |
|
|
| |
| if [ ! -d "stable-diffusion-webui/models/Stable-diffusion" ]; then |
| mkdir -p stable-diffusion-webui/models/Stable-diffusion |
| fi |
|
|
| |
| echo "Downloading models..." |
| wget -O stable-diffusion-webui/models/Stable-diffusion/sd_xl_refiner_1.0_0.9vae.safetensors "https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors" |
| wget -O stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0_0.9vae.safetensors "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors" |
|
|
| |
| cd stable-diffusion-webui |
| ./webui.sh |
|
|
| echo "Setup completed successfully!" |
|
|