File size: 1,272 Bytes
5336939
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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 [email protected] 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!"