Lune

ACL Findings2026

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

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

摘要

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 knowledge bases, 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 twostage 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 rulemetric 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, surpassing prior state-of-the-art methods that employ leading closed-source models such as GPT-4o and Claude series. Qualitative analysis further highlights our model's strength in synthesizing intricate workflows with diverse nodes, aligning with human instructions, and generalizing to newly introduced nodes, underscoring the potential of long CoT reasoning in AI art creation 1 . Node Selection: I will choose the nodes ['CLIPTextEncode', 'ControlNetLoader', ...]. Workflow Planning: 1. The workflow begins by loading an InstantID model (InstantIDModelLoader) and preparing a face analysis model (InstantIDFaceAnalysis); 2. The reference image is loaded via the LoadImage node, and its facial keypoints are extracted with FaceKeypointsPreprocessor; 3. The conditioned model undergoes sampling Design a workflow that creates a high-resolution image of a woman while preserving the facial features of the reference image. The workflow should analyze the facial structure of t h e r e f e r e n c e i m a g e a n d integrate it into the generation process, ensuring the output aligns with the identity and facial features of the reference.

问 Lune

尽管问,回答会引用原文。

Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。

可以从这些问题问起

Lune 的依据

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

它引用的 Paper23

  1. Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 次引用
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  3. Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 次引用
  4. Adding Conditional Control to Text-to-Image Diffusion ModelsLvmin Zhang, Anyi Rao, Maneesh AgrawalaICCV 2023 · 6,759 次引用
  5. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用

相关 Paper

  1. ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive FeedbackLitao Guo, Xinli Xu, Luozhou Wang, Jiantao Lin 等NeurIPS 2025 · 18 次引用
  2. ComfyFlow: Benchmarking LLMs for AIGC Workflow GenerationZhenran Xu, Yiyu Wang, Yunxin Li, Muyang Ye 等ACL Findings 2026
  3. ComfyBench: Benchmarking LLM-based Agents in ComfyUI for Autonomously Designing Collaborative AI SystemsXiangyuan Xue, Zeyu Lu, Di Huang, Zidong Wang 等CVPR 2025
  4. WorkflowLLM: Enhancing Workflow Orchestration Capability of Large Language ModelsShengda Fan, Xin Cong, Yuepeng Fu, Zhong Zhang 等ICLR 2025 · 1 次引用
  5. Leveraging Verifier-Based Reinforcement Learning in Image EditingHanzhong Guo, Jie Wu, Jie Liu, Yu Gao 等CVPR 2026 · 9 次引用
黄昏的海面,两侧是细线勾勒的悬崖