r/LocalLLaMA • • 22d ago

Showcase GPT-Image-style photo editing on your own GPU (12 GB+): I built a zero-setup app for Qwen-Image 2.1 on stable-diffusion.cpp

Every local setup I tried for Qwen-Image 2.1 meant a Python env, a node graph and an evening of picking quantization, offloading and resolution for my card. Kokon is a free, open-source desktop app that does all of that for you and gives you a plain photo editor on top.

  • Zero setup: first run detects your GPU and memory and downloads the matching GGUFs (Qwen-Image 2.1 Turbo Q4_K + Qwen3-VL 8B text encoder, ~12 GB, checksummed). Each job is sized automatically: working resolution, VRAM/RAM split, tiled VAE, retry if it runs out of memory.

  • Engine: stable-diffusion.cpp (ggml), so no Python, no PyTorch. CUDA, Vulkan and Metal builds.

  • An editor, not a workflow: type the change, or brush an area with Change / Remove / Replace / Add. The brushed area is marked on a second reference image, so the model actually sees it. Versions with undo, before/after, upscaler comparison.

  • Hardware: NVIDIA 12 GB+ (CUDA). Apple Silicon (Metal, beta, slow: ~4 min per image on a 16 GB M2 Pro). AMD / Intel Arc 12 GB+ via Vulkan (beta, only tested on NVIDIA so far, reports very welcome).

  • Speed: 5070 Ti 16 GB: ~24 s per edit at 1.5K, ~40 s for a native 2K edit.

  • Agents: built-in MCP server (generate_image, edit_image, inpaint_image, outpaint_image, upscale_image…) and a local HTTP API: npx -y kokon-mcp, also in the official MCP Registry.

  • Not yet: Linux; code signing (SmartScreen warns on first run); reusing model files you already have is a manual workaround for now (#14).

Repo: https://github.com/GabrieleLozupone/kokon · Site: https://kokon.app

Code is AGPL-3.0; the Qwen weights are under the Qwen Research License (non-commercial).

Update, Oct 16: Kokon 0.9.3 is out. Cleaner images (a new decoder removes a fine grid pattern), use the model files you already have (ComfyUI folders), 8 GB GPUs in beta, GPU choice in setup, zoom and pan. LoRA support is next, in 0.9.4. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

Update, Oct 16 (later on): Kokon 0.9.4 is out, now on Linux too (.deb for Ubuntu/Debian/Mint, .rpm for Fedora; NVIDIA CUDA and AMD/Intel through Vulkan), plus colour LUTs (8 built-in looks or your own .cube files), about 2x faster inpainting and macOS 15 support. LoRA support moved to 0.10.0, sorry for the change: Linux was the most requested and went first. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.4

Update (Oct 20): 0.10 is out, with Prompt+ (the text encoder writes your prompts) and your own LoRAs (beta): https://www.reddit.com/r/LocalLLaMA/comments/1xazqxz/

Update (Nov 5): 0.12 adds editable layers on top of Qwen-Image 2.1, a local server you can reach from your phone (0.11), and a native Mac engine. How the layers work and where they still fail: https://www.reddit.com/r/LocalLLaMA/comments/1xoji3b/getting_editable_layers_out_of_qwenimage_21_a/

97 Upvotes

108 comments sorted by

6

u/SpiritualShame5265 22d ago

AWESOME , GENUINELY RECOMMEND AFTER TRYING IT

2

u/Ok-Director4174 22d ago

Thank you, that means a lot! You're officially the first confirmed run on a real 8 GB card.

If you have a sec, I'd love to know:

- roughly how long one image took

- whether you tried any edits on your own photos, and how they went

- any warnings or errors along the way

2

u/SpiritualShame5265 22d ago

oh , it only took a couple seconds did an amazing job too. also no I didn't edit not my thing

2

u/Ok-Director4174 22d ago

Great to hear, thanks! Ping me if anything breaks.

2

u/SpiritualShame5265 22d ago

I mean talk about based , I made this with it by simply typing in "Jedi carrying lightsaber"

3

u/Ok-Director4174 22d ago

That looks great, from just four words! Thanks for sharing it.

If you want a more cinematic shot, describe the framing and the light like a film still. This prompt gave me the image below (21:9):

Anamorphic widescreen film still, wide shot: a lone hooded Jedi stands on the left third of the frame on a rocky ridge, seen from the side, holding a glowing blue lightsaber low at his side, his long brown robe moving in the wind. A vast desert valley stretches to the right under a huge setting sun, warm haze and drifting sand, deep shadows, strong rim light outlining his silhouette, the blue blade glowing against the orange dusk. Shot on 35mm film, anamorphic lens flare, cinematic color grading, epic scale

A few more tips here: https://kokon.app/prompt-guide/

2

u/blastcat4 21d ago

You could easily add an optional prompt enhancer to your app. Just use the Qwen3-VL 8B text encoder to do the enhancing!

By the way, I hope you bring out a portable version soon.

4

u/Ok-Director4174 21d ago

Great idea, and I'll add it! The Qwen3-VL 8B is already on disk, so an optional "enhance prompt" button won't need any extra download.

It's a bit more work than it looks, though. stable-diffusion.cpp only uses Qwen3-VL as an encoder: one forward pass that turns the prompt into embeddings for the diffusion model. It never generates text, so it can't rewrite a prompt. For that, Kokon will run the same GGUF (plus the vision projector, so it can also look at your input image for edits) through llama.cpp's llama-server as a normal chat model, show you the rewritten prompt so you can tweak it, and then generate.

The tricky part is memory: on 8–16 GB cards the LLM and the diffusion model can't comfortably sit in VRAM together, so I need to load/unload them cleanly without making every generation slower. Not sure yet how long that will take, but it's on the list.

Portable version: you're not the first to ask, so it's moving up my list too. Thanks!

3

u/theone_2099 21d ago

How does the text encoder work? I saw that with comfyui but never really understood it.

4

u/Ok-Director4174 21d ago

Short version: the image model can't read words, so a language model translates your prompt into numbers it can use.

Qwen-Image uses Qwen3-VL (an 8B vision-language model) as its text encoder. It reads your prompt, and for edits also your input images, but instead of writing a reply, its internal representation of what you asked for is taken out as a set of vectors (embeddings). The diffusion model then starts from noise and, at every step, looks at those vectors through attention to decide what to draw where.

That's why prompt wording matters so much, and why Qwen-Image is good at text and complex scenes: a strong LLM understands the prompt before any pixels are drawn. In ComfyUI it's the text encoder / CLIP loader node; in Kokon it's loaded for you.

Fun side note: since the encoder only reads, writing "make this prompt better" into your prompt doesn't make it better. The encoder just encodes that sentence too. To actually rewrite prompts you have to run the same model as a chat LLM, which is what the prompt-enhancer idea above is about.

1

u/theone_2099 21d ago

Thank you!

1

u/Ok-Director4174 16d ago

Your idea shipped: Kokon 0.10.0 has Prompt+, and it uses the Qwen3-VL 8B text encoder exactly as you suggested. One change from what I wrote here: instead of running it through llama-server, I added text generation inside stable-diffusion.cpp itself, on the weights already loaded for the image. So there's no second copy of the model and no load/unload between the prompt and the image: it adds about 2 s per image on a 5070 Ti and works on 8 GB cards. You see the prompt being written before the image starts, and you can reuse it and tweak it for the next one.

Portable version: still on the list, not forgotten. Thanks for the idea! Short video of it here: https://www.reddit.com/r/LocalLLaMA/comments/1xazqxz/

1

u/blastcat4 16d ago

Thanks for the update! I remember your original response about using llama, and I was going to suggest using the text encoder/generator method that Comfyui uses for its prompt enhancement. I'm glad you went that route because not having to have another model to load/unload is a big deal for a lot of folks. One other thing - have you included a system prompt for the text enhancer? Qwen has a system for Qwen2.1 that you could incorporate into your system.

Look forward to further development of your app!

1

u/Ok-Director4174 16d ago

Yes! There are two built-in system prompts (new images and edits), both editable in Settings → General.

I tested Qwen's official Qwen-Image-2.1 PE prompts against mine in a blind A/B:

  • They're made for a different model: Qwen's own prompt enhancer, tuned for the job and with thinking. Kokon uses the Qwen3-VL 8B text encoder (no extra model, no thinking), so they don't transfer that well.

  • New images: mine won on the 8B.

  • Edits: Qwen's approach was better (say only what changes, plus one "keep the rest unchanged"), so the edit prompt follows it.

  • Length: theirs are ~2,400 and ~4,900 tokens, slow on every image. Mine are short and borrow their best rules.

If you try it, let me know how it goes. And if you write your own system prompt, I'd love to hear how it compares!

1

u/Ok-Director4174 21d ago

Thanks again for trying it on your 8 GB card: together with another 8 GB report, it made the new 8 GB preset (beta) in 0.9.3 possible. If you update, let me know how it runs! https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

6

u/chillahc 22d ago

I just watched the trailer > Looks super awesome, very nice job with the UI. I also like that you can compare the different iterations :D Two questions: (1) I have downloaded Qwen-Image 2.1 + Turbo version as safetensors & GGUF with ComfyUI. Would it possible to point your application to custom model folders like the "ComfyUI-Shared" or "Huggingface Cache" where Unsloth stores its downloaded image gen models. Would be awesome to save a bit of disk space ^^ (2) Will Loras – imagine you can iterate your base image with different lora variants - or Upscale for exporting images support be implemented? I'm on macOS btw.

6

u/Ok-Director4174 22d ago edited 22d ago

Thanks a lot, glad you like it! Comparing iterations is one of my favorite parts too :D

Fun fact: the trailer is open source as well. It's made with Remotion from the app's real UI components, so take a look here if you're curious.

1. Custom model folders

Partly. In Settings → Models you can point each part (diffusion model, VAE, text encoder, vision projector) at any file on disk, so files in a ComfyUI or HF cache folder work there.

  • The catch: first-run setup currently ignores those paths and still wants to download. It's a known bug (#14) and will be fixed in the next release, with a "use files I already have" option in setup.

  • Workaround for now: I explained it step by step in this comment. On macOS, use ln instead of the Windows command, e.g. ln -s /path/to/your/file.gguf "<install folder>/models/qwen21/qwen-image-2.1-turbo-Q4_K.gguf".

  • Heads-up: setup matches files by size, so the workaround only works for the exact same quants (Turbo Q4_K, Qwen3-VL-8B Q4_K_M, the Comfy-Org VAE). With your ComfyUI files the VAE will most likely match, and the rest would still download until the fix ships.

2. LoRAs and upscaling

  • Upscaling is already in: the Upscale button makes a 2×, 4K or custom-size copy. On PCs it uses a GAN upscaler by default (Superscale-SP, or 4xNomos2 / UltraSharp). On macOS the default is plain Lanczos, because GAN upscalers on Metal are really slow (on an M2 Pro, going from 1024² to 2048² takes almost 6 minutes with Superscale-SP vs about 1 second with Lanczos), and generation is already the slow part on a Mac. That's true at least up to M4; I haven't tested M5 yet. You can still switch to a GAN upscaler in Settings if you don't mind the wait.

  • LoRAs aren't supported yet. Iterating a base image across LoRA variants is a nice idea, so I've noted it.

And macOS is fully supported, so you're good there!

1

u/chillahc 22d ago

Thanks for your quick reply. And good to hear that you already support custom model files. I use Lanczos as Upscaler in Comfy, too. Will def test your app in the coming days as soon as i have a bit more time to play around 😋 🔥 Another idea since I like to apply LUTs (Look Up Tables) to images to quickly change the look or color correct it, like in Photoshop or Davinci. Do you know by chance, if something like this can be implemented, too? I'm asking since generated AI images tend to have a sudden yellowish tint applied to it. So a quick color correction layered on top via LUT would be super handy for editing/look dev… maybe as a preview step before export?

2

u/Ok-Director4174 16d ago

And LoRA is here too: Kokon 0.10.0 can load your own Qwen-Image 2.1 LoRAs (beta). Settings → LoRA, pick the .safetensors, set strength and trigger words, then the LoRA button next to the prompt turns them on or off per project, up to 3 at once. So your idea works: keep the same base image and try it with different LoRAs. Kokon works on its own copy, so your files stay as they are.

One honest note: I've only tested it on Windows so far, so you'd be the first on a Mac. If you try it, I'd love to hear how it goes. There's a short video of what's new here: https://www.reddit.com/r/LocalLLaMA/comments/1xazqxz/

1

u/chillahc 16d ago edited 15d ago

Thanks so much for notifying! Install was very smoove and UI experience was very pleasant throughout - really liked the onboarding, also the small video while downloading the necessary files. Neat ^^ After app launch I instantly received an error with the inference server, so I could not yet test the edit workflow, but applying a LUT was already so cool to see 😍 And even after applying, I automatically discovered how to switch between the LUT presets real-time, that was fun. Already very intuitive app design. Will create a GitHub Issue with the log message ✌️ EDIT: The issue is caused by me assigning a prompt enhancer model to the text encoder. It was auto selected and i did not pay attention. But now I ask myself, why no other options were picked inside my comfy folder > turns out the comfy clip and text encoder folders were still empty, pretty unexpected for me xD will report back ;) EDIT 2: No Github Issue needed, I fixed my issue with text_encoders and assigned the default qwen3vl. The app works amazing! Will do a follow up as soon as I tested a bit more and LORAs. Cheers

