Michael Limberger
Need me? Email mike@limberger.ca
AI
Installation - Macos Apple Silicon
Python 3.10 or bust
You need Python 3.10, not 3.11 or 3.12. Those break dependencies. It is 3.10 or bust.
Tools on the Mac first
Xcode Command Line Tools are Apple's compiler kit. You need them before anything else compiles.
Show me. Ask macOS for the tools.
xcode-select --install
Homebrew is a package manager for Mac: a program that installs other programs. If you do not have it yet:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Watch for PATH instructions after it finishes. PATH is the list of folders your shell searches when you type a command.
Show me. The packages you need.
brew install cmake protobuf rust python@3.10 git wget
Symbol map: cmake builds C projects. protobuf is a data format some ML libraries expect. rust is a compiler some wheels need. python@3.10 pins the version. git clones the repo. wget fetches files.
What the machine needs
8 GB of RAM is the floor. 16 GB and up is way better. Budget about 6 to 7 GB of disk for the install, plus whatever your models weigh.
Install the dashboard
Show me. Clone the A1111 repo, the copy of the code on GitHub.
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
Drop any .safetensors file in models/Stable-diffusion/. That is the model format we use: weights in a safer container than old pickle files. Hugging Face has v1-5-pruned-emaonly.safetensors if you just need something to start.
Show me. First run takes 10 to 30 minutes.
./webui.sh
Flags that make Apple Silicon behave
Make a webui-user.sh file in the stable-diffusion-webui folder.
Show me.
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
| Flag | What it does |
|---|---|
--skip-torch-cuda-test |
Skips a CUDA check that does not apply to you. CUDA is NVIDIA's GPU toolkit. Macs are not NVIDIA. |
--upcast-sampling |
Better precision on MPS. MPS is Apple's Metal Performance Shaders, the Mac GPU path. |
--no-half-vae |
Stops black or corrupted images. The VAE is the part that turns latent math back into pixels. |
--use-cpu interrogate |
CLIP interrogator does not do MPS. CLIP is the text-understanding piece. Interrogate guesses tags from an image. |
Eight gigabytes of RAM
If you are running tight on an 8 GB Mac:
Show me.
export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
./webui.sh --opt-split-attention-v1 --medvram
PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 lets PyTorch use more of the unified memory. --medvram trades speed for a smaller memory footprint.
When it breaks
LayerNormKernelImpl or upsample_nearest2d_channels_last errors: add --no-half. Slower, but it will work.
MPS backend out of memory: drop to 512 by 512, batch size 1, add --medvram, close other apps.
xcrun: error: invalid active developer path: run xcode-select --install again.
WebUI will not start after an update? Nuke the virtual environment and the cloned extras, then start fresh:
rm -rf venv repositories && ./webui.sh
venv is the Python sandbox. repositories is extra git checkouts A1111 pulled in. Both rebuild on the next launch.