arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2506.09790cs.CLcs.CVcs.SE
收藏

ComfyUI-R1: 探索用于工作流生成的推理模型

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

Harbin Institute of Technology (Shenzhen)(哈尔滨工业大学(深圳));Alibaba International Digital Commerce(阿里巴巴国际数字商务)

Zhenran Xu, Yiyu Wang, Xue Yang, Longyue Wang, Weihua Luo, Kaifu Zhang, Baotian Hu, Min Zhang

AI总结:

针对ComfyUI工作流构建门槛高的问题,提出首个用于工作流生成的推理模型ComfyUI-R1,基于4K工作流数据集构建长CoT数据,通过两阶段训练实现97%格式有效率,性能超越GPT-4o等闭源模型,展现长推理在AI艺术创作中的潜力。

摘要:

AI生成内容已从单一模型发展为模块化工作流,尤其是在ComfyUI这类平台上,实现了创意管线的定制化。然而,构建有效的工作流需要丰富的专业知识来编排大量专用组件,给用户带来了陡峭的学习曲线。为解决这一挑战,我们提出了ComfyUI-R1——首个用于自动化工作流生成的大型推理模型。基于我们整理的4K个工作流的数据集,我们构建了长思维链(CoT)推理数据,涵盖节点选择、工作流规划和代码级工作流表示。ComfyUI-R1通过两阶段框架训练:(1)用于冷启动的CoT微调,使模型适配ComfyUI领域;(2)用于强化推理能力的强化学习,由细粒度规则-指标混合奖励引导,确保格式有效性、结构完整性和节点级保真度。实验表明,我们的7B参数模型实现了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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