Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/anil-matcha/open-generative-ai/llms.txt

Use this file to discover all available pages before exploring further.

The desktop app bundles stable-diffusion.cpp — a high-performance C++ inference engine — so you can generate images entirely on your own machine without an internet connection or API key. On Apple Silicon Macs the engine uses Metal for GPU acceleration. On Linux and Windows it supports CUDA, Vulkan, and ROCm. CPU inference is also available on all platforms, though noticeably slower. Nothing is installed system-wide. The engine binary, model weights, and temporary files all live in a single app-data directory that the app manages for you.

Available Models

ModelTypeSizeNotes
Z-Image TurboDiffusion Transformer2.5 GB + 2.7 GB aux8-step turbo. Heavy on memory.
Z-Image BaseDiffusion Transformer3.5 GB + 2.7 GB aux50-step high-quality. Heavy on memory.
Dreamshaper 8SD 1.52.1 GB20-step versatile. Lightest tested option on Mac.
Realistic Vision v5.1SD 1.52.1 GB25-step photorealistic.
Anything v5SD 1.52.1 GB20-step anime/illustration.
SDXL Base 1.0SDXL6.9 GB30-step high-res.
Z-Image auxiliary files — both Z-Image models share two files that are downloaded once and reused:
  • Qwen3-4B Text Encoder — 2.4 GB
  • FLUX VAE — 335 MB
The combined 2.7 GB auxiliary download happens the first time you install either Z-Image model. Subsequent installs of the other variant reuse the already-downloaded files.

How to Use

1

Open Local Models settings

Launch the desktop app and navigate to Settings → Local Models.
2

Install the sd.cpp inference engine

Click the Install button next to the sd.cpp engine entry. The binary is auto-downloaded into the app data directory — no manual steps required.
3

Download a model

Select a model from the list and click Download. For either Z-Image model, the auxiliary files (Qwen3-4B + FLUX VAE) are downloaded at the same time if they are not already present on disk.
4

Switch to local mode in Image Studio

Open Image Studio and click the ⚡ Local toggle next to the model selector. The selector will show only the models you have downloaded locally.
5

Select your model and generate

Choose a local model from the dropdown and enter your prompt. Click Generate — no API key is needed. Generation runs entirely on your machine.

Storage Location

By default, sd.cpp stores the engine binary, model weights, and temporary downloads inside Electron’s app data directory:
PlatformDefault path
macOS~/Library/Application Support/open-generative-ai/local-ai
Windows%APPDATA%\open-generative-ai\local-ai
Linux~/.config/open-generative-ai/local-ai
The directory has three subdirectories:
local-ai/
├── bin/      # sd-cli binary and libstable-diffusion dylib/so
├── models/   # Downloaded model weights (.safetensors / .gguf)
└── tmp/      # Temporary download scratch space
To store multi-GB model weights on a different drive, set the OPEN_GENERATIVE_AI_LOCAL_AI_DIR environment variable before launching the app. The app will create bin/, models/, and tmp/ inside that directory. Settings → Local Models always shows the resolved model folder path.
# macOS / Linux — launch with a custom data dir
OPEN_GENERATIVE_AI_LOCAL_AI_DIR=/Volumes/FastDrive/local-ai open "/Applications/Open Generative AI.app"
Launch from Terminal or PowerShell when you need troubleshooting logs — local engine output and download errors are written to the app process console.

Verifying the sd.cpp Installation

If you want to confirm sd.cpp is installed correctly and Metal is active without going through the UI, you can drive sd-cli directly from the command line. This is the same binary the app uses internally.
# 1. App data layout (created on first app launch)
APP_DATA="${OPEN_GENERATIVE_AI_LOCAL_AI_DIR:-$HOME/Library/Application Support/open-generative-ai/local-ai}"
ls "$APP_DATA/bin"     # sd-cli, libstable-diffusion.dylib
ls "$APP_DATA/models"  # whatever you've downloaded

# 2. Grab a small SD 1.5 model directly (Dreamshaper 8, ~2 GB)
curl -L --fail --progress-bar \
  -o "$APP_DATA/models/DreamShaper_8_pruned.safetensors" \
  "https://huggingface.co/Lykon/DreamShaper/resolve/main/DreamShaper_8_pruned.safetensors"

# 3. Run a single 512x512 / 12-step inference
DYLD_LIBRARY_PATH="$APP_DATA/bin" "$APP_DATA/bin/sd-cli" \
  -m "$APP_DATA/models/DreamShaper_8_pruned.safetensors" \
  -p "a serene mountain lake at sunrise, oil painting" \
  -o /tmp/sd15-test.png \
  --steps 12 -H 512 -W 512 --cfg-scale 7.5 --seed 42 \
  --sampling-method euler_a
A healthy run on Apple Silicon prints a line like:
total params memory size = 1969.78MB (VRAM 1969.78MB, RAM 0.00MB)
The VRAM value should equal the model size — that confirms Metal is backing the allocation. The run produces a coherent 512×512 PNG at /tmp/sd15-test.png.

Troubleshooting

VRAM shows 0.00 MB instead of the model size

If the output line shows VRAM 0.00MB and a large RAM figure, the dylib is running in CPU-only mode. Check whether the Metal framework is linked into the shared library:
otool -L "$APP_DATA/bin/libstable-diffusion.dylib" | grep -i metal
If the grep returns no output, Metal support is missing from the downloaded binary. Go to Settings → Local Models, uninstall the engine, and reinstall it — the app will download a fresh copy with Metal linked.

Z-Image hangs on an 8 GB M-series Mac

Z-Image Turbo and Z-Image Base together require approximately 7.4 GB of weights plus a 2.4 GB compute buffer. On a base 8 GB M-series Mac the combined memory pressure causes the system to hang. Use Dreamshaper 8, Realistic Vision v5.1, or Anything v5 (all SD 1.5, 2.1 GB each) on machines with 8 GB RAM.

SD 1.5 running at ~10 s/step instead of ~1–2 s/step

On an M2 Mac, SD 1.5 with Metal should complete each diffusion step in roughly 1–2 seconds. If you are seeing ~10 s/step, the engine has fallen back to CPU. Run the otool check above to confirm Metal is linked, then reinstall the engine from Settings → Local Models.

Build docs developers (and LLMs) love