ChatPaper.aiChatPaper

ComfyUI-R1: 워크플로 생성을 위한 추론 모델 탐구

ComfyUI-R1: Exploring Reasoning Models for Workflow Generation

June 11, 2025
저자: Zhenran Xu, Yiyu Wang, Xue Yang, Longyue Wang, Weihua Luo, Kaifu Zhang, Baotian Hu, Min Zhang
cs.AI

초록

AI 생성 콘텐츠는 단일 모델에서 모듈식 워크플로우로 진화해 왔으며, 특히 ComfyUI와 같은 플랫폼에서 창의적인 파이프라인의 맞춤화를 가능하게 했습니다. 그러나 효과적인 워크플로우를 설계하려면 수많은 전문화된 구성 요소를 조율하는 데 상당한 전문 지식이 필요하며, 이는 사용자에게 높은 학습 곡선을 제시합니다. 이러한 문제를 해결하기 위해, 우리는 자동화된 워크플로우 생성을 위한 최초의 대규모 추론 모델인 ComfyUI-R1을 소개합니다. 우리가 선별한 4K 워크플로우 데이터셋을 시작으로, 노드 선택, 워크플로우 계획, 코드 수준의 워크플로우 표현을 포함한 긴 사고의 연쇄(Chain-of-Thought, CoT) 추론 데이터를 구축합니다. ComfyUI-R1은 두 단계의 프레임워크를 통해 학습됩니다: (1) 콜드 스타트를 위한 CoT 미세 조정으로, 모델을 ComfyUI 도메인에 적응시킵니다; (2) 추론 능력을 강화하기 위한 강화 학습으로, 세분화된 규칙-메트릭 하이브리드 보상을 통해 형식 유효성, 구조적 무결성, 노드 수준의 충실도를 보장합니다. 실험 결과, 우리의 70억 파라미터 모델은 97%의 형식 유효성 비율과 높은 통과율, 노드 수준 및 그래프 수준의 F1 점수를 달성하여, GPT-4o 및 Claude 시리즈와 같은 선도적인 폐쇄형 모델을 사용하는 기존의 최신 방법을 크게 능가합니다. 추가 분석은 추론 과정의 중요성과 워크플로우를 코드로 변환하는 이점을 강조합니다. 질적 비교는 다양한 노드를 포함한 복잡한 워크플로우를 합성하는 데 있어 우리의 강점을 보여주며, AI 예술 창작에서 긴 CoT 추론의 잠재력을 강조합니다.
English
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.
PDF444June 12, 2025