Running Flux locally on a Mac: install, commands and two models compared
Description and use
Step‑by‑step guide to install and run Flux locally on a Mac with Apple M5, covering build, weight download, and runtime flags.
Problem
Users struggle to set up and run the Flux image generation model locally on macOS, encountering build, weight download, and runtime issues.
Outcome
Local Flux runs in ~172 s per image on an M5 Mac, matching cloud speed but offering free, offline, private generation. The guide eliminates common pitfalls and provides reproducible commands.
Workflow
- Install Xcode command line tools and Homebrew
- Clone stable‑diffusion.cpp with submodules
- Build with CMake enabling Metal GPU
- Download four required weight files with curl and verify sizes
- Handle potential curl truncation and resume downloads
- Run sd‑cli with correct flags (‑M img_gen, model paths, prompt, cfg‑scale 1.0, vae‑on‑cpu, steps, resolution, seed, output)
- Adjust steps to 1–4 for optimal speed
- Use VAE‑on‑CPU flag to avoid NaN output
- Verify PNG size to detect VAE failures
Evidence
Two places where people trip.
Flux is not one file. It's four, and all four are required.
Without it you get a blank white frame.
- Record date: 2026-09-22T03:15:43.686Z