Stable Diffusion Web UI

1. Clone the Web UI Repository

stable-diffusion-webui
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
    

2. Install Dependencies

pip install -r requirements.txt
    

If some dependencies fail, try installing them manually:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
    

3. Launch the Web UI

Run the following command to start the Web UI:

python launch.py
    

If you encounter the "Torch is not able to use GPU" error, use this command:

export COMMANDLINE_ARGS="--skip-torch-cuda-test"
python launch.py
    

4. Access the Web UI in Your Browser

Once the server is running, the terminal will display a message like:

Running on local URL: http://127.0.0.1:7860
    

Open your web browser and go to:

http://127.0.0.1:7860
    

5. Stopping the Server

To stop the Web UI, press Ctrl+C in the terminal where it's running.

Optional: Run with MPS (for Mac Users)

If you're using a Mac with an M1/M2 chip, run with MPS acceleration:

export PYTORCH_ENABLE_MPS_FALLBACK=1
python launch.py