git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git cd stable-diffusion-webui
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
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
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
To stop the Web UI, press Ctrl+C
in the terminal where it's running.
If you're using a Mac with an M1/M2 chip, run with MPS acceleration:
export PYTORCH_ENABLE_MPS_FALLBACK=1 python launch.py