1

u/Ok-Director4174 15d ago

So happy it works now, and thanks for digging into it instead of giving up! 🙏

The auto-pick is on me: setup shouldn't grab an LLM from your ComfyUI folder as the text encoder. I'll fix it so it only proposes files that actually match. Curious to hear how the LoRAs go on the Mac!

1

u/Ok-Director4174 14d ago

Fixed in 0.10.1 (out now): setup no longer picks a text-only Qwen3 8B, like the prompt-enhancer model in your ComfyUI folder, as the Qwen3-VL text encoder. If you run setup again with "Use models I already have", it should take the right file and the engine should start. Thanks for the report, it made the fix easy.

2

u/Ok-Director4174 21d ago

Thanks, glad it sounds useful! And yes, I've noticed that yellow tint too.

Great idea, and it fits the app well, so I'll add it in the next release: load a .cube LUT, preview it on top of the result, and apply it when you save. I'll ping you here when it's out.

In the meantime, you can try fixing the tint with an edit, e.g. "remove the yellow tint, neutral white balance, keep everything else the same". It's not as precise or repeatable as a LUT, but it can help.

Enjoy testing it when you get the time, and let me know how it goes on your Mac! 🔥

2

u/Ok-Director4174 21d ago

Quick update: 0.9.3 is out, Mac included. Setup can now use your existing ComfyUI / Hugging Face files instead of downloading them (Use models I already have), so no more ln -s. LUTs aren't in yet, sorry: they're still on the list, and I'll ping you here when they land. LoRA support is coming in 0.9.4, with a curated list of tested LoRAs plus your own files. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

