awesome-opensource
awesome-opensource copied to clipboard
Feature Request: Add ComfyUI as a Node for Advanced Image/Video Generation
Feature Request: ComfyUI Integration
Description
We should add ComfyUI as a new node type in the Agent Flow system. ComfyUI is a powerful, node-based UI for Stable Diffusion that offers advanced control over the image generation process with custom workflows.
Why It's Needed
- Advanced Image Generation: ComfyUI supports complex workflows with fine-grained control over the generation process
- Complementary to Existing Solutions: While we already have image generation providers like Replicate, OpenAI, and Fal.ai, ComfyUI would allow for more customized and complex image workflows
- Community Support: ComfyUI has a large community with many custom nodes and extensions that our users could benefit from
- Local Generation Option: Could provide an option for users to run generation locally if desired
Proposed Implementation
- Add a new provider in
packages/backend/generations/providers/comfyui.provider.ts - Create a new node type in
packages/shared/agents/agent.flow.tsfor ComfyUI - Implement the agent in
packages/backend/agents/providers/generate-image/comfyui.agent.ts - Add the UI component in
apps/frontend/src/components/agents/nodes/generate-image/comfyui.node.tsx - Update the node list in
apps/frontend/src/components/agents/nodes/node.list.ts
API Integration
ComfyUI can be interfaced with via its HTTP API:
- Running workflows
- Uploading/downloading images
- Interfacing with the queue system
UI Configuration Options
- API endpoint configuration
- Workflow JSON selection/customization
- Input parameters mapping
- Output handling
Questions to Consider
- Should we support self-hosted ComfyUI instances, or should we integrate with a hosted API?
- How detailed should the workflow configuration UI be?
- Should we provide pre-built workflows or allow full customization?
Related Work
This would expand our existing provider ecosystem:
- Currently supporting Replicate, OpenAI, Fal.ai, and RunwayML
- ComfyUI would provide a different approach to image generation with node-based workflows