kokon
A local, offline Qwen-Image 2.1 server for generating, editing, expanding, inpainting and upscaling images on your own GPU, plus two read-only info tools.
generate_image — create a new image from a text prompt (auto dimensions or explicit width/height/aspect_ratio like 16:9).
edit_image — change an existing image with a natural-language instruction, preserving its size and aspect ratio by default.
edit_images — combine up to 10 reference images into one result, referring to them as image 1, image 2, etc.
inpaint_image — modify only a masked area, with actions edit, remove, replace, or add (white = change, black = keep).
outpaint_image — extend an image beyond its borders by pixels or percent per side, keeping original pixels intact.
upscale_image — enlarge an image by a scale factor (up to 8x) or to a target width/height up to 8192 px.
get_image_info — report width, height, aspect ratio, file type and, for Kokon-made images, embedded generation metadata (prompt, seed, model, steps).
get_generator_status — report whether the inference server is running, model loaded, GPU/VRAM, active job and queue.
Most tools share options for seed, quality preset (fast, balanced, quality), output_path (existing files are never overwritten) and include_preview to return a small JPEG instead of keeping images local.
https://github.com/user-attachments/assets/8851c580-99b9-432a-82be-b6d42fa9a749
Why Kokon
Related MCP server: Qwen 2 MCP Server
Examples
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” |
Install
1. Download from the latest release:
Windows:
Kokon_<version>_x64-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, or run one Terminal command if there is no such button (details).Linux (x86-64, beta):
Kokon_<version>_amd64.debfor Ubuntu, Debian and Mint, orKokon-<version>-1.x86_64.rpmfor Fedora. Install it with your package manager, which also pulls in the few libraries it needs:sudo apt install ./Kokon_<version>_amd64.deb # Ubuntu 22.04+, Debian 12+, Mint 21+ sudo dnf install ./Kokon-<version>-1.x86_64.rpm # Fedora 40+For NVIDIA cards you need the proprietary driver (the CUDA runtime comes with Kokon). AMD and Intel cards use Mesa's Vulkan driver, installed on most desktops already. If apt prints "Download is performed unsandboxed as root", that's harmless (apt can't read your home folder); copy the .deb to
/tmpfirst to avoid it.
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.
Requirements
Windows
Minimum | Recommended | |
OS | Windows 10 64-bit | Windows 11 |
GPU | NVIDIA, 12 GB VRAM (RTX 3060 12 GB, 4070); 8 GB in beta (RTX 3060 Ti, RTX 5050 Laptop) · 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 | 15 Sequoia | 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 |
Linux (beta)
Minimum | Recommended | |
Distribution | x86-64: Ubuntu 22.04, Debian 12, Mint 21, Fedora 40 (or newer) | the latest Ubuntu LTS or Fedora |
GPU | As on Windows: NVIDIA 12 GB (8 GB in beta) with the proprietary driver · AMD / Intel 12 GB+ through Vulkan (beta) | NVIDIA, 16 GB+ VRAM |
RAM | 16 GB | 32 GB |
Disk | 15 GB free | 25 GB free on an SSD |
Kokon measures your machine's speed with the first image and shows realistic time estimates from then on.
NVIDIA cards run on the CUDA engine, the fastest and tested path. AMD and Intel cards use theVulkan engine (beta). First user report on AMD: an RX 9060 XT 16 GB on Windows made a 16:9 1080p image at Balanced in about 80 s (the first image after start, model loading included), with edits quicker after that. Intel is still untested, 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. On Linux Kokon ships its own CUDA and Vulkan builds of the same engine, tested so far on an RTX 5070 Ti under WSL. Details in docs/platforms.md and docs/linux.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 |
8 GB (beta) | Qwen-Image 2.1 Turbo Q4_K (4.1 GB) | Qwen3-VL 8B Q4_K_M | ~12 GB | by users: RTX 3060 Ti, RTX 5050 Laptop |
12 GB | Qwen-Image 2.1 Turbo Q4_K | 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 with madebyollin's texture fix (it removes the faint 2-pixel checkerboard of the original decoder; installs from 0.9.2 or earlier switch to it when you accept the update), 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, madebyollin/texture-fix-vae-for-qwen-image-2.1 and Comfy-Org/Qwen-Image-2.1 (the original VAE).
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.
Already have Qwen-Image 2.1 files, for example in ComfyUI? Choose Use models I already have in
the setup screen and pick the folder (such as ComfyUI\models): Kokon finds the image model, VAE,
text encoder and vision projector by their contents, as GGUF or safetensors in any quantization,
and downloads only the engine and any piece you don't have. Files stay where they are. Your own
files are not tested by Kokon; you can switch to the official files at any time in Settings → Models.
What you can do
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 |
Any result | Colour-grade it with a LUT | Eight built-in looks (Neutral takes out a yellow cast) or your own |
A short idea, in any language | Prompt+ writes the detailed prompt first | You watch it being written; for edits it looks at your photo. Runs on the model Kokon already has: no extra download, a few seconds more |
Your own LoRA files | Apply them to a project (beta) | Qwen-Image 2.1 LoRAs ( |
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, Finder or your file manager. A few things make that loop fast:
Before/after: compare with Slider, Flicker or Changes, or hold B to see the original.
Undo/redo between versions with Ctrl+Z / Ctrl+Y (⌘ 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.
Clean up in one go: press Select (or Ctrl/⌘-click, Shift-click for a range) to remove several projects or delete several gallery images at once.
Quality presets: Fast (the default, ~1 MP), Balanced (~1.5K) and Quality (native 2K). All run Qwen's official 8-step Turbo model with its own schedule, so you never need to tune steps or guidance.
How it works
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" .-> BThe 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.
With Prompt+ on, the planner first asks the model's own text encoder (Qwen3-VL, already loaded to read your prompt) to write a detailed English prompt, looking at your photo for edits. It runs inside stable-diffusion.cpp, so there is no second language model in memory. The image then uses that prompt, and the result keeps both yours and the written one.
The engine
Kokon runs on stable-diffusion.cpp by leejet. Prompt+ needed something it doesn't have: a way for the Qwen3-VL text encoder, already loaded for the image, to write text. The easy route was a second language model next to it, but another 5 GB model doesn't fit beside Qwen-Image 2.1 on 8–12 GB cards or on most Macs. So since 0.10 Kokon runs its own build of stable-diffusion.cpp, from our fork, on Windows, macOS and Linux. It is upstream plus a few additions:
Text generation on the loaded text encoder: a decoding loop with a KV cache, sampling, the chat template with image tokens, and a
/sdcpp/v1/text_genendpoint in sd-server. With greedy decoding it writes the same tokens as llama.cpp on the same GGUF.Room on small cards: while it writes, the diffusion model and the VAE wait in RAM if the GPU is short of memory, and come back in about half a second for the image. Prompt+ fits within 8 GB (tested on an 8 GB-capped card).
Speed: the decoding step is reused from token to token and, on NVIDIA, replayed as a CUDA graph: about 127 tokens/s on an RTX 5070 Ti (llama.cpp: 133–145), so a prompt takes 1–2 s.
The image side is upstream's code, and our changes leave its images bit-identical. We proposed the text generation upstream (#2155); leejet prefers to keep text generation out of stable-diffusion.cpp, since llama.cpp already does it, which is fair. So it lives in our fork, which we keep close to upstream's master. Kokon still works with an official stable-diffusion.cpp release, just without Prompt+.
Want the details? The engineering notes cover the architecture, the measured backend settings and the reasons behind each default.
Use it from your AI agent
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-mcpOr, on either system with Node.js 22+, through npm (still needs the app installed):
claude mcp add --scope user kokon -- npx -y kokon-mcpThen 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":[]}'Every result returns the absolute path of the saved file, its size, seed and generation metadata.
Paths may be absolute or relative to the project (
CLAUDE_PROJECT_DIR). Reads and writes are limited to the project folder, Kokon's output folder and folders listed inQLS_MCP_ALLOWED_DIRS(separated by semicolons). Existing files are never overwritten.Images are not sent back to the model by default; they stay on disk. Pass
include_preview: trueto include a small JPEG preview.upscale_imagetakesscale(default 2) orwidth/height(up to 8192 px).Progress is reported through MCP progress notifications. Claude Code's default tool timeout is 30 minutes (
MCP_TOOL_TIMEOUT).Without the desktop window open, the model is unloaded after 15 idle minutes (Settings → General).
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 |
| Liveness (no auth) |
GET |
| Server state, model, GPU/VRAM, active job, queue |
POST |
| Simple operations; wait for the result unless |
POST |
| Full request (see |
GET |
| Job status / long-poll |
POST |
| Cancel |
POST |
| Dry run: resolved mode, working/output size, notes |
GET |
| Server-sent events (jobs, server, gallery) |
GET |
| Gallery |
POST |
| 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"}.
Privacy
Kokon makes only two kinds of network request:
Setup:
github.comfor the stable-diffusion.cpp release (and the MoSR upscaler, if the copy that comes with the app is missing) andhuggingface.cofor the models and the other upscalers.Update check: at most once a day, the app fetches
latest.jsonfrom 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.
How it compares
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 ( | 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 |
Linux | beta ( | ✅ | ✅ | ✅ |
Custom pipelines, node graphs | ❌ | ✅ | partly | ❌ |
Painting and layers | ❌ | ❌ | ✅ | ❌ |
FAQ
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.
If macOS instead only says The application “Kokon” can't be opened, with just an OK button, and Privacy & Security shows no Open Anyway: open Terminal and run
xattr -dr com.apple.quarantine /Applications/Kokon.appthen open Kokon as usual. This removes the "downloaded from the internet" flag from Kokon only; Gatekeeper stays on for everything else.
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. A user's RX 9060 XT 16 GB made a 1080p image at Balanced in about 80 s (first image, model loading included); Intel Arc is still untested, and 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 15 Sequoia or newer. 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.
Linux: yes, in beta, on x86-64 with a .deb (Ubuntu, Debian, Mint) or an .rpm (Fedora). NVIDIA
cards run Kokon's own CUDA build of the engine, AMD and Intel cards its Vulkan build. A headless
server with the interface in your browser, and a Docker image, come next
(#15).
Yes, in beta since 0.9.3. Setup picks the 8 GB preset: the same files as the 12 GB one, with smaller working sizes, so images are made at about 1 megapixel (then enlarged). Users report it works on an RTX 3060 Ti and on an RTX 5050 Laptop, where an edit takes 1–2 minutes. The text encoder runs from system RAM, so 16 GB of RAM or more is recommended. If you try it, please tell us how it runs in an issue.
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):
Superscale-SP (default): sharp and natural on most images; on JPEG photos and dark areas it can draw a faint grid.
MoSR (experimental, 17 MB, comes with the app): the fastest, good for 4× upscales, but on clean images enlarged less than about 3× it draws a fine grid. Kokon contributed it to stable-diffusion.cpp (pull request #2128, merged 2026-10-12).
UltraSharp (optional download): very clean, but smooths skin into an artificial look and can invent lines. Non-commercial license.
Lanczos: a plain resize, never invents anything.
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 |
|
|
Settings |
|
|
Gallery database, inputs, thumbnails, logs |
|
|
Models (default) |
|
|
API port and token |
|
|
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).
Roadmap
Create, edit, combine, brush edits, expand, upscale
First-run setup with GPU detection and verified, resumable downloads
MCP server and local HTTP API
Before/after, version undo, private mode, HEIC and HDR
macOS on Apple Silicon (beta, Metal)
One-click in-app updates on Windows, Mac and Linux
Linux (
.deband.rpm, beta)Colour LUTs: built-in looks and your own
.cubefilesQwen's official 8-step Turbo model for every preset
Prompt+: the prompt enhancer on the model Kokon already has (0.10.0)
Your own LoRA files, per project (0.10.0, beta)
AMD and Intel GPUs through Vulkan (beta now; works on NVIDIA, to verify on AMD/Intel)
Background removal and transparent cutouts
Batch edits: one instruction for a whole folder
Curated LoRAs tested with Kokon, installed in one click
Headless server with the interface in the browser, then Docker (#15)
Plugins for Krita, GIMP and Photoshop through the local API
Have an idea? Start a discussion or 👍 an existing one.
Build from source
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 # installerMac (Apple Silicon, macOS 15+): 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/Linux (x86-64): Rust (stable, via rustup), Node 22+ and Tauri's system packages. Build on the oldest distribution you want to support (releases are built on Ubuntu 22.04).
bash scripts/build-release-linux.sh --setup # once: system packages
bash scripts/build-release-linux.sh # .deb + .rpm in dist-release/Publishing a release (signed in-app updates for every platform) 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" --> SDThe 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.
Contributing
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.
Responsible use
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.
License
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 (since 0.10 through our fork, kept close to upstream), 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.
Available Tools
8 toolsedit_imageEdit imageA
Edit an existing image with a natural-language instruction (e.g. 'make the background nighttime, keep the foreground unchanged'). Preserves the input's width, height and aspect ratio by default. The input file is never overwritten.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results; omit or -1 for random | |
| prompt | Yes | The change to make, e.g. 'make the background nighttime, keep the foreground unchanged' | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| image_path | Yes | Image to edit (absolute, or relative to the project) | |
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. | |
| preserve_dimensions | No | Keep the input's exact width/height (default true) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the safety profile (destructiveHint=false, idempotentHint=false), so the bar is lower. The description adds genuinely useful behavior beyond those: the input file is never overwritten and width/height/aspect ratio are preserved by default. It stops short of describing the return payload or latency, but the added mutation-safety context is solid.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with purpose, then the default behavior, then the non-destructive guarantee. Every sentence carries information and nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter non-read-only tool with no output schema, the description covers purpose, preservation default, and the no-overwrite guarantee. It does not address seed/quality trade-offs or what the result contains, but those are handled by the input schema and include_preview documentation. Sufficient, with minor room to grow.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description's prompt example and the dimension-preservation default merely mirror what the schema already documents, adding no syntax or semantics beyond it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb and resource ('Edit an existing image') plus the interaction mode ('natural-language instruction') with a concrete example. This clearly separates it from siblings like generate_image (creation), inpaint_image/outpaint_image (region-specific operations), and edit_images (plural/batch).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'Edit an existing image', and the default dimension-preservation behavior is stated, but the description never says when to prefer this over edit_images, inpaint_image, or outpaint_image, nor does it state prerequisites. No exclusions or routing guidance is offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_imagesEdit with multiple referencesA
Create an image from several reference images (up to 10) and an instruction. Order matters: refer to them as image 1, image 2, ... in the prompt. The output follows image 1's aspect ratio unless width/height or aspect_ratio are given.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results; omit or -1 for random | |
| width | No | ||
| height | No | ||
| prompt | Yes | e.g. 'Use the person from image 1, the clothing from image 2 and the lighting of image 3' | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| image_paths | Yes | Reference images in order; refer to them as image 1, image 2, ... in the prompt | |
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| aspect_ratio | No | Aspect ratio such as 1:1, 4:3, 3:4, 16:9, 9:16, or auto (inferred from the prompt) | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare the general write/non-idempotent profile, so the description adds real value: the ordering contract ('refer to them as image 1, image 2, ... in the prompt') and the default output sizing rule ('follows image 1's aspect ratio unless width/height or aspect_ratio are given'). It does not cover file-safety behavior on output (non-overwrite, project-scoped paths), though the schema does.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with the core action, followed by the two rules an agent would otherwise get wrong (ordering and default aspect ratio). The only mild redundancy is '(up to 10)', which the schema's maxItems already states.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 9-parameter generation tool with no output schema, the description supplies the key invocation semantics and the include_preview parameter hints at the return shape, but it never states what a successful call yields (image path/list) or that generation is nondeterministic unless seed is set. The remaining gap is small given the strong schema coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 78%, so the schema already carries most parameter meaning (seed, quality, output_path, aspect_ratio are all documented inline). The description goes beyond it by explaining parameter interaction: reference order maps to 'image 1, image 2' labels in the prompt, and width/height/aspect_ratio override the inherited image-1 aspect ratio.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource ('Create an image from several reference images ... and an instruction'), which clearly separates it from the singular sibling edit_image by emphasizing multiple ordered references. It stops short of naming or contrasting any sibling explicitly, so an agent must infer the boundary from the 'several reference images' phrasing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied rather than stated: the multi-reference, instruction-driven framing suggests when this beats generate_image or edit_image, but there is no explicit when-to-use/when-not-to-use rule or named alternative. Guidance is adequate but left to inference given seven siblings that overlap in the image-editing space.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageGenerate imageA
Generate an image from a text prompt with the local Qwen-Image 2.1 model. Dimensions are chosen automatically (aspect ratio can be inferred from the prompt, e.g. '16:9 hero image') unless width/height or aspect_ratio are given. Returns the absolute path of the saved PNG. Runs fully offline; typically 45 s–4 min.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results; omit or -1 for random | |
| width | No | Output width in pixels (needs height too). Omit to choose automatically. | |
| height | No | Output height in pixels (needs width too). | |
| prompt | Yes | What to generate, in natural language | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| aspect_ratio | No | Aspect ratio such as 1:1, 4:3, 3:4, 16:9, 9:16, or auto (inferred from the prompt) | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare non-readOnly, non-idempotent, non-destructive, closed-world, so the safety profile is covered and the description builds on it usefully. It adds genuinely non-schema behavior: runs fully offline, typical runtime of 45 s to 4 min, and returns the absolute path of the saved PNG. It could have noted whether the model must be loaded or whether generation can be cancelled/queued.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, each load-bearing: purpose, dimension defaults, return value, environment/latency. The core action and model are front-loaded, and nothing is restated from the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-output-schema generation tool the description covers the essentials an agent needs: what it produces, where the artifact lands, how long it takes, and that dimensions resolve automatically. Minor gap: it does not mention that the local model may need to be ready or how failures surface, despite a get_generator_status sibling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3, but the description adds inference behavior the schema does not: aspect ratio can be parsed from the prompt text (e.g. '16:9 hero image') and dimensions default automatically. That is real added meaning beyond the per-parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Generate an image from a text prompt') and names the backing model (local Qwen-Image 2.1), which differentiates it functionally from the edit/inpaint/upscale siblings that take reference images. It never explicitly contrasts itself with those siblings, so an agent must infer the text-to-image vs image-editing split from the verb alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage guidance is parameter-centric rather than routing-centric: it explains that dimensions are auto-chosen unless width/height or aspect_ratio are given, which tells the agent how to call it but not when to prefer edit_image, outpaint_image, or upscale_image instead. No prerequisites (e.g., model availability) are stated, though get_generator_status exists as a sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_generator_statusGenerator statusBRead-onlyIdempotent
Whether the local inference server is running and the model loaded, GPU and VRAM, the active job and the queue.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds valuable context about what status data is available (server, model, GPU, VRAM, job, queue), but does not disclose return format, latency, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
It is a single front-loaded sentence with no filler, listing the status categories efficiently. The structure is a noun-clause fragment rather than a full sentence, but it remains clear and appropriately sized for the tool's scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description carries the burden of explaining return values; it covers the major status categories an agent would need (server, model, GPU/VRAM, active job, queue). It does not detail exact response fields or formatting, but given the tool's low complexity and richness of annotations, the coverage is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4 per the rubric. There is no parameter information to add or evaluate, and the empty schema is fully consistent with the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states this tool reports generator status and enumerates the key status components: local server running, model loaded, GPU/VRAM, active job, and queue. It distinguishes itself from the generation/edit siblings by being the only status-query tool, though it does not explicitly name or route away from get_image_info.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit when-to-use guidance, prerequisites, or alternatives. It implies a status-checking use through the listed return content, but there is no statement such as 'use before generate_image to verify readiness' or 'use instead of get_image_info when checking server health.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_image_infoImage infoCRead-onlyIdempotent
Width, height, aspect ratio, file type and, for images made by Kokon, the generation metadata (prompt, seed, model, steps...).
| Name | Required | Description | Default |
|---|---|---|---|
| image_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description does add real value by disclosing the conditional branch: generation metadata (prompt, seed, model, steps) is only returned for Kokon-produced images. It does not mention error behavior for missing or non-image paths.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One compact sentence that front-loads the common fields and qualifies the metadata case at the end. No wasted words, though the fragment style means the action itself is never stated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only inspection tool with no output schema, the description does convey the shape of the returned data, which is the main need. It still leaves the input parameter and failure modes unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for the single required parameter image_path, and the description offers no clarification of it — no path format, no local-vs-URL distinction, no constraints. With low coverage the description is expected to compensate, and it does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description enumerates the fields it returns (width, height, aspect ratio, file type, generation metadata), which lets an agent infer it reads image metadata, but it never states a verb or the resource explicitly and gives no differentiation from the sibling generation tools. It reads as an output-field list rather than a statement of purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to call this versus the sibling tools (generate_image, edit_image, upscale_image, etc.) or what prerequisites apply. The only hint is the conditional 'for images made by Kokon', which describes output variance rather than usage conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inpaint_imageInpaint imageA
Change only the masked area of an image (mask: white = change, black = keep): edit it, remove what is there, replace it, or add something inside it. The model is shown the area marked on a copy of the image; pixels outside the mask are preserved exactly.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results; omit or -1 for random | |
| action | No | edit: change the area as the prompt says; remove: erase what is there and fill with background (prompt optional, e.g. 'the bin'); replace: put the prompt's subject in its place; add: add the prompt's subject inside the area | edit |
| prompt | No | The change, or the subject to add/replace with; optional for remove | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| mask_path | Yes | Mask image: white = area to change, black = keep (or opaque strokes on a transparent layer) | |
| image_path | Yes | ||
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations cover the safety profile (destructiveHint=false, non-idempotent), and the description adds real behavioral context beyond them: that pixels outside the mask are preserved exactly and that the model sees the marked region on a copy of the image. It does not discuss failure modes or how the non-idempotent seed affects reruns, so not a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, the core constraint front-loaded in the first clause, and the second sentence adds a genuinely useful guarantee. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 8-parameter generation tool with no output schema, the description adequately explains the transformation and preservation guarantee, leaving quality/seed/output_path details to the well-covered schema. It omits any note on runtime or result handling, a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 88%, so the schema already carries nearly all parameter meaning. The description restates the mask convention (white = change, black = keep) and the four action modes, which duplicates rather than extends the schema. Baseline 3 is correct.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a precise verb+resource+scope: 'Change only the masked area of an image' with an immediate inline definition of mask semantics. This distinguishes it cleanly from siblings like edit_image (whole image) and outpaint_image (extends canvas).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The mask semantics imply when the tool applies (partial, localized edits), but there is no explicit routing guidance versus edit_image, edit_images, or outpaint_image. The agent must infer the boundary from the mask requirement alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
outpaint_imageExpand image (outpaint)A
Extend an image beyond its borders. Give the expansion per side in pixels or percent; the canvas, mask and model-aligned sizes are built automatically and the original pixels are preserved exactly.
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| left | No | ||
| seed | No | Seed for reproducible results; omit or -1 for random | |
| right | No | ||
| units | No | Units for left/right/top/bottom; percent is relative to the image width (left/right) or height (top/bottom) | pixels |
| bottom | No | ||
| prompt | Yes | What the extended area should contain | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| image_path | Yes | ||
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare the safety profile (non-destructive write, not idempotent), and the description adds meaningful behavior beyond that: canvas, mask, and model-aligned sizes are auto-derived, and the original pixels are preserved exactly. It still omits where the new file lands and what the runtime cost is for the three quality tiers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no padding; the core operation is front-loaded and the automatic-canvas note follows immediately. Every clause carries information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 11-parameter generation tool with no output schema, the description covers the mechanic but not the result: whether an image file is written, where it is written by default, or how long the quality tiers take is left to the schema and annotations. Adequate, but an agent cannot fully predict the call outcome.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 55%; the description maps the expansion to per-side values and pixels/percent, which corresponds to top/left/right/bottom and units. However, several parameters (quality, seed, output_path, include_preview) are documented only in the schema, so the description adds little beyond the coverage baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Extend an image beyond its borders'), which naturally separates it from inpaint (fill inside) and upscale (resize). It never names a sibling tool, so an agent must infer the boundary rather than being told it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains how to specify the expansion but not when to reach for this tool instead of edit_image, inpaint_image, or generate_image, and gives no prerequisites or exclusions. Usage is only implied by the operation itself.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
upscale_imageUpscale imageA
Enlarge an image (default 2x, or to a width/height up to 8192 px). Runs the upscaler model chosen in Kokon (Superscale-SP by default; seconds on a PC GPU, longer on a Mac; adds no new content). Saves a new file; the input is never overwritten.
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Enlargement factor, e.g. 2 (default 2 when no width/height is given) | |
| width | No | Target width in pixels; height follows the aspect ratio unless also given | |
| height | No | Target height in pixels; width follows the aspect ratio unless also given | |
| image_path | Yes | Image to upscale (absolute, or relative to the project) | |
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish readOnly=false and destructiveHint=false, so the description's job is to add context, which it does: it discloses that a new file is saved, the input is never overwritten, no new content is hallucinated, and runtime varies by hardware. That is meaningful behavioral detail beyond the annotations, though permissions/prerequisites are not addressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences, front-loaded with the core action and default, followed by model/timing context and output-safety guarantees. Every sentence carries information, though the model-name detail is the least essential.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully explains that a new file is written and where output_path constraints apply, and it covers the preview option's default-false behavior. Minor gaps remain around what the tool result returns when include_preview is false, but overall the definition is complete enough to call correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so every parameter is already documented in the schema, including the default-2 scale, the 8192 px maximum, and the never-overwrite output_path behavior. The description largely restates those facts, so it adds little beyond the structured fields; baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a precise verb and resource ('Enlarge an image') and immediately bounds the operation with the default 2x factor and the 8192 px ceiling, so an agent knows exactly what the tool produces. Upscaling is inherently distinct from the sibling generate/edit/inpaint/outpaint tools, and the description reinforces this with 'adds no new content'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied ('enlarge an image') and the model/timing context ('seconds on a PC GPU, longer on a Mac') helps set expectations, but there is no explicit when-to-use versus when-not, and no routing to or away from siblings like edit_image or inpaint_image. A minimum-viable level of guidance only.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v0.9.3- First observed
edit_image - First observed
edit_images - First observed
generate_image - First observed
get_generator_status - First observed
get_image_info - First observed
inpaint_image - First observed
outpaint_image - First observed
upscale_image
TDQS
Scored across 8 tools
Most tools have clearly distinct purposes (outpaint, inpaint, upscale, info, status), and descriptions clarify boundaries between inpainting and editing. However, edit_image vs edit_images differ by a single character while doing conceptually different things (single-image instruction edit vs multi-reference generation), which is a real misselection hazard.
Every tool follows a consistent snake_case verb_noun pattern (generate_image, edit_image, outpaint_image, inpaint_image, upscale_image, get_image_info, get_generator_status). The convention is predictable throughout with no style mixing.
Eight tools is well-scoped for an offline image generation/editing server; each operation (generate, edit, multi-ref compose, outpaint, inpaint, upscale, inspect, status) earns its place without redundancy.
The surface covers the full generation-to-post-processing lifecycle plus system status, which is strong for the domain. Minor gaps remain: no way to list, delete, or manage saved output files, which an agent may eventually need.
Maintenance
Related MCP Connectors
AI image, video & music generation. Flux, Veo 3.1, Suno V5. Free tier included.
Generate images, videos, music & lip sync with 200+ AI models (Flux, Veo 3, Kling, Suno)
Generate, edit and upscale images with references, batch jobs, cost previews and original downloads.
Image, video, chat and speech models with one account — local (npx) or hosted with OAuth sign-in.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal AI generation for images, audio, speech, and 3D models using open source models.3GPL 3.0
- AlicenseAqualityBmaintenanceEnables image editing, remixing, and text-to-image generation using Qwen 2 models via RunAPI. Supports task polling and pricing checks.561 npmApache 2.0

postward-creative-mcpofficial
AlicenseBqualityBmaintenanceEnables AI assistants to generate images, videos, music, and voiceovers with your own provider keys, and edit video locally with ffmpeg — all on your machine with no account, watermark, or telemetry.35745 npmMIT- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to generate and edit images locally on Apple silicon using FLUX.2 Klein models, fully offline, with tools for generation, editing, and listing available models.2MIT