Generate and edit images offline with Qwen-Image 2.1 on your GPU. Needs the Kokon desktop app.
https://github.com/user-attachments/assets/8851c580-99b9-432a-82be-b6d42fa9a749
✍️ Just describe it“Remove all the people from the beach.” “Make it golden hour.” Kokon picks the mode, the resolution and the memory settings for you. There are no sliders to learn. |
🔒 Private by designEverything 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. |
📦 One installerA native app built on stable-diffusion.cpp. 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. |
🎯 Edits that stay in placePaint over an area and choose Change, Remove, Replace or Add. Kokon shows the model exactly where to work, so the rest of the photo stays untouched. |
🖼️ Full-size resultsKokon keeps your photo's size and aspect ratio, and enlarges with an AI upscaler instead of blurry resizing. It also opens iPhone HEIC photos, HDR included. |
🤖 Works with your AI agentA built-in MCP server and local HTTP API let Claude, Cursor or your own scripts create and edit images on your machine. |
Every image below was made by Kokon itself (no stock photos), first try with that seed. Prompts, seeds and times are in marketing/showcase/PROMPTS.md.
![]() Remove · paint the scooter · “the red scooter” | ![]() Replace · “Replace the yellow armchair with a deep green velvet sofa and hang an abstract painting above it” |
![]() Relight · “Make it a snowy winter night, warm light glowing from the cabin windows” | ![]() Restyle · “Turn it into a hand-painted watercolor illustration” |
![]() Text · “Change the gold sign text to ‘KOKON CAFÉ’” | ![]() Expand · 40 % left and right · “continue the rocky coastline and the turquoise sea” |
1. Download from the latest release:
Kokon_<version>_x64-setup.exe. Run it. It installs for your user only, so you don't need
administrator rights.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).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 Enter.
Windows
| Minimum | Recommended | |
|---|---|---|
| OS | Windows 10 64-bit | Windows 11 |
| GPU | NVIDIA, 12 GB VRAM (RTX 3060 12 GB, 4070) · AMD / Intel 12 GB+ through Vulkan (beta) | NVIDIA, 16 GB+ VRAM (RTX 4080, 5070 Ti, 5080, 4090, 5090) |
| RAM | 16 GB | 32 GB |
| Disk | 15 GB free | 25 GB free on an SSD |
| Time per image | RTX 5070 12 GB: ~12 s per 1 MP image, ~42 s at native 2K (text to image) | RTX 5070 Ti 16 GB: ~24 s per edit at Balanced (1.5K), ~36 s for a new image at native 2K |
Mac (beta)
| Minimum | Recommended | |
|---|---|---|
| Chip | Apple M1 or newer (Intel Macs are not supported) | M-series Pro, Max or Ultra (the GPU cores set the speed) |
| macOS | 26 Tahoe | latest |
| Unified memory | 16 GB: works, but slowly (lightest mode, about 1 megapixel) | 32 GB or more (also gets native 2K) |
| Disk | 15 GB free | 25 GB free |
| Time per image | About 4 minutes for a 1 MP image on a 16 GB M2 Pro | Faster on Max/Ultra 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. 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.
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 |
|---|---|---|---|---|
| 12 GB | Qwen-Image 2.1 Turbo Q4_K (4.1 GB) | Qwen3-VL 8B Q4_K_M | ~12 GB | ✅ RTX 5070 (12 GB) |
| 16 GB | Qwen-Image 2.1 Turbo Q4_K | Qwen3-VL 8B Q4_K_M | ~12 GB | ✅ RTX 5070 Ti |
| 24 GB | Qwen-Image 2.1 Turbo Q4_K | Qwen3-VL 8B Q4_K_M | ~12 GB | not yet |
| 32 GB+ | Qwen-Image 2.1 Turbo Q4_K | Qwen3-VL 8B Q8_0 (8.7 GB) | ~16 GB | not yet |
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 and the Qwen3-VL vision projector and, on a PC, the Superscale-SP upscaler (67 MB). The image model is Qwen's official 8-step Qwen-Image 2.1 Turbo through DogukanUrker/Qwen-Image-2.1-Turbo-GGUF; the other sources are Qwen/Qwen3-VL-8B-Instruct-GGUF and Comfy-Org/Qwen-Image-2.1.
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.
| You give Kokon | It does | |
|---|---|---|
| A sentence | Create a new image | Aspect ratio from the prompt or the aspect menu |
| A photo + a sentence | Edit it | Original size and aspect ratio are kept |
| Several photos + a sentence | Combine them | Refer to them as “image 1”, “image 2”… and drag to reorder |
| A brushed area + an action | Inpaint: Change, Remove, Replace or Add | Remove needs no prompt |
| Dragged edges | Expand the photo (outpainting) | Or type pixel or percent values |
| Any result | Upscale to 2×, 4K, the source size or a custom width | With the upscaler model, in seconds |
New to prompts? The prompt guide shows good and bad prompts side by side, with real results.
Every result can be edited again, varied, used as a reference, upscaled, saved, copied or opened in Explorer or Finder. A few things make that loop fast:
flowchart LR
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>Superscale-SP, back to<br>full size</sub>"]
D --> E["🖼️ Result<br><sub>gallery + recipe</sub>"]
M["🤖 Claude · Cursor · scripts"] -. "MCP / local API" .-> B
The planner decides what kind of job your request is, picks a working size that fits your GPU and runs a single diffusion pass. When the result has to be larger than what the model rendered, it is enlarged with an AI upscaler instead of a plain resize. For brushed edits, Kokon marks the area on a second reference image so the model knows exactly where to work. Without that, Qwen-Image 2.1 cannot see the mask.
Want the details? The engineering notes cover the architecture, the measured backend settings and the reasons behind each default.
Kokon ships kokon-mcp, an MCP server. Register it once
with Claude Code:
# Windows
claude mcp add --scope user kokon -- "$env:LOCALAPPDATA\Kokon\kokon-mcp.exe"
# Mac
claude mcp add --scope user kokon -- /Applications/Kokon.app/Contents/MacOS/kokon-mcp
Or, on either system with Node.js 22+, through npm (still needs the app installed):
claude mcp add --scope user kokon -- npx -y 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.
Tools: generate_image · edit_image · edit_images · inpaint_image · outpaint_image · upscale_image · get_image_info · get_generator_status
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):
{
"mcpServers": {
"kokon": {
"type": "stdio",
"command": "C:\\Users\\<you>\\AppData\\Local\\Kokon\\kokon-mcp.exe",
"args": []
}
}
}
Same thing from the command line:
claude mcp add-json --scope user kokon '{"type":"stdio","command":"C:\\Users\\<you>\\AppData\\Local\\Kokon\\kokon-mcp.exe","args":[]}'
CLAUDE_PROJECT_DIR). Reads and writes are
limited to the project folder, Kokon's output folder and folders listed in
QLS_MCP_ALLOWED_DIRS (separated by semicolons). Existing files are never overwritten.include_preview: true to include a small JPEG preview.upscale_image takes scale (default 2) or width/height (up to 8192 px).MCP_TOOL_TIMEOUT).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
(Mac: ~/Library/Application Support/KokonData/service.json).
Requests that carry a browser Origin header are refused.
$i = Get-Content "$env:LOCALAPPDATA\KokonData\service.json" | ConvertFrom-Json
$h = @{ Authorization = "Bearer $($i.token)" }
Invoke-RestMethod -Method Post "http://127.0.0.1:$($i.port)/api/v1/generate" -Headers $h `
-ContentType 'application/json' -Body '{"prompt":"a lighthouse at dusk, 16:9","quality":"fast"}'
| Method | Path | Purpose |
|---|---|---|
| GET | /ping | Liveness (no auth) |
| GET | /status | Server state, model, GPU/VRAM, active job, queue |
| POST | /generate, /edit, /inpaint, /outpaint, /upscale | Simple operations; wait for the result unless ?wait=false |
| POST | /jobs | Full request (see GenerationRequest in planner.rs) |
| GET | /jobs/{id}, /jobs/{id}/wait?timeout=60 | Job status / long-poll |
| POST | /jobs/{id}/cancel | Cancel |
| POST | /plan | Dry run: resolved mode, working/output size, notes |
| GET | /events | Server-sent events (jobs, server, gallery) |
| GET | /gallery, /gallery/{id}, /gallery/{id}/image | Gallery |
| POST | /image-info | Size, aspect, type, embedded generation metadata |
Simple-operation fields: prompt, image / images[], mask, action
(edit|remove|replace|add, inpainting), width, height, aspect_ratio, quality
(fast|balanced|quality), seed, output_path, preserve_dimensions, private,
left/right/top/bottom + units (pixels|percent) for outpainting, scale for upscaling.
Full requests (/jobs) also accept "mode": "upscale" with "upscale": {"scale" | "width"/"height"}.
Kokon makes only two kinds of network request:
github.com for the stable-diffusion.cpp release (and the MoSR upscaler, if the copy
that comes with the app is missing) and huggingface.co for the models and the other upscalers.latest.json from this repository's
latest GitHub release, a small file with the newest version number. Nothing about you or your
images is sent. Turn it off on the welcome screen or in Settings → General. Updates are
downloaded only when you click Update, and installed only if their signature matches the
key built into the app.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, 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 window, or restart the service. Save as… still writes a copy wherever you choose.
Kokon does one thing: editing photos with Qwen-Image 2.1, with as little setup as possible. 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 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 | ❌ | ❌ | ✅ | ❌ |
SmartScreen shows this for new apps that don't have a download history yet. Click More info → Run anyway. You can check the installer against the SHA-256 hash listed in the release notes, or build it yourself.
Kokon is not notarized by Apple (that needs a paid Apple developer account), so macOS blocks it the first time. You only do this once; in-app updates don't trigger it again.
Open Kokon. macOS says “Kokon” Not Opened: click Done (not Move to Trash).
Open System Settings → Privacy & Security and scroll down to Security. Next to “Kokon” was blocked to protect your Mac, click Open Anyway, then confirm with your password or Touch ID.
Open Kokon again and click Open in the last prompt.
You can also build it yourself.
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.
AMD and Intel: in beta. The setup screen installs stable-diffusion.cpp's Vulkan build for them, which uses the graphics driver you already have. It works on NVIDIA cards, but it has not been verified on a real AMD or Intel card yet; integrated graphics are not supported. Please open an issue with your card and how it went.
Mac: yes, in beta, on Apple Silicon (M1 or newer) with macOS 26. It runs on a 16 GB Mac in a lighter mode, but slowly (about 4 minutes per 1-megapixel image on an M2 Pro); 32 GB or more and a Pro, Max or Ultra chip are recommended. See the requirements and docs/platforms.md.
Not with good results today. Qwen-Image 2.1 is a large model, and 12 GB is the smallest size Kokon is designed for. Smaller cards may come with lighter models in the future.
Not with the default model. Kokon's code is open source (see License), but the image model has its own license: Qwen-Image 2.1 and its Turbo model are released under the Qwen Research License, which allows research and evaluation only, no commercial use. That includes selling or using commercially the images you make with it. For commercial use, ask the Qwen team for a license (model-business@notice.qwencloud.com).
The Qwen3-VL text encoder is Apache-2.0. The default upscaler, Superscale-SP by Nmkd, is WTFPL, and the experimental MoSR by Philip Hofmann is CC BY 4.0: both allow commercial use. The optional UltraSharp upscaler is CC BY-NC-SA 4.0, non-commercial only.
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
recent Apple systems show them in HDR, and every other viewer shows a normal JPEG. This needs
ffmpeg 7.1+ on PATH; without it the result is saved in SDR and the job's notes say why.
By default Superscale-SP by Nmkd (ESRGAN), downloaded by the setup screen; on a Mac, Lanczos, because AI upscalers take minutes there (Superscale-SP: 5 min 45 s to enlarge a 1024×1024 image to 2048×2048 on an M2 Pro, against about a second). Pick another one in the Advanced menu next to the prompt, or in Settings → Models; Compare upscalers there shows each one on the same crops (a face, a JPEG photo, a night street, text, a landscape, a 4× upscale):
Upscaler strength (0–100 %) mixes the upscaler's result with a plain resize, to tone down texture it invents. Settings → Models also has Shrink the image before upscaling, which gives the upscaler a smaller image, like the ones it was trained on.
| 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 |
Windows: Settings → Apps → Installed apps → Kokon → Uninstall. The uninstaller asks whether to
delete the downloaded models and app data too (%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.
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 with your GPU (or Mac model), driver
or macOS version and the log from KokonData/logs (see the table above).
Have an idea? Start a discussion or 👍 an existing one.
Windows: Rust (stable, MSVC), Node 22+, Visual Studio Build Tools and WebView2.
npm install
cargo test -p qls-core # core unit tests
npx vitest run # UI logic tests
cd mcp; npx vitest run; cd .. # MCP tests (includes a stdio protocol test)
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 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.
flowchart TB
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</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
SVC -- "native async API" --> SD
The Rust core (crates/qls-core) holds all the logic: geometry, image processing, planning,
the inference adapter, the job queue and the gallery. The service, the desktop app and the
MCP server are thin layers on top. See the engineering notes
for a module map and the backend facts each default is based on.
Bug reports, translations, example prompts and pull requests are all welcome. Issues tagged good first issue are a good place to start. Please run the tests above before opening a pull request.
Kokon edits real photos. Don't use it to deceive, harass or impersonate people, or to make images of someone without their consent. You are responsible for what you create and share.
Kokon's source code is released under the GNU Affero General Public License v3.0 (AGPL-3.0-only). You can use, study, change and share it freely. If you distribute a modified version, or offer one as a network service, you must publish its source under the same license. The license covers the code, not the images you make with it.
Want to ship Kokon inside a closed-source product or service? A commercial license is available: open a discussion or contact the author.
Model weights and the upscaler are downloaded from their authors and keep their own licenses (see the FAQ).
Kokon builds on stable-diffusion.cpp by leejet, Qwen-Image 2.1 and its Turbo model by the Qwen team, DogukanUrker's Turbo GGUF conversions, Tauri and the upscalers by Nmkd (Superscale-SP), Philip Hofmann (4xNomos2 MoSR) and Kim2091 (UltraSharp). Thank you.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y kokon-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-gabrielelozupone-kokon": {
"command": "npx",
"args": [
"-y",
"kokon-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceKokon works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.