test / MAC_SD_AUTO_INSTALL.sh
Aitrepreneur's picture
Upload 2 files
5336939
#!/bin/bash
# Check if Homebrew is installed
if ! command -v brew &> /dev/null; then
echo "Homebrew is not installed. Please install Homebrew first."
exit 1
fi
# Install required packages
echo "Installing required packages..."
brew install cmake protobuf rust python@3.10 git wget
# Clone the stable-diffusion-webui repository
echo "Cloning stable-diffusion-webui repository..."
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
# Create models folder if it doesn't exist
if [ ! -d "stable-diffusion-webui/models/Stable-diffusion" ]; then
mkdir -p stable-diffusion-webui/models/Stable-diffusion
fi
# Download models (you can replace these URLs with the actual model URLs)
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"
# Navigate to the repository folder and run web UI
cd stable-diffusion-webui
./webui.sh
echo "Setup completed successfully!"