mlsanityData to 14 Oct 2026

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

arXiv 2506.09790 ↗First posted 11 Jun 2025cs.CL cs.CV cs.SEcited by 15

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

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.

Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 33 of its 58 references that are in the map. First posted on arXiv 11 Jun 2025.

Builds on

33 of 58 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025Fin-R1: A Large Language Model for Financial Reasoning through Reinforcement Learning20 Mar
  2. 2024Qwen2.5-Coder Technical Report18 Sep
  3. 2023Towards Reasoning in Large Language Models via Multi-Agent Peer Review Collaboration14 Nov

Other references · 30

  1. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,356
  4. 2023IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Modelscited by 1,464
  5. 2023ChatDev: Communicative Agents for Software Developmentcited by 919
  6. 2024Large Language Model based Multi-Agents: A Survey of Progress and Challengescited by 769
  7. 2025Why Do Multi-Agent LLM Systems Fail?cited by 604
  8. 2025Search-o1: Agentic Search-Enhanced Large Reasoning Modelscited by 433
  9. 2025ToolRL: Reward is All Tool Learning Needscited by 362
  10. 2025R1-Searcher: Incentivizing the Search Capability in LLMs via Reinforcement Learningcited by 336
  11. 2025DeepResearcher: Scaling Deep Research via Reinforcement Learning in Real-world Environmentscited by 286
  12. 2025LMM-R1: Empowering 3B LMMs with Strong Reasoning Abilities Through Two-Stage Rule-Based RLcited by 248
18 more
  1. 2025MedVLM-R1: Incentivizing Medical Reasoning Capability of Vision-Language Models (VLMs) via Reinforcement Learningcited by 173
  2. 2025ToRL: Scaling Tool-Integrated RLcited by 169
  3. 2025R1-Zero's "Aha Moment" in Visual Reasoning on a 2B Non-SFT Modelcited by 165
  4. 2024Marco-o1: Towards Open Reasoning Models for Open-Ended Solutionscited by 144
  5. 2025R1-Omni: Explainable Omni-Multimodal Emotion Recognition with Reinforcement Learningcited by 100
  6. 2024Improving Text-to-Image Consistency via Automatic Prompt Optimizationcited by 90
  7. 2025Perception, Reason, Think, and Plan: A Survey on Large Multimodal Reasoning Modelscited by 90
  8. 2024(Perhaps) Beyond Human Translation: Harnessing Multi-Agent Collaboration for Translating Ultra-Long Literary Textscited by 49
  9. 2024Benchmarking Agentic Workflow Generationcited by 37
  10. 2024ComfyBench: Benchmarking LLM-based Agents in ComfyUI for Autonomously Designing Collaborative AI Systemscited by 30
  11. 2025FilmAgent: A Multi-Agent Framework for End-to-End Film Automation in Virtual 3D Spacescited by 28
  12. 2025A Unified Agentic Framework for Evaluating Conditional Image Generationcited by 15
  13. 2025ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive Feedbackcited by 15
  14. 2025ComfyGPT: A Self-Optimizing Multi-Agent System for Comprehensive ComfyUI Workflow Generationcited by 14
  15. 2024ComfyGen: Prompt-Adaptive Workflows for Text-to-Image Generationcited by 11
  16. 2025ComfyUI-Copilot: An Intelligent Assistant for Automated Workflow Developmentcited by 11
  17. 2024System 2 thinking in OpenAI's o1-preview model: Near-perfect performance on a mathematics examcited by 10
  18. 2024ComfyGI: Automatic Improvement of Image Generation Workflowscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 14.

15 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2026Learning to Compose for Cross-domain Agentic Workflow Generation
  2. 2026Workflow-GYM: Towards Long-Horizon Evaluation of Computer-use Agentic tasks in Real-World Professional Fields
  3. 2026FlowMind: Execute-Summarize for Structured Workflow Generation from LLM Reasoning
  4. 2025DyFlow: Dynamic Workflow Framework for Agentic Reasoning
  5. 2026It Takes Workflows to Evolve Better Workflows
  6. 2025ClearFairy: Capturing Creative Workflows through Decision Structuring, In-Situ Questioning, and Rationale Inference
  7. 2026Workflow-R1: Group Sub-sequence Policy Optimization for Multi-turn Workflow Construction
  8. 2026Generating Workflow DAGs from Natural Language with Non-Reasoning LLMs