🤖 AI Summary
Comfy Nodekit is a new Python utility that makes it easy to build, type-check and serialize ComfyUI node graphs programmatically. It provides Pydantic-backed Node and Edge models, a generated nodes.py module that mirrors the running ComfyUI node catalogue as Python callables, lightweight graph primitives, and helpers to export a workflow back into the JSON format ComfyUI expects. You generate nodes.py by querying a live ComfyUI server (or feeding a saved object_info.json), then use the factory functions to wire nodes together; each factory returns a typed Edge that tracks its source node, and calling build_json_workflow() on the terminal node exports a ready-to-send JSON workflow.
For practitioners this means reproducible, code-first pipelines, easier higher-level pipeline composition, and simpler integration with CI/CD or programmatic experiment scripts. Key technical notes: the project targets Python 3.12+, depends on requests and pydantic, and includes a nodes_to_py tool (and a just recipe) to regenerate bindings when your ComfyUI nodes change. The generator sanitizes type names and rewrites nodes.py to reflect the server’s schema. Typical usage flows include building prompts, sampling, VAE decode, then exporting and posting the JSON to a ComfyUI instance — ideal for automating image-generation experiments and embedding ComfyUI workflows into ML tooling.
Loading comments...
login to comment
loading comments...
no comments yet