Repository navigation
Replies: 1 comment 2 replies
|
Thank you, both for the kind words and for asking before opening a 17,500-line PR. That was the right call, and it made this much easier to think about. I'm glad Kokon got your wife past "everything was a no", that's exactly who it's for. On the external-engine mode itself: I won't take it upstream. Kokon picks one model and runs it for you, with nothing to set up or tune. Several model families, a separate prompt VLM and replaceable prompt bundles go the other way, and a change that size would also be more than I can keep tested release after release. Your fork is the right home for that setup, and it's good to see it exists for people with a box like yours. Using Kokon from another machine already works without it, in case it helps: on the GPU box, Settings → Other devices (or The part of your problem I think Kokon should solve itself is the GPU staying busy while nobody is generating. Today Kokon frees the GPU when no client is connected, and after 15 idle minutes when no window is attached. An open window or browser tab keeps the model loaded indefinitely, so a Kokon left open on a shared server holds the 3090 for nothing. In the next release, Kokon will unload the model after a period of inactivity even with a window or browser tab open, and load it again on the next request. That should let it sit next to your other models on the same card without an external gateway in between. Thanks again for the thought you put into this, and for writing it up so clearly. |
Uh oh!
There was an error while loading. Please reload this page.
First, a personal word: Kokon is a masterclass in UI, and a brilliant piece of engineering — in that order. The moment I found it I knew it would solve my problem. Happy wife, happy life: the only thing my wife hated me showing her more than Excel pivot tables was ComfyUI nodes. She needs image generation and editing in her workflows, and until Kokon, everything was a no for her.
The complication in our setup: we have exactly one machine powerful enough to run models — a headless Linux box with a 3090 — and it is not where she works. So the question became: how do I run Kokon where the GPU lives, and let her use it from her own machine? This branch is that answer: Kokon, unbundled from its engine.
What it is. The service can point at a small local gateway that loads models on demand (one GPU, several models, evict-on-demand — the llama-swap
/upstream/<model>proxy is the reference deployment), and Kokon stops being an engine owner: it adopts whatever the gateway loads and never starts, stops or downloads a model. "No model loaded" is its resting state, not an error.What we have been running with it. In production on that box since 11-02: two image-model families — the Qwen-Image 2.1 line (Turbo and full) and the BFL FLUX.3 Klein line — plus one shared 9B prompt-enhancement VLM that serves both families from the same 24 GB card, with a text-chat model pair co-resident and evicting cleanly. (The gateway itself is our own deployment, out of scope for the repo: it runs that whole set on the one card, evict-on-demand, behind a single keyed port.) She uses it from her own machine; the box stays headless. I suspect a number of users have a similar setup — one capable box, several machines to use it from — and would benefit from the same unbundling of UI and engine management.
The shape of the change in the repo is smaller than it sounds: a config surface (per-pipeline gateway / VLM / prompt-bundle; old configs read unchanged), one extra path segment in the engine client, the prompt-enhancement call moved into the service as a plain chat-API client, and the prompts becoming replaceable data. The in-engine mode — the default you ship — is untouched.
Why a discussion first. I understand and respect the product vision this repo is built on — one carefully chosen model, nothing to tune — and I'd rather have this conversation than throw a ~17,500-line diff at you and hope for the best. So: is "Kokon as a thin layer over your own gateway" a direction you'd accept upstream, what would you want different (naming, config shape, the VLM hard-fail policy, the bundle layout), and is there overlap with anything you're planning on the server side?
It is built on 0.12 as released, so it is ready to review as-is:
f9b6971(upstream master at the 0.12 release; the fivecommits above, nothing else): iamskeole/kokon@f9b6971...pr-external-engine-012
All reactions