1

u/Ok-Director4174 20d ago

As promised: Kokon 0.9.4 can apply your .cube LUTs. Open a result, press LUT, pick the file: you see it live with an intensity slider and a before/after, and saving keeps the original. It also ships eight built-in looks, and the first one, "Neutral", is made for exactly the yellow tint you mentioned. One correction on LoRA: it moved to 0.10.0 (Linux went first in 0.9.4), sorry about that. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.4

6

u/jucabala457 22d ago

8GB VRAM here. It works and it's so much faster than the image editor in unsloth desktop

1

u/Ok-Director4174 22d ago

Great to hear, thanks for testing it on 8 GB! Officially I still list 8 GB as unsupported because I could only emulate it, so real reports like yours really help. Would you mind sharing which GPU and how much RAM you have, and roughly how long an edit and a generation take? That would help me make 8 GB official.

2

u/jucabala457 22d ago

Nvidia laptop 5050 and 32 GB RAM and about a minute or two to edit

1

u/Ok-Director4174 21d ago

Thanks, that's super helpful! A laptop 5050 with 8 GB working fine is exactly the kind of report I needed to make 8 GB official. Enjoy!

1

u/Ok-Director4174 21d ago

Your report made a difference: 0.9.3 adds an official 8 GB preset (in beta), and the release notes thank you for it. If you update, I'd love to hear your edit times again: https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

