Knowledge-Centric Agents for Workflow Generation in ComfyUI
Zhendong Li, Lei Sun, Ruibo Ming, He Zhang, Danda Pani Paudel, Luc Van Gool, Jinjin Gu
Abstract
Workflow generation in visual creation systems such as ComfyUI demands not only syntactic accuracy but also expert-level reasoning over modular compositions. Existing large language model (LLM) approaches often treat this as a direct text-to-JSON generation task, struggling with structural brittleness and lacking the experiential knowledge required for effective design. We argue that successful workflow generation requires modeling knowledge itself, including its structure, hierarchy, and reasoning dynamics. To this end, we propose a knowledge-centric framework that learns to invert, inject, and infer with knowledge across multiple abstraction levels. We first perform knowledge inversion to distill hierarchical representations, ranging from full pseudo-codes and skeletons to high-level strategies, from large collections of real-world workflows. We then conduct knowledge injection through supervised fine-tuning, teaching the model to reason from task descriptions to strategies and from strategies to executable structures. During inference, the model performs reversible reasoning to synthesize executable workflows, augmented by self-refinement for structural coherence. Extensive experiments demonstrate that our method produces workflows with richer node diversity, more coherent structures, and higher execution success rates than existing systems, establishing a new foundation for knowledge-driven, agentic workflow generation.
Create a lesson
Metadata
- Comments
- Accepted to ECCV 2026
Related papers
ReasFlow: Assisting Reasoning-Centric Scientific Discovery in Applied Mathematics via a Knowledge-Based Multi-Agent System
Shared title terminologycs.AIYutong He, Daibo Li, Guohong Li et al.
Interactive Proofs as a Unified Framework for Evaluating and Leveraging Verifiable Proof Generation by LLM Agents
Shared title terminologycs.AIYankai Shu, Xingyu Zhao, Chuan Mao et al.
FIG-MAC: A Fine-grained Inspiration Graph Empowered Multi-Agent Collaboration for Automated Scientific Hypothesis Generation
Shared title terminologycs.AISiyuan Chen, Yuping Gao, Tai Huang et al.
Partial Routing: Trace-Tuned Delegation for Resource-Efficient Agentic Workflows
Shared title terminologycs.AISiddharth Arya, Kshitij Jain
RubikSQL-HB: Agentic Text-to-SQL with Knowledge in the Loop
Shared title terminologycs.AIHaorui Jia, Zihan Qu, Yundi Dong et al.
The Control-Flow Tax: Specialized Decision Routing for LLM Agent Workflows
Shared title terminologycs.AIZhikai Cheng, Shuanghu Wang, Li Jiang