Papers
arxiv:2506.09790

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

Published on Jun 11
· Submitted by imryanxu on Jun 12
Authors:
,
,
,
,
,

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 summary

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

Paper author Paper submitter
edited about 9 hours ago

​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)

is ComfyUI-R1 model part of the ComfyUI install once cloned?

·

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

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

Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2506.09790 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2506.09790 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2506.09790 in a Space README.md to link it from this page.

Collections including this paper 4