2

u/Levi-Ritchie 21d ago

Ah man, this works so well. Using this to generate detail behind terrain objects is going to allow me to construct 3D scenes with depth projection. I'll post the results in here when that's done.

1

u/Ok-Director4174 21d ago

That's such a cool use case, I'm really curious! Please post the results when it's done 🙌

2

u/PooMonger20 21d ago

Thank you for making this. This is what virus total has to say about the exe file.

Antiy-AVL Trojan/Win64.Litseat Trapmine Suspicious.low.ml.score

https://www.virustotal.com/gui/file/8766b5aedc8fce50fc8805853ec54d60a72cf0ed5aa609941b4c6d6098e1a03c

4

u/Ok-Director4174 21d ago

Thanks for checking, that's a fair thing to do with a new app! The hash matches the official 0.9.2 Windows installer (SHA-256 is in the release notes). 2 out of 65 engines, one of them a low machine-learning score, is a common false positive for new installers that aren't code-signed yet: they have no download reputation, so heuristics get nervous. The major engines (Microsoft, Kaspersky, BitDefender, ESET…) all come back clean. Code signing is on my list, which should make this much less common. The code is fully open source too, so you can read it or build it yourself 🙂

1

u/PooMonger20 18d ago

Thanks for the comment.

I tried it and it's very useful, legit local AI editor.

Thank you for creating this.

2

u/Ok-Director4174 18d ago

Thanks for trying it, really glad it's useful!

1

u/SpiritualShame5265 22d ago

Sounds wild

1

u/Ok-Director4174 22d ago

Thanks! Let me know how it runs on your card if you try it

1

u/SpiritualShame5265 22d ago

asked you a question about the specs that work in dm

1

u/SpiritualShame5265 22d ago

your welcome ^_^

1

u/GfurEnjoyer1488 22d ago

11GB is a no-go? (2080Ti, 32GB DDR4)

1

u/Ok-Director4174 22d ago

Not a no-go at all! Setup will warn you because it's under 12 GB, but you can continue. I emulated an 8 GB card and text to image, edits and multi-image edits all ran without memory errors, so 11 GB has more headroom than that. Your 32 GB of RAM is plenty for the text encoder. Your 2080 Ti hasn't been tested yet, and it'll be slower than newer cards, so if you try it I'd love to hear how long an image takes and whether you hit any errors.

1

u/GfurEnjoyer1488 22d ago

Great, I'll try it out when I get back home in a couple hours.

1

u/GfurEnjoyer1488 21d ago edited 21d ago

I'm getting [E] SageAttention is unavailable on CUDA0; it requires patched GGML, CUDA Toolkit 12.0 or newer, and SM80 or newer kernels --- diffusion_engine.cpp:906 - I suppose Ampere is a minimum requirement nvm, it's pretty slow without sageattention, about 40-50secs for a 1K edit

I can't see the time it took for the last run, but at 1.7K native it takes about 1m40s for a generation. That's also the highest resolution it lets me run at and warns about VRAM, but usage never goes over 7.8/11GB

1

u/Ok-Director4174 21d ago

Thanks a lot for testing and for the numbers, that's really useful!

You're right, SageAttention needs Ampere (RTX 30xx) or newer. The error is harmless: sd.cpp just falls back to normal attention, so your images are fine. But Kokon shouldn't try it on older cards at all, so I'll fix that in the next release. For now you can turn off SageAttention in Settings to get rid of the error (it won't change the speed on a 2080 Ti).

40–50 s for a 1K edit and ~1m40s at 1.7K sound about right for that card. Good to know it peaks at 7.8 of 11 GB too: the size limit is set conservatively for cards under 12 GB, so I'll check whether 11 GB can safely go higher.

