ComfyUI-R1: Exploring Reasoning Models for Workflow Generation
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
- 2025Fin-R1: A Large Language Model for Financial Reasoning through Reinforcement Learning20 Mar
- 2024Qwen2.5-Coder Technical Report18 Sep
- 2023Towards Reasoning in Large Language Models via Multi-Agent Peer Review Collaboration14 Nov
Other references · 30
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,356
- 2023IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Modelscited by 1,464
- 2023ChatDev: Communicative Agents for Software Developmentcited by 919
- 2024Large Language Model based Multi-Agents: A Survey of Progress and Challengescited by 769
- 2025Why Do Multi-Agent LLM Systems Fail?cited by 604
- 2025Search-o1: Agentic Search-Enhanced Large Reasoning Modelscited by 433
- 2025ToolRL: Reward is All Tool Learning Needscited by 362
- 2025R1-Searcher: Incentivizing the Search Capability in LLMs via Reinforcement Learningcited by 336
- 2025DeepResearcher: Scaling Deep Research via Reinforcement Learning in Real-world Environmentscited by 286
- 2025LMM-R1: Empowering 3B LMMs with Strong Reasoning Abilities Through Two-Stage Rule-Based RLcited by 248
18 more
- 2025MedVLM-R1: Incentivizing Medical Reasoning Capability of Vision-Language Models (VLMs) via Reinforcement Learningcited by 173
- 2025ToRL: Scaling Tool-Integrated RLcited by 169
- 2025R1-Zero's "Aha Moment" in Visual Reasoning on a 2B Non-SFT Modelcited by 165
- 2024Marco-o1: Towards Open Reasoning Models for Open-Ended Solutionscited by 144
- 2025R1-Omni: Explainable Omni-Multimodal Emotion Recognition with Reinforcement Learningcited by 100
- 2024Improving Text-to-Image Consistency via Automatic Prompt Optimizationcited by 90
- 2025Perception, Reason, Think, and Plan: A Survey on Large Multimodal Reasoning Modelscited by 90
- 2024(Perhaps) Beyond Human Translation: Harnessing Multi-Agent Collaboration for Translating Ultra-Long Literary Textscited by 49
- 2024Benchmarking Agentic Workflow Generationcited by 37
- 2024ComfyBench: Benchmarking LLM-based Agents in ComfyUI for Autonomously Designing Collaborative AI Systemscited by 30
- 2025FilmAgent: A Multi-Agent Framework for End-to-End Film Automation in Virtual 3D Spacescited by 28
- 2025A Unified Agentic Framework for Evaluating Conditional Image Generationcited by 15
- 2025ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive Feedbackcited by 15
- 2025ComfyGPT: A Self-Optimizing Multi-Agent System for Comprehensive ComfyUI Workflow Generationcited by 14
- 2024ComfyGen: Prompt-Adaptive Workflows for Text-to-Image Generationcited by 11
- 2025ComfyUI-Copilot: An Intelligent Assistant for Automated Workflow Developmentcited by 11
- 2024System 2 thinking in OpenAI's o1-preview model: Near-perfect performance on a mathematics examcited by 10
- 2024ComfyGI: Automatic Improvement of Image Generation Workflowscited by 5
Built on by
Citing papers per year: 2025: 1; 2026: 14.
15 papers.
Sort:
By area:
- 2026From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agentscited by 24
- 2025A Survey on Agentic Multimodal Large Language Modelscited by 23
- 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflowscited by 6
- 2026Chat2Workflow: A Benchmark for Generating Executable Visual Workflows with Natural Languagecited by 3
- 2026ComfySearch: Autonomous Exploration and Reasoning for ComfyUI Workflowscited by 2
- 2026VisionCreator: A Native Visual-Generation Agentic Model with Understanding, Thinking, Planning and Creationcited by 2
- 2026Knowledge-Centric Agents for Workflow Generation in ComfyUIcited by 2
- 2026VisionCreator-R1: A Reflection-Enhanced Native Visual-Generation Agentic Modelcited by 1
- 2026JarvisHub: An Open Harness for Canvas-Native Multimodal Creative Agentscited by 1
- 2026Agentic Visual Generation: From Generative Models to Agentic Controlcited by 1
- 2026Na"ive PAINE: Lightweight Text-to-Image Generation Improvement with Prompt Evaluationcited by 0
- 2026LLM-based Visual Code Completion for Aerospace Geometric Designcited by 0
3 more
- 2026MoFlow: Multi-Objective Agentic Workflow Generation29 Sep 2026
- 2026TemplateCraft: Agentic Visual Template Generation25 Sep 2026
- 2026Agentic Visual Generation: From Generative Models to Agentic Control6 Sep 2026
- 2026JarvisHub: An Open Harness for Canvas-Native Multimodal Creative Agents26 Jul 2026
- 2026Knowledge-Centric Agents for Workflow Generation in ComfyUI17 Jul 2026
- 2026COMFYCLAW: Self-Evolving Skill Harnesses for Image Generation Workflows2 Jul 2026
- 2026From Search to Synthesis: Training LLMs as Zero-Shot Workflow Generators29 Jun 2026
- 2026LLM-based Visual Code Completion for Aerospace Geometric Design15 Jun 2026
- 2026Chat2Workflow: A Benchmark for Generating Executable Visual Workflows with Natural Language21 Apr 2026
- 2026From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agents23 Mar 2026
- 2026Na"ive PAINE: Lightweight Text-to-Image Generation Improvement with Prompt Evaluation12 Mar 2026
- 2026VisionCreator-R1: A Reflection-Enhanced Native Visual-Generation Agentic Model9 Mar 2026
- 2026From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agentscited by 24
- 2026VisionCreator: A Native Visual-Generation Agentic Model with Understanding, Thinking, Planning and Creationcited by 2
- 2026Knowledge-Centric Agents for Workflow Generation in ComfyUIcited by 2
- 2026VisionCreator-R1: A Reflection-Enhanced Native Visual-Generation Agentic Modelcited by 1
- 2026Agentic Visual Generation: From Generative Models to Agentic Controlcited by 1
- 2026TemplateCraft: Agentic Visual Template Generationcited by 0
- 2026MoFlow: Multi-Objective Agentic Workflow Generationcited by 0
- 2026MoFlow: Multi-Objective Agentic Workflow Generation29 Sep 2026
- 2026TemplateCraft: Agentic Visual Template Generation25 Sep 2026
- 2026Agentic Visual Generation: From Generative Models to Agentic Control6 Sep 2026
- 2026Knowledge-Centric Agents for Workflow Generation in ComfyUI17 Jul 2026
- 2026From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agents23 Mar 2026
- 2026VisionCreator-R1: A Reflection-Enhanced Native Visual-Generation Agentic Model9 Mar 2026
- 2026VisionCreator: A Native Visual-Generation Agentic Model with Understanding, Thinking, Planning and Creation3 Mar 2026
- 2025A Survey on Agentic Multimodal Large Language Modelscited by 23
- 2026LLM-based Visual Code Completion for Aerospace Geometric Designcited by 0
- 2026LLM-based Visual Code Completion for Aerospace Geometric Design15 Jun 2026
- 2025A Survey on Agentic Multimodal Large Language Models13 Oct 2025
- 2026Chat2Workflow: A Benchmark for Generating Executable Visual Workflows with Natural Languagecited by 3
- 2026ComfySearch: Autonomous Exploration and Reasoning for ComfyUI Workflowscited by 2
- 2026JarvisHub: An Open Harness for Canvas-Native Multimodal Creative Agentscited by 1
- 2026From Search to Synthesis: Training LLMs as Zero-Shot Workflow Generatorscited by 0
- 2026JarvisHub: An Open Harness for Canvas-Native Multimodal Creative Agents26 Jul 2026
- 2026From Search to Synthesis: Training LLMs as Zero-Shot Workflow Generators29 Jun 2026
- 2026Chat2Workflow: A Benchmark for Generating Executable Visual Workflows with Natural Language21 Apr 2026
- 2026ComfySearch: Autonomous Exploration and Reasoning for ComfyUI Workflows7 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2026Learning to Compose for Cross-domain Agentic Workflow Generation
- 2026Workflow-GYM: Towards Long-Horizon Evaluation of Computer-use Agentic tasks in Real-World Professional Fields
- 2026FlowMind: Execute-Summarize for Structured Workflow Generation from LLM Reasoning
- 2025DyFlow: Dynamic Workflow Framework for Agentic Reasoning
- 2026It Takes Workflows to Evolve Better Workflows
- 2025ClearFairy: Capturing Creative Workflows through Decision Structuring, In-Situ Questioning, and Rationale Inference
- 2026Workflow-R1: Group Sub-sequence Policy Optimization for Multi-turn Workflow Construction
- 2026Generating Workflow DAGs from Natural Language with Non-Reasoning LLMs