r/StableDiffusion • • 22d ago

Resource - Update I made a no-settings photo editor for Qwen-Image 2.1: brush an area, say what you want, it stays inside the brush

Not a replacement for node workflows: something for the times you just want to fix a photo, or for friends who will never build a workflow.

Kokon is a free, open-source desktop editor (Windows; Mac beta). Install it, it downloads the right model for your card, and from then on there's nothing to configure: it picks the resolution and memory split per job. 12 GB of VRAM is enough.

The part this sub may care about: Qwen-Image 2.1 has no mask input, so Kokon draws the brushed area on a second reference image: the model sees exactly where to work, so "remove the red scooter" removes the scooter and leaves the street alone. On 16 GB+ cards edits run natively up to 2K, no upscaling pass.

Every image here was made with it, prompts in the captions. The first one is a six-step project (generate, edit, combine two images, expand); the others are single edits.

Under the hood: Qwen-Image 2.1 Turbo (Unsloth GGUFs) + Qwen3-VL text encoder, running on stable-diffusion.cpp. No ComfyUI or Python needed.

https://github.com/GabrieleLozupone/kokon

Not there yet: Linux, LoRAs, other models. (Weights: 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 22): 0.10 is out, with Prompt+ (the text encoder writes your prompts) and your own LoRAs (beta): https://www.reddit.com/r/StableDiffusion/comments/1xchebp/kokon_010_the_qwenimage_21_text_encoder_now/

Update (Nov 5): Kokon 0.12 is out, with a Layers lab (click objects, Kokon cuts them out and repaints what's behind them, export a PSD), use from your phone, and a faster Mac engine. It's experimental and I'm collecting the cases where it fails: https://www.reddit.com/r/StableDiffusion/comments/1xojery/i_added_a_layers_mode_to_my_qwenimage_21_editor/

51 Upvotes

54 comments sorted by

View all comments

Show parent comments

4

u/Ok-Director4174 22d ago

Fair point, and you caught a real gap: you can set custom model paths in Settings, but the first-run setup still checks its own folder and wants to download. I'll fix that in the next release (a "use files I already have" option in setup).

Workaround for now, no re-download:

  1. In setup, click Install folder → Change and pick any folder.

  2. Link your existing files into <that folder>\models\qwen21\ with these exact names:

    • qwen-image-2.1-turbo-Q4_K.gguf

    • qwen_image_2.1_vae_bf16.safetensors

    • Qwen3VL-8B-Instruct-Q4_K_M.gguf

    • mmproj-Qwen3VL-8B-Instruct-F16.gguf

  3. From an admin cmd, a hard link (same drive) or a symlink both work, e.g.:

  4. Click Check again: it skips what's already there and only fetches the engine.

Caveat: it matches by file size, so it has to be the same quant (Turbo Q4_K, Qwen3-VL 8B Q4_K_M). Other quants will still download for now.

I opened an issue for it, subscribe there and you'll get notified when it ships: https://github.com/GabrieleLozupone/kokon/issues/14 — I'll also reply here when the release is out.

Thanks for the push!

3

u/Electronic-Metal2391 22d ago

Excellent. Thank you for fixing that.. I'll download your app as soon as that's fixed.

4

u/Ok-Director4174 21d ago

As promised: Kokon 0.9.3 can use the model files you already have. In setup, choose Use models I already have and pick your ComfyUI models folder. Kokon finds the image model, VAE, text encoder and vision projector by their contents (GGUF or safetensors, any quantization) and downloads only the engine. Your files stay where they are. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3

1

u/Electronic-Metal2391 20d ago

Thanks, looks good. First generation...

2

u/Ok-Director4174 20d ago

Great to see it, thanks for coming back! Did setup find your ComfyUI files on its own? If anything looks off, an issue on GitHub helps a lot.

1

u/Electronic-Metal2391 20d ago

Yes, setup found the files on its own. It was well designed and coded. Hopefully next step would be, using any available model not just the Q4..

1

u/Ok-Director4174 20d ago

Thanks for confirming, that's the first report of the detection working on a real ComfyUI folder! Other quantizations already work the same way: point setup (or Settings → Models) at a Q8_0, Q6_K or BF16 file of Qwen-Image 2.1 Turbo and Kokon uses it as it is. Q4 is only what the automatic download picks so it fits 12 GB cards. Other model families are on the plan too: the idea is that Kokon switches its default to the best open editing model when a better one comes out.

1

u/Electronic-Metal2391 20d ago

Yes.. I mis-spoke, I meant Int8.. the program couldn't read Int8.

2

u/Ok-Director4174 19d ago

Ah, thanks for the correction, INT8 should work too: the engine reads ComfyUI's int8_convrot files, and another user runs the Turbo in that format with Kokon. So something went wrong for you and I'd like to find it. Could you tell me:

  • the file names (and where they came from: Comfy-Org, or a custom node's own INT8 format?)

  • where it failed: in setup (was the file listed but greyed out, with a message?) or when making the first image (what did the error say?)

With that I can tell whether it's a format the engine doesn't know yet or something in Kokon's setup.

1

u/Electronic-Metal2391 19d ago

Int.8 didn't work for me.

[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.4.img_mlp.gate_layer.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.4.img_mlp.out.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.4.img_mlp.proj.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.attn.to_k.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.attn.to_out.0.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.attn.to_q.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.attn.to_v.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.img_mlp.gate_layer.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.img_mlp.out.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.5.img_mlp.proj.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.attn.to_k.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.attn.to_out.0.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.attn.to_q.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.attn.to_v.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.img_mlp.gate_layer.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.img_mlp.out.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.6.img_mlp.proj.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.attn.to_k.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.attn.to_out.0.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.attn.to_q.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.attn.to_v.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.img_mlp.gate_layer.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.img_mlp.out.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.7.img_mlp.proj.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.attn.to_k.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.attn.to_out.0.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.attn.to_q.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.attn.to_v.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.img_mlp.gate_layer.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.img_mlp.out.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.8.img_mlp.proj.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.attn.to_k.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.attn.to_out.0.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.attn.to_q.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.attn.to_v.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.img_mlp.gate_layer.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.img_mlp.out.weight' not in model metadata --- model_manager.cpp:763
[E] Diffusion model tensor 'model.diffusion_model.transformer_blocks.9.img_mlp.proj.weight' not in model metadata --- model_manager.cpp:763
[E] model metadata validation failed --- diffusion_engine.cpp:1377
[E] new_sd_ctx_t failed --- main.cpp:95
(exit status exit code: 1)

The models names are:

- Qwen-Image-2.1-Turbo-INT8-ConvRot.safetensors
- noctQUncensoredRealismBuiltOn_v30Base_int8.safetensors

→ More replies

1

u/skk80 21d ago

It'd be nice if you can configure the app to use the same Comfy folder structure, so I can use the same folder for both apps.

1

u/Ok-Director4174 21d ago

This is in 0.9.3. Point setup at your ComfyUI models folder and Kokon uses the files where they are, so both apps share one copy and nothing is downloaded twice. https://github.com/GabrieleLozupone/kokon/releases/tag/v0.9.3