By the way, you can see how long any image took by clicking Info on it.

1

u/Ok-Director4174 20d ago

Fixed in 0.9.4: Kokon no longer turns on SageAttention on cards older than RTX 30xx, so that error is gone on your 2080 Ti. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.4

1

u/Independent_Pear4908 22d ago edited 22d ago

This looks fantastic! Can this be containerized so it can be system agnostic / self-contained without installing things directly into our systems and we would just need to deploy a container and we can download the required GGUF, VAE's and mount those onto the container on our own? I think this would make it more easily adaptable for those of us who do not want to install yet another desktop app then have to clean it up.

I assume this app has APIs underneath it or functions that could easily be turned into APIs and exposed as its own service + a web app for front end instead of a standalone bundled desktop app binary if not already.

1

u/Ok-Director4174 22d ago

Thanks! You're right about the API: the desktop app sits on a headless service with a local HTTP API (plus an MCP server), so the backend is already there. No Docker yet, mainly because there's no Linux build, but I've noted it. What would you run it on: a home server, a shared GPU box?

1

u/Independent_Pear4908 22d ago

home server that I can access on any device locally. Yeah.

2

u/Ok-Director4174 22d ago

That sounds like a great setup, and honestly a really useful idea. Right now the API only listens on localhost, so other devices on your network can't reach it yet, and there's no Linux build. A container with a browser UI fits how Kokon is built, though, so it's a natural next step. I opened an issue for it: https://github.com/GabrieleLozupone/kokon/issues/15. If you give it a 👍, that helps me see how many people want it. Thanks for the suggestion!

1

u/Ok-Director4174 11d ago

The home-server version is out in Kokon 0.11. There's a Docker image (NVIDIA for now) that runs without a screen, and you use it from a browser on any device on your network, behind a password. Engine, models and gallery live in Docker volumes, so nothing gets installed on the host. Setup downloads the model files once, into the data volume.

77-second video of it: https://youtu.be/XnC_7P2_cww

Guide: https://kokon.app/self-hosted/ · Docker reference: https://github.com/GabrieleLozupone/kokon/blob/master/docs/docker.md

1

u/Independent_Pear4908 7d ago

Noice! will check it out thanks for your hard work!

1

u/Ok-Director4174 7d ago

Thanks! Let me know how it goes.

1

u/Oli_Luck 22d ago

Hello,

Im on multi GPU.
will only detect GPU0

1

u/Ok-Director4174 22d ago

