Running Flux locally on a Mac: install, commands and two models compared
说明与用途
在配备 Apple M5 的 Mac 上本地安装和运行 Flux 的逐步指南,涵盖构建、权重下载和运行时参数。
问题
Users struggle to set up and run the Flux image generation model locally on macOS, encountering build, weight download, and runtime issues.
结果
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.
工作流
- 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
证据
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.
- 记录日期: 2026-09-22T03:15:43.686Z