ComfySearch: Autonomous Exploration and Reasoning for ComfyUI Workflows
Jinwei Su, Qizhen Lan, Zeyu Wang, Yinghui Xia, Hairu Wen, Yiqun Duan, Xi Xiao, Tianyu Shi, Yang Jingsong, Lewei He
TL;DR
ComfySearch introduces an execution-grounded, reasoning-as-action framework for autonomous ComfyUI workflow construction. By coupling state-aware online validation with in-place repair and entropy-adaptive branching, it robustly builds long-horizon, typified node graphs that remain executable at every prefix. The method is trained with a two-stage pipeline—supervised warmup and tool-mediated RL using GRPO—and guided by consistency-filtered data and validator-backed traces. Evaluations on ComfyBench and GenEval show substantial gains in executability, task success, and downstream compositional accuracy, highlighting the practical impact of execution-grounded exploration for modular creative pipelines.
Abstract
AI-generated content has progressed from monolithic models to modular workflows, especially on platforms like ComfyUI, allowing users to customize complex creative pipelines. However, the large number of components in ComfyUI and the difficulty of maintaining long-horizon structural consistency under strict graph constraints frequently lead to low pass rates and workflows of limited quality. To tackle these limitations, we present ComfySearch, an agentic framework that can effectively explore the component space and generate functional ComfyUI pipelines via validation-guided workflow construction. Experiments demonstrate that ComfySearch substantially outperforms existing methods on complex and creative tasks, achieving higher executability (pass) rates, higher solution rates, and stronger generalization.