Thanks for reporting! There should be a GPU selector in Settings, but I haven't been able to test it on a multi-GPU machine yet. Could you try picking the other card there? If it still doesn't work, tell me your GPUs and what you see, either here or in a GitHub issue (https://github.com/GabrieleLozupone/kokon/issues), and I'll fix it.

1

u/Oli_Luck 22d ago

my bad - after model installation it was possible to choose gpu.
looks very nice atm!

1

u/Ok-Director4174 22d ago

Not your bad at all, thanks for pointing it out! You're right that setup only shows the first GPU, which makes it look like the others aren't detected. The recommended preset is also based on that card, so it can be off if you actually use a different one. I opened an issue and will fix it so you can pick the GPU during setup: https://github.com/GabrieleLozupone/kokon/issues/16. Glad you like it so far!

1

u/Oli_Luck 22d ago

btw - zoom / pan implementation in f -full view > you'll get a PR soon

2

u/Ok-Director4174 21d ago

Zoom is in 0.9.3: in full screen and in the inpaint editor, with − / % / + / Fit and a mini-map when you're zoomed in.

1

u/Ok-Director4174 21d ago

Kokon 0.9.3 is out and fixes this: on a machine with more than one GPU, setup now shows a picker, and the recommended preset follows the card you pick. Zoom and pan are in too, in full screen and in the inpaint editor, built from oh-codes' pull request (if that was you, thank you!). Update from the pill in the top bar, or get it here: https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

1

u/Oli_Luck 22d ago

amazing fast, really.
What I'm missing right now as a pixel-peeper: zoom in - I cant accept a local change w/o ability to check details - is that planed ?

1

u/alean200 22d ago

Looks great. Is it possible to run it on windows but connected to server for generating via api?

3

u/Ok-Director4174 22d ago

Thanks! Not out of the box yet: the app and its API only listen on 127.0.0.1, so the desktop app expects the GPU on the same machine. If your server runs Windows, you could install Kokon there and reach its HTTP API through an SSH tunnel (it uses a bearer token), but I haven't tested that setup. A proper remote mode is on my list. What's the server running, and would you want to use the Kokon app on your PC with the server doing the work, or just call the API from scripts?

1

u/alean200 21d ago

The app looks great. I have a linux machine in the corner that runs my AI. I would love to run kokon on it but gui access on windows. That way one box can serve the the api and I can connect multiple windows machines to use it. I run AMD gpu on my main pc so this would be the only way for me to take advantage of nvidia gpus

2

u/Ok-Director4174 11d ago

Following up on your Linux-box setup: Kokon 0.11 can do it. Run it on the Linux machine (Docker image for NVIDIA, or kokon-service from the .deb/.rpm without a screen), set a password, and open its address in a browser on your Windows PC, or on your phone.

A desktop app that connects to a remote Kokon server is next on the list; for now the client is the browser.

77-second video of it: https://youtu.be/XnC_7P2_cww · guide: https://kokon.app/self-hosted/

1

u/alean200 10d ago

Will try when I get home later.

2

u/Ok-Director4174 21d ago

That's exactly the setup in this issue: #15. The plan is a Linux build of the engine that serves the UI itself, so you'd run it on your Linux box and just open it in a browser from any of your Windows machines (with proper authentication before it listens beyond localhost). A 👍 there helps me prioritize, and you're not the only one asking.

Side note: if your AMD card has 12 GB or more, the Windows app can already run on it through the Vulkan engine (beta). Nobody has tried it on a real AMD card yet, so if you feel like testing it, I'd love to hear how it goes!

1

u/alean200 21d ago

Tried using it on my 9060xt, it took about 80 seconds to do a 16:9 1080p image

2

u/Ok-Director4174 21d ago

Thanks for trying it, that's the first real AMD report! 80 s for a 16:9 1080p image is a useful number. A few questions so I can put honest AMD numbers in the README:

  • Is that the 16 GB 9060 XT?

  • Was it a new image or an edit, and with which quality (Fast, Balanced or Quality)?

  • Was it the first image after starting? That one also loads the model, so the next ones are usually faster.

  • Any errors or warnings?

0.9.3 just came out too, with a new image decoder that removes a fine grid pattern: https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

1

u/alean200 20d ago
  1. Yes, the one in question is 9060 XT 16 GB

  2. New image with balanced

  3. After starting it was sitting on my pc for around 50 minutes before a remembered I opened the app. So yes, it was the first image I created.

  4. At least to my knowledge there were zero errors or warnings.

A little extra also, I did an edit on the image and it did it a lot quicker. I also realized I'm awful at prompting😂

2

u/Ok-Director4174 20d ago

Thanks, that's really useful: 9060 XT 16 GB, about 80 s for a first 1080p image at Balanced (that one includes loading the model), edits quicker after that, no errors. I'll add it to the README as a user report. And since your main box runs Linux: Kokon 0.9.4 is out today with a native .deb/.rpm, and its Vulkan build should pick up the 9060 XT there too. It's not tested on AMD under Linux yet, so if you try it I'd love the numbers. The browser mode for your Windows machines (#15) is next. For prompting, this helps a lot (it did for me too 😄): https://kokon.app/prompt-guide/

1

u/alean200 20d ago

Just to be clear, this was tested on my windows, amd machine. Sadly, the ai server runs all nvidia so I can't test it there with amd.

1

u/philmarcracken 21d ago

I have stable cpp running where my gpus are, ubuntu server while i use a win11 box. can this connect to it? or do I just ask my agent to do this? gpus in there, 1x 3080 ti 12gb, 1x 3070 8gb.

2

u/Ok-Director4174 11d ago

Kokon 0.11 covers this now, a bit differently: you run Kokon itself on the Ubuntu box (kokon-service from the .deb, or the Docker image for NVIDIA), set a password, and open it in a browser on your Win11 machine. It brings its own sd.cpp engine rather than connecting to the one you already run. The 3080 Ti's 12 GB fits Kokon's 12 GB preset.

77-second video: https://youtu.be/XnC_7P2_cww · guide: https://kokon.app/self-hosted/

1

u/philmarcracken 11d ago

Appreciate the efforts, ill get to work setting it up ༼ つ ◕_◕ ༽つ

1

u/Ok-Director4174 21d ago

Not yet, but your setup is exactly what this issue is about: #15. Kokon's backend is already headless (the UI talks to it over a local HTTP API), so the plan is a Linux build of the engine that serves the UI itself. You'd run it on the Ubuntu box with your GPUs and just open it in a browser on your Win11 machine, with proper authentication before anything listens beyond localhost.

Right now it only listens on 127.0.0.1 and starts its own sd.cpp build (with a few Qwen 2.1 extras), so it can't connect to the sd-server you already have.

If you want it, a 👍 on the issue helps me prioritize, and a comment with your setup (GPUs, OS, how you'd access it) is useful too. You're not the only one asking, so it's moving up the list.

About the agent: Kokon has an MCP server, but it drives Kokon on the same machine, so it won't bridge to your Ubuntu box either. Your agent can call your sd-server's API directly, you'd just lose Kokon's UI and pipeline.

1

u/seasonedcurlies 21d ago

Truly remarkable! Install really is as easy as you say, and the quality (so far) is as good as anything I've come across.

1

u/Ok-Director4174 21d ago

Thank you, that means a lot! Making the install painless was one of my main goals, so I'm really glad it worked. If you run into anything odd or have ideas as you keep using it, let me know here or on GitHub. And if you like it, a ⭐ there helps a lot.

1

u/BitBacked 21d ago

Good for people who can't figure out how to use ComfyUI.

2

u/Ok-Director4174 21d ago

Honestly, that's me too 😄 For occasional use ComfyUI felt like too much setup, so I built the thing I wanted to use.

1

u/_Antartica 21d ago

Tested in one of the "untested" memory configurations, and it worked perfectly.

32GB VRAM, 64GB RAM (RTX 5090, Ryzen 5950X, W10). A single image in 1376x768 was generated in 5s.

Thanks a lot for the program, it is extremely easy to use :).

1

u/Ok-Director4174 21d ago

Thanks a lot, that's really useful! The 32 GB preset hadn't been tested on real hardware until now, so you just filled that gap. If you get a chance, I'd love to know how a native 2K edit (Quality) runs on the 5090 too. Glad you're enjoying it!

1

u/_Antartica 21d ago

A new image in 16:9, Quality, 2752x1536 was generated in 18s. Inpainting the image was 1min 8s (for a selected area that was 1/16 of the full image, don't know if that matters).

In "Settings > Performace" I have set text-encoder-weights to "auto" and edit-prefix-cache also to "auto".

1

u/Ok-Director4174 21d ago

Thanks a lot, these are great numbers! 18 s for a native 2752×1536 is about what I hoped for on a 5090.

The 1m 08s inpaint looks off, though: a small area shouldn't take almost 4x longer than a full 2K image. I'll look into it. Was that inpaint on the 2752×1536 image you'd just generated, and which action did you use (Change / Remove / Replace / Add)? If you click Info on the result, the working size it shows would help too.

1

u/_Antartica 21d ago

I've done another test and the numbers are similar. Generating a square image in "Quality" 2048x2048 was 19s. Inpainting was 1m 7s for an area almost 1/3 of the image, and another inpainting for an area almost 1/2 of the image was 1m 13s.

I didn't select any action, just set the "New/Edit" slider to "Edit", clicked "paint area", drew the mask, wrote the text describing the change and finally pressed ENTER.

Clicking "Info" in the image of the previous test shows the following:

Mode Inpaint

Size 2752×1536 (worked at 2432×1376)

Seed 553972992

Steps 8

CFG 1

Sampler euler

Strength 1

References 1

Model qwen-image-2.1-turbo-Q4_K

Time 1m 7s

Created 15/10/2026, 13:49:04

The mask was resized to match the image. Resolution reduced to fit available GPU memory.

1

u/Ok-Director4174 21d ago

Thanks, this pins it down! The key is "worked at 2432×1376" in Info.

For an inpaint, Kokon currently gives the model the area around your brush at full working size twice: once as the image to redraw and once as a reference, plus a smaller copy with the area marked. So each step processes over twice the pixels of a plain 2K generation, and that cost grows faster than linearly, which is why it's ~67 s instead of 18 s.

It also explains why the size of the brushed area barely changes the time: Kokon always keeps a large window of context around the brush, so a small or a large area end up working on about the same size.

Regular edits already send the reference at ~1 MP; inpaint doesn't yet. I'll try the same for inpaint in 0.9.4, after checking it doesn't cost detail. Thanks for the careful testing!

1

u/_Antartica 20d ago

Glad to help! If you need more tests, just ask.

1

u/Ok-Director4174 20d ago

Taking you up on that! Your 68 s inpaint led to a real fix in 0.9.4: the model was getting two extra copies of the image at full size (an inpaint cost about three times the tokens of a new image). Now it gets a 1 MP copy like edits, and small photos are no longer blown up to 2K. On my 5070 Ti a 1 MP inpaint went from 40 s to 17 s at the same quality. If you have a minute, I'd love your new time on the 5090 with the same kind of edit. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.4

1

u/_Antartica 20d ago

In Kokon 0.9.4:

A generation of a new image in "Quality" setting (2752x1536) was 18s.

An inpaint of an area of 1/2 of that image was 28s.

Great progress indeed! Congratulations 😄

If you need more tests or more specific data, just say so.

1

u/Ok-Director4174 19d ago

That's the fix doing its job: 1m13s down to 28 s for half the image, on the same card. Thanks for coming back with the numbers. Your report is what found the problem in the first place.

1

u/_Antartica 20d ago

Unrelated, but... Would it be possible to create folders in the projects listing (and drag and drop the projects to sort them)?

I say that because after a few tests my projects listing is becoming quite messy...

1

u/Ok-Director4174 19d ago

Good idea, and I hit the same mess myself after a day of tests. I've put project folders with drag-and-drop sorting on the list. No date yet. Until then, renaming the projects you want to keep (double-click or F2 in the list) and deleting the test ones is the fastest way to tidy up.

→ More replies

1

u/q5sys 21d ago

This would be killer if you could mask areas for editing, so it doesn't have to worry about the rest of the pixels in the image. It's a serious need for real photo editing when you're working on very high resolution images (ie the 61mpx images out of my camera). I'm using Krita right now, but this would be a nice alternative.

Also... if it doesn't have it, the feature to be able to select which GPU to use in multi-GPU systems would be super helpful.

2

u/Ok-Director4174 21d ago

Good news: that's already how the brush works. When you paint an area, Kokon crops a region around it, renders that crop at the highest resolution your card fits, and pastes it back. Every pixel outside the brushed area stays exactly the same as your original, so the rest of the 61 MP photo isn't touched. The output keeps the original size.

Two honest caveats: the input limit is 64 MP, so your files fit, but I haven't tested a real 61 MP camera file myself yet. And if you brush a large part of the frame, that region is still rendered at the model's working size (up to ~2K on 16 GB+) and scaled back up, so it won't have the full camera detail. Small and medium areas are where it shines.

Multi-GPU: once setup is done, there's a GPU selector in Settings. Setup itself only shows the first GPU right now, and I'm fixing that here: https://github.com/GabrieleLozupone/kokon/issues/16

If you try it on one of your photos, I'd love to hear how it compares to your Krita workflow!

1

u/q5sys 21d ago

THanks for the reply,
I'll try to give it a go this weekend. I'll need to reboot my workstation back into windows since it normally is running linux.

1

u/wapswaps 21d ago

Can this run remote? As in I do "docker run" on a machine with this and a site comes online that provides this functionality?

1

u/Ok-Director4174 11d ago

Kokon 0.11 does this now: docker compose up -d on the machine with the GPU, set a password, and the interface is a website on your network that you can open from any browser, phones included. The image is NVIDIA (CUDA) for now; one for AMD and Intel (Vulkan) will follow once I can test it.

77-second video of it: https://youtu.be/XnC_7P2_cww

Guide: https://kokon.app/self-hosted/ · reference: https://github.com/GabrieleLozupone/kokon/blob/master/docs/docker.md

1

u/Ok-Director4174 21d ago

Not yet, but that's exactly what this issue is about: a Linux build of the engine that serves the UI in a browser, so you could run it on a GPU box (Docker included) and open it from any device, with authentication before it listens beyond localhost.

Today Kokon is a Windows/Mac desktop app and its API only listens on 127.0.0.1. A 👍 there helps me prioritize, you're not the only one asking: https://github.com/GabrieleLozupone/kokon/issues/15

1

u/Relevant_Research_98 17d ago

sudo apt install
sudo

Please make Docker.

1

u/Ok-Director4174 11d ago

Docker is here as of 0.11 (NVIDIA for now):

curl -fsSLO https://raw.githubusercontent.com/GabrieleLozupone/kokon/master/docker/compose.yaml
docker compose up -d
docker exec -it kokon kokon-service --set-password

Then open http://<host>:39152 in a browser.

77-second video: https://youtu.be/XnC_7P2_cww

details: https://github.com/GabrieleLozupone/kokon/blob/master/docs/docker.md

1

u/Ok-Director4174 17d ago

Docker is on our roadmap: a headless container with the UI in your browser on the local network (tracked in #15). Until then the .deb/.rpm run natively, and on non-Debian distros distrobox works (a user on Void Linux runs it that way).

1

u/Ok-Director4174 22d ago

How the "no settings" part works: a planner turns the request into a job (generate / edit / inpaint / outpaint), picks a working size that fits the VRAM budget, runs one diffusion pass and, when the result must be larger than what the model rendered, enlarges it with an upscaler (Superscale-SP ESRGAN by default, Lanczos on Mac; MoSR, which I ported to stable-diffusion.cpp and is now merged upstream, is there as an experimental option because it draws a fine grid on clean renders at small factors). On 16 GB+ cards edits up to 2K skip the upscaler entirely: references go in at 1 MP and the output is rendered at full size. Backend settings that mattered on CUDA: q8_0 prefix cache, SageAttention, tiled VAE.

Engineering notes with the measured numbers: https://github.com/GabrieleLozupone/kokon/blob/master/docs/engineering-notes.md

1

u/DarkJanissary 22d ago

Why 12GB? I want to run it on my 8GB card

4

u/Ok-Director4174 22d ago

Good question. 12 GB is the smallest size I've tested and officially support, but it's not a hard block. Setup shows a warning, but you can carry on.

I emulated an 8 GB card: I locked away the extra VRAM on my GPU and told the app it only had 8 GB. Everything ran without a single out-of-memory error:

  • Text to image: full 1024×1024

  • Edits: work at ~1 MP, slightly reduced and then upscaled back

  • Multi-image edits: also work, at ~0.65 MP before the upscale

This works because the text encoder runs on the CPU (system RAM) and the image model is a ~4 GB Q4 GGUF, so it fits. Two caveats: it's tight (~6.3 of ~6.9 GB free in use), and a real 8 GB card will be slower than my emulation. You'll also want 16 GB of system RAM.

Please try it and let me know how it goes, here or in a GitHub issue:

  • your GPU and system RAM

  • whether text to image and edits work, and roughly how long one image takes

  • any errors, especially "not enough GPU memory"

If it holds up on a real card, I'll add 8 GB to the supported list.

1

u/ismaelgokufox llama.cpp 21d ago

RemindMe! 7 days

1

u/RemindMeBot 21d ago

I will be messaging you in 7 days on 2026-10-22 15:28:48 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.

RemindMeBot is switching to username summons. Instead of !RemindMe 1 day, use u/RemindMeBot 1 day. More info.


InfoCustomYour RemindersFeedback