Abstract
ComfyMind is a collaborative AI framework designed to address the fragility of existing open-source agents in complex, multi-step visual generation tasks. By abstracting ComfyUI workflows into high-level "semantic tools" and employing a search-tree strategy with real-time vision-language feedback, ComfyMind achieves a 100% workflow pass rate. Experimental results across benchmarks like GenEval and Reason-Edit demonstrate that ComfyMind rivals or exceeds the performance of leading closed-source models such as GPT-Image-1.
Introduction
While generative models for images and videos have advanced rapidly, orchestrating them for complex, multi-stage instructions—such as "remove this windmill, then turn the scene into a Ghibli-style animation"—remains challenging. Existing open-source agents often attempt to generate complex node graphs in a single "flat" pass, leading to syntax errors and a lack of error recovery. ComfyMind addresses these issues by introducing hierarchical planning and reactive feedback mechanisms.
Methodology
ComfyMind leverages the ComfyUI ecosystem through two primary innovations:
Semantic Workflow Interface (SWI)
Instead of managing thousands of low-level nodes, ComfyMind abstracts these into "atomic workflows." These are high-level, callable functions described in natural language, such as "Object Removal" or "I2V Generation." This abstraction reduces the search space for the Large Language Model (LLM) and eliminates common syntax errors.
Search Tree Planning with Local Feedback
The system treats generation as a hierarchical decision tree involving three specialized agents:
- Planning Agent: Proposes a sequence of actions.
- Execution Agent: Runs the specific SWI module.
- Evaluation Agent: A Vision-Language Model (VLM) that inspects the output.
If the Evaluation Agent detects a failure, the system backtracks to the relevant node in the tree to attempt an alternative strategy, mimicking a human artist's iterative workflow.
Evaluation and Results
ComfyMind was evaluated across four diverse benchmarks: ComfyBench, GenEval, Reason-Edit, and WISE.
Key Performance Metrics
- ComfyBench: Achieved a 100% pass rate for runnable workflows and an 83% resolve rate, significantly outperforming previous agents like ComfyAgent (32.5%).
- GenEval: Scored 0.90 overall, surpassing GPT-Image-1 (0.84). It showed particular strength in attribute binding and counting tasks.
- Reason-Edit: Reached a GPT-score of 0.906, the highest among open-source frameworks.
- WISE: Achieved a score of 0.85, exceeding GPT-Image-1's 0.80.
Discussion and Conclusion
The success of ComfyMind highlights that modularity and backtracking are essential for robust AI agents. By acting as a "director" using high-level tools rather than an "engineer" managing raw nodes, the system achieves stability and performance comparable to proprietary models.
Limitations
Currently, ComfyMind lacks a user-friendly interface for manual intervention within the search tree. Future work aims to integrate "human-in-the-loop" capabilities, allowing users to collaborate with the Planning Agent in real-time to refine creative outputs.
Summary updated