A ComfyUI provider for the media pipeline framework that runs image generation, image editing, and video generation on your own GPU via local ComfyUI workflows, with zero API cost. It exports a `ComfyUIProvider` class that accepts a `baseUrl` pointing to a running ComfyUI instance and optionally a `workflowsDir` for custom JSON workflows.
Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.
Local ComfyUI provider for the media pipeline framework. Supports image generation, image editing, and video generation via custom ComfyUI workflows at zero API cost. Ships with built-in SDXL and Flux workflows and supports loading custom workflows from a directory.
Zero API cost — all generation runs on your own GPU
Built-in workflows — SDXL text-to-image, SDXL image-to-image, Flux text-to-image, and Stable Video Diffusion image-to-video
Custom workflows — load your own ComfyUI JSON workflows from a directory
Workflow registry — register, list, and retrieve workflows at runtime
Poll-based completion — automatic polling with configurable interval and retention
Progress streaming — per-node progress surfaced during workflow execution
Parameters per workflow — each workflow exposes its own typed input parameter spec
Quick Start
typescript
import { ComfyUIProvider } from "@reaatech/media-pipeline-mcp-comfyui";const provider = new ComfyUIProvider({ baseUrl: "http://localhost:8188", downloadOutputs: true,});const result = await provider.execute({ operation: "image.generate", params: { prompt: "A majestic dragon flying over a castle at sunset", negative_prompt: "blurry, low quality, distorted", seed: 42, steps: 30, cfg: 7, width: 1024, height: 1024, }, config: {},});console.log(result.metadata.workflow); // "sdxl-text2img"console.log(result.metadata.prompt_id); // "abc123..."console.log(result.costUsd); // 0
Using a specific workflow:
typescript
const result = await provider.execute({ operation: "image.generate", params: { prompt: "A futuristic city skyline, neon lights, cyberpunk", seed: 100, steps: 20, model: "workflow:flux-text2img", }, config: {},});
Loading custom workflows from a directory:
typescript
const provider = new ComfyUIProvider({ baseUrl: "http://localhost:8188", workflowsDir: "./my-workflows",});// Workflows are loaded lazily on first executionconst result = await provider.execute({ operation: "image.generate", params: { model: "workflow:custom/my-ip-adapter", prompt: "A portrait in the style of Van Gogh", image: "https://example.com/reference.png", }, config: {},});