Image & Video

I built an agent-first CLI that deploys a RunPod serverless ComfyUI endpoint and runs workflows from the terminal (plus a visual pipeline editor)

Open-source CLI deploys serverless ComfyUI endpoints and runs workflows directly from the terminal for AI agents.

Deep Dive

Developer Hearmeman98 has released two complementary open-source tools, ComfyGen and BlockFlow, designed to move AI image and video generation workflows from local ComfyUI instances to scalable, serverless GPU infrastructure on RunPod. The core tool, ComfyGen, is an agent-first command-line interface (CLI) that automates the deployment of a serverless ComfyUI endpoint. It features an interactive setup wizard, can download models and LoRAs directly to the GPU's network volume via serverless jobs, and executes workflows by uploading inputs to S3 and polling the endpoint. Crucially, it outputs structured JSON, making it ideal for automation by AI coding agents.

BlockFlow is a locally-run, browser-based visual pipeline editor that allows users to chain generation steps—like LLM prompt writing, ComfyUI execution, and upscaling—into complex, branching workflows. While the tools can be used together, with BlockFlow orchestrating pipelines that ComfyGen executes, the CLI is also designed for standalone scripting. This serverless approach means GPUs spin up only when a workflow runs, enabling users to scale large batches across multiple GPUs and pay only for execution time, eliminating the need to manage and pay for idle GPU pods.

Key Points
  • ComfyGen CLI automates full serverless ComfyUI endpoint setup on RunPod, including S3 storage and model downloads to GPU volumes.
  • The tools output structured JSON, making generation workflows easily automatable by AI agents and scripts for scalable batch processing.
  • The serverless model means users pay only for GPU execution time, enabling large-scale batches without managing persistent infrastructure.

Why It Matters

It democratizes scalable, cost-effective AI media generation by abstracting complex infrastructure, making it accessible for automation and large-scale projects.