ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive Feedback

Litao Guo, Xinli Xu, Luozhou Wang, Jiantao Lin, Jinsong Zhou, Zixin Zhang, Bolan Su, Ying-Cong Chen

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.

Example of a complex image editing task: removing a windmill while preserving the background.

Search Tree Planning with Local Feedback

The system treats generation as a hierarchical decision tree involving three specialized agents:

  1. Planning Agent: Proposes a sequence of actions.
  2. Execution Agent: Runs the specific SWI module.
  3. 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.
Compositional generation (astronaut riding a horse) evaluated in the GenEval benchmark.

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

BibTeX
@inproceedings{guo2025comfymind,
  author = {Litao Guo and Xinli Xu and Luozhou Wang and Jiantao Lin and Jinsong Zhou and Zixin Zhang and Bolan Su and Ying-Cong Chen},
  title = {{ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive Feedback}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=cU4ow1odRe},
}
Figure