2025-06-12 · 专家 · 机器学习 · 计算机视觉

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

ComfyUI-R1是一种大型推理模型,旨在自动生成ComfyUI工作流程,通过结合监督微调和强化学习,实现了复杂工作流程的自动生成。

更新于 2026-07-21。作者:Zhenran Xu、Yiyu Wang、Xue Yang、Longyue Wang、Weihua Luo、Kaifu Zhang、Baotian Hu、Min Zhang。

中文摘要

人工智能生成内容已从单体模型发展到模块化工作流程,尤其是在ComfyUI等平台上,这使得创意管道的定制化成为可能。然而,构建有效的流程需要极大的专业知识来协调众多专业组件,这对用户来说是一个陡峭的学习曲线。为了应对这一挑战,我们推出了ComfyUI-R1,这是第一个用于自动化工作流程生成的大型推理模型。我们从精心挑选的4K工作流程数据集开始,构建了长链式思维(CoT)推理数据,包括节点选择、工作流程规划和代码级别的工作流程表示。ComfyUI-R1通过两阶段框架进行训练:(1) CoT微调以适应冷启动,将模型适应ComfyUI领域;(2) 强化学习以激励推理能力,由细粒度规则-指标混合奖励指导,确保格式有效性、结构完整性和节点级别的一致性。实验表明,我们的70亿参数模型实现了97%的格式有效性率,以及高通过率、节点级和图级F1分数,显著超越了采用领先闭源模型如GPT-4o和Claude系列的先前最先进的方法。进一步的分析突出了推理过程的关键作用以及将工作流程转换为代码的优势。定性比较揭示了我们在合成具有多种节点的复杂工作流程方面的优势,强调了长CoT推理在AI艺术创作中的潜力。

英文摘要

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.

解读

一句话总结

ComfyUI-R1是一种大型推理模型,旨在自动生成ComfyUI工作流程,通过结合监督微调和强化学习,实现了复杂工作流程的自动生成。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt