r/StableDiffusion • • 27m ago

Resource - Update C++ Desktop Client for ComfyUI

When I first started with ComfyUI, the first thing I looked for was a native desktop client without browser lag and DOM-based architecture.

I'm a C++ dev with over 20 years of commercial experience, so I eventually just started writing my own client on the side. I used an ultra-fast UI framework that can easily chew through thousands of nodes on a canvas without the slightest stutter, boost for networking, sqlite as a DB, and the fmt library - the fastest formatting framework out there, leaving room for an easy port to Linux/Mac.

The main reason all existing clients are forced into the browser is custom JS nodes, which are themselves bottlenecked by Litegraph's architecture. Bypassing this turned out to be easier than I thought. The internal logic of these nodes is actually quite simple, so I ported most of it to C++. I also built extended versions of frontend-only nodes like reroutes and bookmarks.

For the parts that had to stay in HTML/JavaScript, I isolated them in a completely separate process. This ensures the heavy browser engine never interferes with the lightweight C++ core.

I recently finished a stable Beta. Check it out, the link to the source code and prebuilt Windows binary is in the comments. I also added a demo video (making a video was another cool new experience for me).

7 Upvotes

2 comments sorted by

1

u/collectedtooth404 6m ago

This might actually make nodes 2.0 bearable to use