ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2506.09790
62
0

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

11 June 2025
Zhenran Xu
Yiyu Wang
Xue Yang
Longyue Wang
Weihua Luo
Kaifu Zhang
Baotian Hu
Min Zhang
    AI4TSLRM
ArXiv (abs)PDFHTML
Main:7 Pages
6 Figures
Bibliography:3 Pages
5 Tables
Appendix:1 Pages
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 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.

View on arXiv
@article{xu2025_2506.09790,
  title={ ComfyUI-R1: Exploring Reasoning Models for Workflow Generation },
  author={ Zhenran Xu and Yiyu Wang and Xue Yang and Longyue Wang and Weihua Luo and Kaifu Zhang and Baotian Hu and Min Zhang },
  journal={arXiv preprint arXiv:2506.09790},
  year={ 2025 }
}
Comments on this paper