Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

Bring README and docs up to date with macOS, Vulkan and in-app updates

Gabriele Lozupone5f1b138cde0e
diff --git a/README.md b/README.md
index d4612f2..cdf276b 100644
--- a/README.md
+++ b/README.md
@@ -6,17 +6,18 @@
</picture>
</p>
-<h3 align="center">Edit photos by describing the change, on your own GPU.</h3>
+<h3 align="center">Edit photos by describing the change, on your own computer.</h3>
<p align="center">
- One installer, no Python, no cloud. Powered by Qwen-Image 2.1, and ready for your AI agent.
+ One installer for Windows and Mac, no Python, no cloud. Powered by Qwen-Image 2.1, and ready for your AI agent.
</p>
<p align="center">
<a href="https://github.com/GabrieleLozupone/kokon/releases/latest"><img src="https://img.shields.io/github/v/release/GabrieleLozupone/kokon?style=flat-square&color=6b6b6b&labelColor=333&label=release" alt="Latest release"></a>
<a href="https://github.com/GabrieleLozupone/kokon/releases"><img src="https://img.shields.io/github/downloads/GabrieleLozupone/kokon/total?style=flat-square&color=6b6b6b&labelColor=333" alt="Downloads"></a>
<img src="https://img.shields.io/badge/Windows-10%20%7C%2011-6b6b6b?labelColor=333&style=flat-square&logo=windows&logoColor=white" alt="Windows 10 and 11">
- <img src="https://img.shields.io/badge/NVIDIA-12%20GB%2B-6b6b6b?labelColor=333&style=flat-square&logo=nvidia&logoColor=76B900" alt="NVIDIA, 12 GB or more">
+ <img src="https://img.shields.io/badge/macOS-Apple%20Silicon%20(beta)-6b6b6b?labelColor=333&style=flat-square&logo=apple&logoColor=white" alt="macOS on Apple Silicon, beta">
+ <img src="https://img.shields.io/badge/GPU-NVIDIA%20%C2%B7%20AMD%20%C2%B7%20Intel%20%C2%B7%20Apple-6b6b6b?labelColor=333&style=flat-square" alt="NVIDIA, AMD, Intel and Apple GPUs">
<a href="#use-it-from-your-ai-agent"><img src="https://img.shields.io/badge/MCP-server%20included-6b6b6b?labelColor=333&style=flat-square" alt="MCP server included"></a>
<a href="LICENSE"><img src="https://img.shields.io/github/license/GabrieleLozupone/kokon?style=flat-square&color=6b6b6b&labelColor=333" alt="License"></a>
<a href="https://github.com/GabrieleLozupone/kokon/stargazers"><img src="https://img.shields.io/github/stars/GabrieleLozupone/kokon?style=flat-square&color=6b6b6b&labelColor=333" alt="Stars"></a>
@@ -38,16 +39,16 @@ https://github.com/user-attachments/assets/f954c20e-eb07-4bc8-8216-b8a412860e99
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/download-windows-dark.svg">
<img src="assets/readme/download-windows-light.svg" alt="Download for Windows" height="52">
</picture></a>
- <a href="#roadmap"><picture>
+ <a href="https://github.com/GabrieleLozupone/kokon/releases/latest"><picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/download-macos-dark.svg">
- <img src="assets/readme/download-macos-light.svg" alt="macOS (Apple Silicon): coming soon" height="52">
+ <img src="assets/readme/download-macos-light.svg" alt="Download for macOS (Apple Silicon, beta)" height="52">
</picture></a>
<a href="#roadmap"><picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/readme/download-linux-dark.svg">
<img src="assets/readme/download-linux-light.svg" alt="Linux: coming soon" height="52">
</picture></a>
<br>
- <sub>Free and open source · about 12 GB of models downloaded on first run · nothing leaves your PC</sub>
+ <sub>Free and open source · about 12 GB of models downloaded on first run · nothing leaves your computer</sub>
</p>
---
@@ -63,14 +64,15 @@ https://github.com/user-attachments/assets/f954c20e-eb07-4bc8-8216-b8a412860e99
</td>
<td width="33%" valign="top">
<h3>🔒 Private by design</h3>
- Everything runs on your own GPU. No account, no uploads, no telemetry. After setup,
- Kokon talks only to <code>127.0.0.1</code>. A private mode keeps nothing at all.
+ Everything runs on your own GPU. No account, no uploads, no telemetry, no limits. After
+ setup, Kokon only checks once a day for a new version (you can turn that off). A private
+ mode keeps nothing at all.
</td>
<td width="33%" valign="top">
<h3>📦 One installer</h3>
A native app built on <a href="https://github.com/leejet/stable-diffusion.cpp">stable-diffusion.cpp</a>.
- No Python, no ComfyUI, no node graphs. The first run detects your GPU and downloads the
- right model, then verifies it.
+ No Python, no ComfyUI, no node graphs. The first run detects your graphics card or your
+ Mac's memory and downloads the right model, then verifies it. Updates install in one click.
</td>
</tr>
<tr>
@@ -111,16 +113,26 @@ Every result below came from one sentence in Kokon, with default settings.
## Install
-**1. Download** `Kokon Setup.exe` from the [latest release](https://github.com/GabrieleLozupone/kokon/releases/latest) and run it. It installs for your user only, so you don't need administrator rights.
+**1. Download** from the [latest release](https://github.com/GabrieleLozupone/kokon/releases/latest):
-**2. Set up models.** On first launch Kokon shows your GPU, VRAM and RAM, recommends a preset
-and downloads everything it needs. The download resumes if it is interrupted and every file
-is checked against its SHA-256 checksum. On a fast connection the whole thing takes a few minutes.
+- **Windows:** `Kokon Setup.exe`. Run it. It installs for your user only, so you don't need
+ administrator rights.
+- **Mac (Apple Silicon, beta):** `Kokon_<version>_aarch64.dmg`. Open it and drag Kokon to
+ Applications. The first time, macOS blocks it because the app is not notarized by Apple:
+ open System Settings → Privacy & Security and click **Open Anyway**
+ ([details](#macos-says-kokon-cannot-be-opened)).
+
+**2. Set up models.** On first launch Kokon shows your graphics card (or your Mac's chip and
+memory), recommends a preset and downloads everything it needs. The download resumes if it is
+interrupted and every file is checked against its SHA-256 checksum. On a fast connection the
+whole thing takes a few minutes, and the setup screen shows what Kokon can do while you wait.
**3. Edit.** Drop or paste a photo, describe the change and press <kbd>Enter</kbd>.
### Requirements
+**Windows**
+
| | Minimum | Recommended |
| --- | --- | --- |
| **OS** | Windows 10 64-bit | Windows 11 |
@@ -129,18 +141,34 @@ is checked against its SHA-256 checksum. On a fast connection the whole thing ta
| **Disk** | 15 GB free | 25 GB free on an SSD |
| **Time per edit** <!-- TODO re-measure at CFG 1 before launch; RTX 5070 12 GB not timed yet --> | A little slower than the RTX 5070 Ti on a 12 GB RTX 5070 | About 1 minute at Balanced on a 16 GB RTX 5070 Ti |
+**Mac (beta)**
+
+| | Minimum | Recommended |
+| --- | --- | --- |
+| **Chip** | Apple M1 or newer (Intel Macs are not supported) | M-series Pro, Max or Ultra |
+| **macOS** | 26 Tahoe | latest |
+| **Unified memory** | 16 GB (lightest mode, about 1 megapixel) | 24 GB or more; 32 GB+ for native 2K |
+| **Disk** | 15 GB free | 25 GB free |
+| **Time per image** | Minutes: a 512×512 image took about 2 minutes on a 16 GB M2 Pro | Faster on Pro/Max chips with more memory |
+
+Kokon measures your machine's speed with the first image and shows realistic time estimates
+from then on.
+
> [!NOTE]
> NVIDIA cards run on the CUDA engine, the fastest and tested path. AMD and Intel cards use the
> **Vulkan engine (beta)**: it works on NVIDIA, but nobody has tried it on a real AMD or Intel
> card yet, so please [report how it goes](https://github.com/GabrieleLozupone/kokon/issues).
-> Vulkan is slower than CUDA, and its first image takes longer. Apple Silicon Macs are in
-> testing ([platforms](docs/platforms.md)).
+> Vulkan is slower than CUDA, and its first image takes longer. Macs use the **Metal engine
+> (beta)**, tested so far on a 16 GB M2 Pro. Details in [docs/platforms.md](docs/platforms.md).
<details>
<summary><b>Model presets: what gets downloaded</b></summary>
<br>
-The setup screen picks a preset from your VRAM. You can change it later from Settings → Models → **Set up models…**
+The setup screen picks a preset from your VRAM. On a Mac the presets are named by unified
+memory (16–24 GB Mac, 32–36 GB Mac, 48 GB Mac, 64 GB+ Mac), because the graphics part can use
+only about two thirds of it and the text encoder shares the same memory. You can change the
+preset later from Settings → Models → **Set up models…**
| Preset | Diffusion model | Text encoder (in RAM) | Download | Tested on real hardware |
| --- | --- | --- | --- | --- |
@@ -149,14 +177,14 @@ The setup screen picks a preset from your VRAM. You can change it later from Set
| 24 GB | Qwen-Image 2.1 Q8_0 (7.6 GB) | Qwen3-VL 8B Q4_K_M | ~15 GB | not yet |
| 32 GB+ | Qwen-Image 2.1 Q8_0 | Qwen3-VL 8B Q8_0 (8.7 GB) | ~19 GB | not yet |
-Every preset also gets stable-diffusion.cpp (the CUDA 12 build on NVIDIA, the Vulkan build on AMD and Intel), the Qwen-Image 2.1 VAE, the
+Every preset also gets stable-diffusion.cpp (the CUDA 12 build on NVIDIA, the Vulkan build on AMD and Intel, the Metal build on a Mac), the Qwen-Image 2.1 VAE, the
Qwen3-VL vision projector and, optionally, the 4x-UltraSharp upscaler. The sources are the
official [Qwen-Image 2.1](https://huggingface.co/Qwen/Qwen-Image-2.1) weights through
[unsloth/Qwen-Image-2.1-GGUF](https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF),
[Qwen/Qwen3-VL-8B-Instruct-GGUF](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct-GGUF) and
[Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1).
-Files go to `%LOCALAPPDATA%\KokonData\sdcpp` by default. You can point the setup screen at an
+Files go to `%LOCALAPPDATA%\KokonData\sdcpp` (Mac: `~/Library/Application Support/KokonData/sdcpp`) by default. You can point the setup screen at an
existing stable-diffusion.cpp folder instead; files that are already there are kept.
Other weights, such as fine-tunes, can be selected in Settings → Models.
@@ -178,10 +206,10 @@ Other weights, such as fine-tunes, can be selected in Settings → Models.
</p>
Every result can be edited again, varied, used as a reference, upscaled, saved, copied or
-opened in Explorer. A few things make that loop fast:
+opened in Explorer or Finder. A few things make that loop fast:
- **Before/after**: compare with Slider, Flicker or Changes, or hold <kbd>B</kbd> to see the original.
-- **Undo/redo between versions** with <kbd>Ctrl</kbd>+<kbd>Z</kbd> / <kbd>Ctrl</kbd>+<kbd>Y</kbd>.
+- **Undo/redo between versions** with <kbd>Ctrl</kbd>+<kbd>Z</kbd> / <kbd>Ctrl</kbd>+<kbd>Y</kbd> (<kbd>⌘</kbd> on a Mac).
Undo returns to the version the current one came from, and nothing is ever deleted.
- **Gallery**: every image keeps its full recipe (prompt, seed, settings, pipeline) and reopens
with one click. The recipe is also embedded in the PNG.
@@ -192,7 +220,7 @@ opened in Explorer. A few things make that loop fast:
```mermaid
flowchart LR
- A["📷 Your photo<br>+ a sentence"] --> B["Planner<br><sub>mode · size · VRAM budget</sub>"]
+ A["📷 Your photo<br>+ a sentence"] --> B["Planner<br><sub>mode · size · memory budget</sub>"]
B --> C["Qwen-Image 2.1<br><sub>stable-diffusion.cpp<br>on your GPU</sub>"]
C --> D["AI upscaler<br><sub>ESRGAN, back to<br>full size</sub>"]
D --> E["🖼️ Result<br><sub>gallery + recipe</sub>"]
@@ -210,13 +238,19 @@ the measured backend settings and the reasons behind each default.
## Use it from your AI agent
-Kokon ships `kokon-mcp.exe`, an [MCP](https://modelcontextprotocol.io) server. Register it once
+Kokon ships `kokon-mcp`, an [MCP](https://modelcontextprotocol.io) server. Register it once
with Claude Code:
```powershell
+# Windows
claude mcp add --scope user kokon -- "$env:LOCALAPPDATA\Kokon\kokon-mcp.exe"
```
+```bash
+# Mac
+claude mcp add --scope user kokon -- /Applications/Kokon.app/Contents/MacOS/kokon-mcp
+```
+
Then ask: *“Generate a hero image for this README and save it in docs/”* or *“Remove the
background clutter from screenshot.png”*. The app doesn't need to be open, because the MCP server
starts the engine on demand. The first call takes about a minute while the model loads.
@@ -227,7 +261,8 @@ starts the engine on demand. The first call takes about a minute while the model
<summary><b>Other MCP hosts (JSON config)</b></summary>
<br>
-Project-scoped `.mcp.json`, or any host that takes the standard format:
+Project-scoped `.mcp.json`, or any host that takes the standard format (on a Mac the command is
+`/Applications/Kokon.app/Contents/MacOS/kokon-mcp`):
```json
{
@@ -272,7 +307,8 @@ claude mcp add-json --scope user kokon '{"type":"stdio","command":"C:\\Users\\<y
<br>
Base URL `http://127.0.0.1:39151/api/v1`. Every call except `/ping` needs
-`Authorization: Bearer <token>`, with the token from `%LOCALAPPDATA%\KokonData\service.json`.
+`Authorization: Bearer <token>`, with the token from `%LOCALAPPDATA%\KokonData\service.json`
+(Mac: `~/Library/Application Support/KokonData/service.json`).
Requests that carry a browser `Origin` header are refused.
```powershell
@@ -319,9 +355,9 @@ Kokon makes only two kinds of network request:
Creating, editing, the gallery, the MCP server and the API talk to `127.0.0.1` only. Logs never
contain your prompts.
-You can check this yourself. While you work, watch `Kokon.exe`, `kokon-service.exe` and
-`sd-server.exe` in Resource Monitor (Network tab), or run
-`Get-NetTCPConnection -OwningProcess <pid>`.
+You can check this yourself. While you work, watch `Kokon`, `kokon-service` and `sd-server` in
+Resource Monitor's Network tab on Windows (or run `Get-NetTCPConnection -OwningProcess <pid>`),
+or with `lsof -i -P | grep -iE "kokon|sd-server"` on a Mac.
**Private mode** (the eye icon in the top bar) keeps images and prompts out of the gallery, the
output folder and the project list. They are deleted when you turn private mode off, close the
@@ -334,11 +370,12 @@ If you want full control over every node, ComfyUI is the better tool.
| | **Kokon** | ComfyUI + Qwen workflow | Krita AI Diffusion | Other Qwen web UIs |
| --- | :---: | :---: | :---: | :---: |
-| Install | One `.exe` | Python environment + nodes | Krita + plugin + ComfyUI | Python or ComfyUI |
+| Install | One installer (`.exe` / `.dmg`) | Python environment + nodes | Krita + plugin + ComfyUI | Python or ComfyUI |
| Picks size and memory settings for you | ✅ | ❌ | partly | partly |
| Brush edits the model can see | ✅ | depends on the workflow | ✅ | rarely |
| MCP server for AI agents | ✅ | community nodes | ❌ | ❌ |
| AMD / Intel GPUs | beta (Vulkan) | ✅ | ✅ | varies |
+| Apple Silicon Macs | beta (Metal) | ✅ | ✅ | varies |
| Custom pipelines, node graphs | ❌ | ✅ | partly | ❌ |
| Painting and layers | ❌ | ❌ | ✅ | ❌ |
@@ -354,11 +391,24 @@ release notes, or [build it yourself](#build-from-source).
</details>
+<details>
+<summary id="macos-says-kokon-cannot-be-opened"><b>macOS says Kokon “cannot be opened”</b></summary>
+<br>
+
+Kokon is not notarized by Apple (that needs a paid Apple developer account), so macOS blocks
+it the first time. Try to open it once, then go to **System Settings → Privacy &
+Security**, scroll down and click **Open Anyway**. You only do this once; in-app updates don't
+trigger it again. You can also [build it yourself](#build-from-source).
+
+</details>
+
<details>
<summary><b>Do I need an internet connection?</b></summary>
<br>
-Only once, to download the models. After that Kokon works fully offline.
+Only to download the models. After that Kokon works fully offline. If you are online it checks
+once a day for a new version, which you can turn off on the welcome screen or in Settings →
+General.
</details>
@@ -371,8 +421,9 @@ them, which uses the graphics driver you already have. It works on NVIDIA cards,
been verified on a real AMD or Intel card yet; integrated graphics are not supported. Please
[open an issue](https://github.com/GabrieleLozupone/kokon/issues) with your card and how it went.
-Mac: Apple Silicon support is in testing. See [docs/platforms.md](docs/platforms.md) for the
-planned requirements (24 GB of unified memory recommended).
+Mac: yes, in beta, on Apple Silicon (M1 or newer) with macOS 26. It runs on a 16 GB Mac in a
+lighter mode; 24 GB or more is recommended. See the [requirements](#requirements) and
+[docs/platforms.md](docs/platforms.md).
</details>
@@ -401,8 +452,8 @@ use case.
<summary><b>iPhone photos (HEIC) and HDR</b></summary>
<br>
-HEIC/HEIF photos open like any other image. They are decoded by Windows, so Microsoft's
-**HEIF Image Extensions** and **HEVC Video Extensions** must be installed.
+HEIC/HEIF photos open like any other image. On a Mac they are decoded by macOS itself. On
+Windows, Microsoft's **HEIF Image Extensions** and **HEVC Video Extensions** must be installed.
iPhone photos with an HDR gain map (iOS 18+) show a **Keep HDR** switch in Advanced, which is on
by default. Edits of such photos are saved as **Ultra HDR JPEG**: Chrome, Edge, Android and
@@ -419,7 +470,7 @@ Settings → Models offers two ESRGAN models: **UltraSharp** (default, downloade
screen) and **Superscale-SP**. To use Superscale-SP, put
`4x_NMKD-Superscale-SP_178000_G.pth` from
[uwg/upscaler](https://huggingface.co/uwg/upscaler/tree/main/ESRGAN) into
-`<stable-diffusion.cpp folder>\models\upscalers\`. Without an upscaler everything still works,
+`<stable-diffusion.cpp folder>/models/upscalers/`. Without an upscaler everything still works,
with a plain resize instead.
</details>
@@ -428,13 +479,13 @@ with a plain resize instead.
<summary><b>Where are my images and settings stored?</b></summary>
<br>
-| What | Where |
-| --- | --- |
-| Images | `%USERPROFILE%\Pictures\Kokon\<date>\` (configurable) |
-| Settings | `%APPDATA%\Kokon\config.json` |
-| Gallery database, inputs, thumbnails, logs | `%LOCALAPPDATA%\KokonData\` |
-| Models (default) | `%LOCALAPPDATA%\KokonData\sdcpp\` |
-| API port and token | `%LOCALAPPDATA%\KokonData\service.json` |
+| What | Windows | Mac |
+| --- | --- | --- |
+| Images | `%USERPROFILE%\Pictures\Kokon\<date>\` (configurable) | `~/Pictures/Kokon/<date>/` (configurable) |
+| Settings | `%APPDATA%\Kokon\config.json` | `~/Library/Application Support/Kokon/config.json` |
+| Gallery database, inputs, thumbnails, logs | `%LOCALAPPDATA%\KokonData\` | `~/Library/Application Support/KokonData/` |
+| Models (default) | `%LOCALAPPDATA%\KokonData\sdcpp\` | `~/Library/Application Support/KokonData/sdcpp/` |
+| API port and token | `%LOCALAPPDATA%\KokonData\service.json` | `~/Library/Application Support/KokonData/service.json` |
</details>
@@ -442,8 +493,13 @@ with a plain resize instead.
<summary><b>How do I uninstall it?</b></summary>
<br>
-Use **Settings → Apps → Installed apps → Kokon → Uninstall**. Your images stay in your Pictures
-folder. To free the model space too, delete `%LOCALAPPDATA%\KokonData`.
+**Windows:** Settings → Apps → Installed apps → Kokon → Uninstall. To free the model space too,
+delete `%LOCALAPPDATA%\KokonData`.
+
+**Mac:** drag Kokon from Applications to the Trash. To free the model space too, delete
+`~/Library/Application Support/KokonData`.
+
+Your images stay in your Pictures folder.
</details>
@@ -453,8 +509,8 @@ folder. To free the model space too, delete `%LOCALAPPDATA%\KokonData`.
If a download fails, the setup screen shows the file's download page and target folder so you
can fetch it by hand. For anything else, please
-[open an issue](https://github.com/GabrieleLozupone/kokon/issues/new) with your GPU, driver version and
-the log from `%LOCALAPPDATA%\KokonData\logs`.
+[open an issue](https://github.com/GabrieleLozupone/kokon/issues/new) with your GPU (or Mac model), driver
+or macOS version and the log from `KokonData/logs` (see the table above).
</details>
@@ -464,12 +520,14 @@ the log from `%LOCALAPPDATA%\KokonData\logs`.
- [x] First-run setup with GPU detection and verified, resumable downloads
- [x] MCP server and local HTTP API
- [x] Before/after, version undo, private mode, HEIC and HDR
-- [ ] Fast mode with a turbo LoRA (an edit in about 15 seconds)
+- [x] macOS on Apple Silicon (beta, Metal)
+- [x] One-click in-app updates on Windows and Mac
- [ ] AMD and Intel GPUs through Vulkan (beta now; works on NVIDIA, to verify on AMD/Intel)
+- [ ] Fast mode with a turbo LoRA (an edit in about 15 seconds)
- [ ] Background removal and transparent cutouts
- [ ] Batch edits: one instruction for a whole folder
- [ ] Plugins for Krita, GIMP and Photoshop through the local API
-- [ ] macOS on Apple Silicon (in testing), then Linux
+- [ ] Linux
Have an idea? [Start a discussion](https://github.com/GabrieleLozupone/kokon/discussions) or 👍 an existing one.
@@ -479,7 +537,7 @@ Have an idea? [Start a discussion](https://github.com/GabrieleLozupone/kokon/dis
<summary><b>Requirements and commands</b></summary>
<br>
-You need Rust (stable, MSVC), Node 22+, Visual Studio Build Tools and WebView2.
+**Windows:** Rust (stable, MSVC), Node 22+, Visual Studio Build Tools and WebView2.
```powershell
npm install
@@ -490,6 +548,17 @@ npx tauri dev # run the desktop app in development
powershell -ExecutionPolicy Bypass -File scripts\build-release.ps1 # installer
```
+**Mac (Apple Silicon, macOS 26+):** Xcode Command Line Tools, Rust and Node 22+.
+
+```bash
+bash scripts/dev/mac-dev.sh --check # check the prerequisites
+bash scripts/dev/mac-dev.sh # build and run the app in development
+bash scripts/build-release-mac.sh # Kokon.app + .dmg in dist-release/
+```
+
+Publishing a release (signed in-app updates for both platforms) is described in
+[docs/releasing.md](docs/releasing.md).
+
</details>
<details>
@@ -498,11 +567,11 @@ powershell -ExecutionPolicy Bypass -File scripts\build-release.ps1 # installer
```mermaid
flowchart TB
- UI["<b>Kokon.exe</b><br>Tauri 2 + React"]
- MCP["<b>kokon-mcp.exe</b><br>MCP over stdio"]
+ UI["<b>Kokon</b><br>Tauri 2 + React"]
+ MCP["<b>kokon-mcp</b><br>MCP over stdio"]
S["Scripts and other apps"]
- SVC["<b>kokon-service.exe</b><br>planner · preprocessing · job queue · gallery<br><code>127.0.0.1:39151/api/v1</code>"]
- SD["<b>sd-server.exe</b><br>stable-diffusion.cpp<br><code>127.0.0.1:39150</code>"]
+ SVC["<b>kokon-service</b><br>planner · preprocessing · job queue · gallery<br><code>127.0.0.1:39151/api/v1</code>"]
+ SD["<b>sd-server</b><br>stable-diffusion.cpp (CUDA · Vulkan · Metal)<br><code>127.0.0.1:39150</code>"]
UI -- "HTTP + SSE, token" --> SVC
MCP -- "HTTP, token" --> SVC
S -- "HTTP, token" --> SVC
diff --git a/assets/readme/download-macos-dark.svg b/assets/readme/download-macos-dark.svg
index e6656f5..eee29e1 100644
--- a/assets/readme/download-macos-dark.svg
+++ b/assets/readme/download-macos-dark.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="272" height="64" viewBox="0 0 272 64" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif"><title>Apple Silicon macOS (coming soon)</title><rect x="0.75" y="0.75" width="270.5" height="62.5" rx="15.25" fill="none" stroke="#F7F6F2" stroke-opacity="0.28" stroke-width="1.5"/><g opacity="0.62"><g transform="translate(22 20)" fill="#F7F6F2"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></g><text x="62" y="28" font-size="11.5" fill="#F7F6F2" fill-opacity="0.72">Apple Silicon</text><text x="62" y="47.5" font-size="19" font-weight="600" fill="#F7F6F2">macOS</text></g><rect x="160" y="20.0" width="94" height="24" rx="12" fill="#F7F6F2" fill-opacity="0.08"/><text x="207.0" y="35.6" text-anchor="middle" font-size="10.5" font-weight="700" letter-spacing="0.9" fill="#F7F6F2" fill-opacity="0.7">COMING SOON</text></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="272" height="64" viewBox="0 0 272 64" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif"><title>Apple Silicon · beta macOS</title><rect width="272" height="64" rx="16" fill="#F7F6F2"/><g><g transform="translate(22 20)" fill="#0D0D0D"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></g><text x="62" y="28" font-size="11.5" fill="#0D0D0D" fill-opacity="0.72">Apple Silicon · beta</text><text x="62" y="47.5" font-size="19" font-weight="600" fill="#0D0D0D">macOS</text></g><circle cx="238" cy="32.0" r="15" fill="#0D0D0D" fill-opacity="0.14"/><path d="M238 26.0v11m-5-5 5 5 5-5" fill="none" stroke="#0D0D0D" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
diff --git a/assets/readme/download-macos-light.svg b/assets/readme/download-macos-light.svg
index b171c91..8e5a2e4 100644
--- a/assets/readme/download-macos-light.svg
+++ b/assets/readme/download-macos-light.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="272" height="64" viewBox="0 0 272 64" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif"><title>Apple Silicon macOS (coming soon)</title><rect x="0.75" y="0.75" width="270.5" height="62.5" rx="15.25" fill="none" stroke="#0D0D0D" stroke-opacity="0.28" stroke-width="1.5"/><g opacity="0.62"><g transform="translate(22 20)" fill="#0D0D0D"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></g><text x="62" y="28" font-size="11.5" fill="#0D0D0D" fill-opacity="0.72">Apple Silicon</text><text x="62" y="47.5" font-size="19" font-weight="600" fill="#0D0D0D">macOS</text></g><rect x="160" y="20.0" width="94" height="24" rx="12" fill="#0D0D0D" fill-opacity="0.08"/><text x="207.0" y="35.6" text-anchor="middle" font-size="10.5" font-weight="700" letter-spacing="0.9" fill="#0D0D0D" fill-opacity="0.7">COMING SOON</text></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="272" height="64" viewBox="0 0 272 64" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif"><title>Apple Silicon · beta macOS</title><rect width="272" height="64" rx="16" fill="#0D0D0D"/><g><g transform="translate(22 20)" fill="#F7F6F2"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></g><text x="62" y="28" font-size="11.5" fill="#F7F6F2" fill-opacity="0.72">Apple Silicon · beta</text><text x="62" y="47.5" font-size="19" font-weight="600" fill="#F7F6F2">macOS</text></g><circle cx="238" cy="32.0" r="15" fill="#F7F6F2" fill-opacity="0.14"/><path d="M238 26.0v11m-5-5 5 5 5-5" fill="none" stroke="#F7F6F2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
diff --git a/docs/engineering-notes.md b/docs/engineering-notes.md
index b2f4923..5e81bbc 100644
--- a/docs/engineering-notes.md
+++ b/docs/engineering-notes.md
@@ -21,20 +21,51 @@ Kokon.exe (Tauri 2 + React) kokon-mcp.exe (MCP, stdio) scripts
| --- | --- |
| `crates/qls-core/src/geometry.rs` | Pure dimension math: 32-alignment, working canvas, outpaint/inpaint geometry |
| `imaging.rs` | EXIF orientation, alpha-safe resize, padding, masks, compositing, PNG metadata/ICC |
-| `planner.rs` | Mode detection, resolution policy, upscale targets, VRAM budget |
+| `planner.rs` | Mode detection, resolution policy, upscale targets, memory budget (incl. Apple unified memory) |
| `pipeline.rs` | Builds backend requests, post-processes results (crop back, ESRGAN tiling, composite) |
| `sdcpp.rs` | Inference adapter — the only code that knows sd-server's schema |
| `process.rs` | sd-server launch/reuse/stop, log capture, truthful progress parsing |
| `engine.rs` | Async job queue, cancellation, OOM retry, saving |
+| `speed.rs` | Per-machine speed calibration of time estimates |
+| `diagnostics.rs` | GPU detection (nvidia-smi, DXGI, sysctl on macOS), readiness checks |
| `store.rs` | SQLite gallery + content-addressed inputs |
| `paths.rs` | Path validation (no UNC/device/ADS/traversal, never overwrite) |
| `catalog.rs`, `installer.rs` | Pinned downloads (URLs, sizes, SHA-256), hardware presets, parallel resumable downloader |
| `crates/qls-service` | Headless service and stable HTTP API; single instance; lifecycle |
-| `src-tauri`, `src/` | Desktop shell (Rust) and UI (React + TypeScript) |
+| `src-tauri`, `src/` | Desktop shell (Rust) and UI (React + TypeScript); in-app updates in `src/lib/updates.ts` |
| `mcp/` | MCP server (TypeScript, official SDK) |
Internal names (`qls-core`, `qls-service`, `QLS_*` environment variables) come from the working title used
-during development (Qwen Local Studio) and are kept on purpose.
+during development (Qwen Local Studio) and are kept on purpose. Executables carry `.exe` only on
+Windows.
+
+## Platforms and engines
+
+Details and the reasoning are in [platforms.md](platforms.md); the short version:
+
+| Platform | Engine (stable-diffusion.cpp `3f8527a`) | Folder | Launch differences |
+| --- | --- | --- | --- |
+| Windows + NVIDIA | CUDA 12 build | `<sdcpp>` | `--backend cuda0 --params-backend te=cpu`, SageAttention |
+| Windows + AMD / Intel (also NVIDIA) | Vulkan build | `<sdcpp>/engine-vulkan` | `--backend vulkan0`, no SageAttention |
+| macOS, Apple Silicon | Metal build (macOS 26+) | `<sdcpp>/engine-metal` | `--backend mtl0 --mmap`; 24 GB+: `--auto-fit off` (all weights on the GPU, zero-copy); 16 GB: `--params-backend disk` |
+
+- `GpuBackend` in `config.rs` picks the engine, its folder, device name and flags. Each engine
+ is a pinned download in `catalog.rs`, so both Windows engines can stay installed.
+- GPU detection: `nvidia-smi`, then DXGI for other cards (name, vendor, dedicated VRAM), then
+ `sysctl` on a Mac (chip, unified memory). A Mac's memory becomes the "VRAM" the planner uses
+ through `planner::unified_memory_planning_mib`: Metal's share (~2/3, ~3/4 from 64 GB) minus
+ the text encoder, which shares the same memory. Presets are labelled by Mac memory there.
+- macOS paging does not relieve GPU memory: ggml keeps Metal buffers wired (residency sets), so
+ 16 GB Macs release each model after use instead (`--params-backend disk`).
+- Time estimates: the time model was measured on an RTX 5070 Ti. `speed.rs` compares every
+ finished backend job with the uncalibrated prediction and keeps a smoothed ratio per engine,
+ GPU and memory mode (`<data>/speed.json`). Uncalibrated non-CUDA machines show no estimate
+ until their first image.
+- Startup: the window starts hidden and `public/boot.js` shows it once the splash in
+ `index.html` is painted (the shell shows it after 4 s regardless).
+- Updates: Tauri updater with a signed `latest.json` in the latest GitHub release; the shell
+ stops the service before installing and replaces a running service of another version.
+ Release steps in [releasing.md](releasing.md).
## Verified backend facts (stable-diffusion.cpp commit `3f8527a`)
@@ -58,7 +89,7 @@ during development (Qwen Local Studio) and are kept on purpose.
Fast 20 steps at ~1 MP; Balanced 20 steps at ~1.5K (1536²); Quality 20 steps and Ultra
40 steps at the official 2K buckets (2048², 2752×1536…; edits share that budget with their
reference images, so they land near 2 MP on 16 GB).
-- Default launch: `--backend cuda0 --params-backend te=cpu --fa --sage-attn --vae-tiling
+- Default launch (CUDA; other engines above): `--backend cuda0 --params-backend te=cpu --fa --sage-attn --vae-tiling
--vae-tile-size 768 --vae-tile-overlap 0.125 --max-vram -1` plus `--hires-upscalers-dir`
when the upscalers folder exists (text-encoder weights in RAM, computed on the GPU). Measured
on an RTX 5070 Ti: running the text encoder fully on the CPU made a one-image edit take 240 s
diff --git a/docs/platforms.md b/docs/platforms.md
index 013dbc0..bd1f589 100644
--- a/docs/platforms.md
+++ b/docs/platforms.md
@@ -8,7 +8,7 @@ so model behaviour is identical everywhere; only speed and memory differ.
| --- | --- | --- |
| Windows + NVIDIA | CUDA 12 build | ✅ verified (RTX 5070 Ti 16 GB, RTX 5070 12 GB) |
| Windows + AMD / Intel | Vulkan build (30 MB, uses the driver's Vulkan runtime) | 🟡 beta: works on NVIDIA (RTX 5070 Ti, 2K/20 steps, slower than CUDA); AMD / Intel to verify |
-| macOS + Apple Silicon | Metal build (universal binary, shaders embedded) | 🟡 built, first run on an M2 Pro 16 GB pending (`scripts/dev/mac-dev.sh`) |
+| macOS + Apple Silicon | Metal build (universal binary, shaders embedded) | 🟡 beta: runs on an M2 Pro 16 GB (512² in ~2 min, lightest mode); `.dmg` build script ready, first packaged build pending |
| Windows + AMD via ROCm | ROCm build | ✗ not planned: open crashes (#2008), DLL conflicts (#2012), black images with k-quants (#1385) |
| Linux | Vulkan / CUDA builds exist | later |
@@ -37,26 +37,25 @@ budget (largest working size per quality level). Nothing is tuned per platform.
- an edit with 2 reference images can crash (#1991, fix in ggml not yet synced);
- no published Qwen 2.1 speeds on AMD/Intel yet.
-## macOS: Apple Silicon (in testing)
+## macOS: Apple Silicon (beta)
Evidence: [qwen-image-studio](https://github.com/sanketshinde3001/qwen-image-studio) runs Qwen 2.1
t2i and edits on a 16 GB M5 with **our exact engine build**. Its numbers: 10–12 GB peak
(`--mmap --params-backend disk`), about 75 s/step at 1024² with CFG 6, so about 37 s per model
pass. Kokon uses CFG 1, which is one pass per step.
-### Draft system requirements
+### System requirements (as in the README)
| | Minimum | Recommended |
| --- | --- | --- |
| **Chip** | Apple M1 or newer (Intel Macs: no) | M-series Pro / Max / Ultra |
| **macOS** | 26 Tahoe (the engine binary's minimum) | latest |
-| **Unified memory** | 24 GB (Fast/Balanced, up to ~1.5K) | 32 GB+ (Quality 2K); 48 GB+ gets the 8-bit model |
+| **Unified memory** | 16 GB (lightest mode, ~1 MP; verified on an M2 Pro) | 24 GB+ (everything stays loaded); 32 GB+ for Quality 2K; 48 GB+ gets the 8-bit model |
| **Disk** | 15 GB free | 25 GB on the internal SSD |
-16 GB Macs can run it only in the lightest setup: 1 MP, with each model's weights loaded when
-it runs and released afterwards. That costs only a few seconds per image; the GPU compute is
-what makes it slow. It should be offered as "not supported, try at your own risk" rather than
-blocked.
+16 GB Macs run in the lightest setup: 1 MP, with each model's weights loaded when it runs and
+released afterwards. That costs only a few seconds per image; the GPU compute is what makes it
+slow (a 512² image took ~2 min on the M2 Pro). The setup screen says so before downloading.
### Why macOS paging does not help here (verified in the source, 2026-10-09)
@@ -136,7 +135,9 @@ so nobody with a base chip is surprised.
- HEIC decoding uses Windows WIC (macOS: `sips`);
- Tauri sidecar names and the `.exe` suffix;
- data folders (`dirs` already maps them to `~/Library/...`).
-4. Packaging (todo; `tauri.macos.conf.json` prepared): a GitHub Actions `macos-14` (arm64) runner builds the `.dmg`. Without an Apple
+4. ✅ Packaging: `scripts/build-release-mac.sh` builds `Kokon.app` + `.dmg` (ad-hoc signed,
+ app icon on Apple's grid, in-app updates signed with the updater key). First packaged build
+ on a Mac pending. Notes on the options considered: a GitHub Actions `macos-14` (arm64) runner builds the `.dmg`. Without an Apple
Developer ID ($99/year) the app is unsigned. Since macOS 15, right-click → Open no longer
bypasses Gatekeeper: users must try to open it, then go to System Settings → Privacy &
Security → *Open Anyway*. Signing + notarization removes that step. The signature shows
@@ -152,5 +153,6 @@ so nobody with a base chip is surprised.
audience is large.
5. Known Metal issue: transparent (RGBA) output decodes as white (#2024, fix not merged).
Kokon outputs RGB, so only transparency-preserving edits are affected.
-6. Testing: needs a real Apple Silicon Mac with 24 GB+ (GitHub's runners have 7 GB: build
+6. Testing: runs on the M2 Pro 16 GB (device name `mtl0` fixed from that run); an M4 Pro 24 GB
+ run is planned. Originally: needs a real Apple Silicon Mac with 24 GB+ (GitHub's runners have 7 GB: build
only). Without one, ship as "beta, untested".
diff --git a/scripts/readme/make_buttons.py b/scripts/readme/make_buttons.py
index f887cec..47a8686 100644
--- a/scripts/readme/make_buttons.py
+++ b/scripts/readme/make_buttons.py
@@ -18,7 +18,7 @@ LINUX = '<path d="M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17
BUTTONS = [
# name, logo, caption, label, available
("windows", WINDOWS, "Download for", "Windows", True),
- ("macos", APPLE, "Apple Silicon", "macOS", False),
+ ("macos", APPLE, "Apple Silicon · beta", "macOS", True),
("linux", LINUX, "x86-64 · NVIDIA", "Linux", False),
]