ComfyUI-R1: Exploring Reasoning Models for Workflow Generation
Abstract
ComfyUI-R1, a large reasoning model for automated workflow generation, demonstrates superior performance in creating AI art workflows through long chain-of-thought reasoning and reinforcement learning.
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 validity, structural integrity, and node-level fidelity. Experiments show that our 7B-parameter model achieves a 97\% format validity rate, along with high pass rate, node-level and graph-level F1 scores, significantly surpassing prior state-of-the-art methods that employ leading closed-source models such as GPT-4o and Claude series. Further analysis highlights the critical role of the reasoning process and the advantage of transforming workflows into code. Qualitative comparison reveals our strength in synthesizing intricate workflows with diverse nodes, underscoring the potential of long CoT reasoning in AI art creation.
Community
Introducing ComfyUI-R1 🚀—an integration of large reasoning model and automated AI art workflows! 🎨
🔹 97% format validity & Outperforms GPT-4o & Claude in node/graph accuracy
🔹 Integrated in ComfyUI-Copilot 🛠️ (https://github.com/AIDC-AI/ComfyUI-Copilot)
Yes (once cloned ComfyUI-Copilot).
You can try the ComfyUI-R1 model in the automated workflow construction functionality in the ComfyUI-Copilot plugin (https://github.com/AIDC-AI/ComfyUI-Copilot).
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- ComfyUI-Copilot: An Intelligent Assistant for Automated Workflow Development (2025)
- One Missing Piece for Open-Source Reasoning Models: A Dataset to Mitigate Cold-Starting Short CoT LLMs in RL (2025)
- ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive Feedback (2025)
- GreenMind: A Next-Generation Vietnamese Large Language Model for Structured and Logical Reasoning (2025)
- R1-Code-Interpreter: Training LLMs to Reason with Code via Supervised and Reinforcement Learning (2025)
- Reward-SQL: Boosting Text-to-SQL via Stepwise Reasoning and Process-Supervised Rewards (2025)
- RoT: Enhancing Table Reasoning with Iterative Row-Wise Traversals (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper