ComfyUI-R1: Exploring Reasoning Models for Workflow Generation
Zhenran Xu, Yiyu Wang, Xue Yang, Longyue Wang, Weihua Luo, Kaifu Zhang, Baotian Hu, Min Zhang

TL;DR
ComfyUI-R1 is a large reasoning model designed to automate the generation of complex workflows in AI content creation platforms, significantly reducing the expertise needed and improving validity and fidelity.
Contribution
The paper introduces ComfyUI-R1, the first large reasoning model for automated workflow generation, utilizing a two-stage training process with chain-of-thought fine-tuning and reinforcement learning.
Findings
Achieves 97% format validity rate.
Surpasses state-of-the-art models like GPT-4o and Claude.
Effectively synthesizes complex workflows with diverse nodes.
Abstract
AI-generated content has evolved from monolithic models to modular workflows, particularly on platforms like ComfyUI, enabling customization in creative pipelines. However, crafting effective workflows requires great expertise to orchestrate numerous specialized components, presenting a steep learning curve for users. To address this challenge, we introduce ComfyUI-R1, the first large reasoning model for automated workflow generation. Starting with our curated dataset of 4K workflows, we construct long chain-of-thought (CoT) reasoning data, including node selection, workflow planning, and code-level workflow representation. ComfyUI-R1 is trained through a two-stage framework: (1) CoT fine-tuning for cold start, adapting models to the ComfyUI domain; (2) reinforcement learning for incentivizing reasoning capability, guided by a fine-grained rule-metric hybrid reward, ensuring format…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning in Materials Science · Scientific Computing and Data Management · Generative Adversarial Networks and Image Synthesis
