I made Comfy Nodekit, a small library to make it easier to build and serialize ComfyUI workflows directly in Python.
If you’ve ever tried to hand-craft large ComfyUI graphs or maintain JSON workflows by hand, you probably know how messy it gets once you reach a few dozen nodes. We needed a better way to generate and modify graphs programmatically, so we built this.
Comfy Nodekit lets you create graphs with typed node factories, then export them back to the exact JSON format ComfyUI expects. It also introspects your running ComfyUI server to generate Python bindings for your custom nodes automatically, so you don’t lose compatibility when your setup changes.
We’re using this internally at Katalist to generate complex workflows with hundreds of nodes on the fly, things that would be impossible to manage and version.
Highlights
* Works with custom nodes (via /object_info)
* Type-safe graph composition + JSON export
* MIT license
* No runtime overhead - just Python + JSON
Why not just use ComfyScript or raw JSON? Because we wanted a Python-first, typed model that stays in sync with our ComfyUI server and is focused purely on composition, not on adding another runtime layer.
Happy to answer questions what kinds of workflows we're building for our image generation task.
bryanlyon•58m ago