REVIEW 3 major objections 4 minor 3 cited by
ComfyUI-R1: Exploring Reasoning Models for Workflow Generation
T0 review · 3 major / 4 minor · reviewed 2026-08-07 · deepseek-v4-flash
Pith's one-line read A 7-billion-parameter model writes executable ComfyUI workflows at a 97 percent validity rate.
desk verdict A solid RL-for-workflow application with honest scoping on the main test set, but the ComfyBench comparison is uncontrolled and the node reward ignores precision; deserves peer review with revisions. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing machinery is two-stage post-training with a structured action space. Stage one is supervised fine-tuning on distilled long chain-of-thought data: each example asks the model to output a node-selection block, a design-principle rationale, and a workflow expressed as Python-like function calls in topological order, reversibly convertible to ComfyUI JSON. Stage two is Group Relative Policy Optimization (GRPO), a reinforcement-learning method that samples a group of outputs for the same input and assigns each an advantage from its reward relative to the group. The reward used in training is a veto-based hybrid: format reward checks that all required tags parse, structure reward checks that the workflow forms a valid directed acyclic graph, node-fidelity reward penalizes nodes outside the candidate set or inconsistent between the selection block and the code, and only if all three pass is a precision-style node-selection reward applied; any single veto sets total reward to -1. This design is what lets the model maximize reasoning quality while hard constraints remain non-negotiable.
What would settle it
Give the model the same 600 test instructions but remove the candidate-node menu entirely, or perturb Vcand so that some gold nodes are missing, and recompute format validity, node-level F1, and execution pass rate; if these collapse toward the few-shot baselines, the claimed reasoning advantage depends on the candidate-menu protocol.
Extended reading notes
Core claim
The central claim, stated on the authors' terms, is that ComfyUI-R1 is the first large reasoning model for automated workflow generation and that its two-stage recipe, cold-start CoT supervised fine-tuning followed by GRPO reinforcement learning with a fine-grained rule-metric hybrid reward, is what enables a 7B parameter model to outperform prior state-of-the-art systems built on GPT-4o and Claude. On the in-house test set, format validity reaches 97% versus 41% for the untrained backbone, while node-level F1 is 0.62 and graph-level F1 is 0.51, both above all baselines. The ablation shows that the RL stage improves format validity from 95% to 97%, and that representing workflows as Python-like code outperforms representing them as JSON. On ComfyBench, which tests end-to-end retrieval and generation without a supplied candidate node set, the model achieves a 0.67 pass rate, an absolute 11% gain over the GPT-4o-based ComfyAgent.
Load-bearing premise
The load-bearing premise is that the evaluation protocol, which hands the model a candidate node list that already contains every correct node plus a small random set of decoys, fairly represents how users will actually get node suggestions; if retrieval errors or the full-size node space make the real candidate list less helpful, the reported gains shrink.
Editorial extensions
If this is right
- A 7B open-weights model can beat prompt-only systems powered by GPT-4o and Claude 3.5/3.7 on a structured generation task, so workflow-generation capability is trainable rather than dependent on API-scale models.
- With 97% format validity, the model's outputs can almost always be parsed into executable ComfyUI graphs, making workflow generation usable as a component in a copilot rather than a suggestion tool.
- The code-representation advantage over JSON indicates that a structured, semantically rich action space helps the model both plan and conform to graph constraints.
- The veto-based hybrid reward provides a transferable recipe: enforce hard constraints as binary gates and let reinforcement learning optimize only the soft quality metric inside those gates.
- The 0.67 ComfyBench pass rate means a majority of generated workflows actually execute on the ComfyUI server, which is the strongest evidence that the benefit reaches real retrieval-plus-generation use.
Reading between the lines
- The main test set's candidate-node protocol, which injects the gold nodes plus a small random decoy set, isolates node selection from retrieval; a reader should treat the ComfyBench number as the more realistic estimate of deployed performance, and even 0.67 likely degrades as the node space grows.
- The same SFT-plus-GRPO recipe with a code-level DAG action space should transfer to other low-code creative tools, such as Blender geometry nodes or video-editing graphs, where the hard constraints are format, graph validity, and node fidelity.
- A cheap testable extension is to vary the number of random candidates in the protocol: if performance holds when decoys are many or when gold nodes are partly withheld, retrieval is not the bottleneck; if it collapses, retrieval becomes the priority.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents ComfyUI-R1, a 7B-parameter reasoning model for generating ComfyUI workflows from natural-language instructions. The authors collect a knowledge base of 3,917 workflows and 7,238 nodes, synthesize long chain-of-thought training data (node selection, design rationale, code representation), fine-tune Qwen2.5-Coder-7B-Instruct on this data, and then apply GRPO with a rule-metric hybrid reward combining format validity, DAG structure, node fidelity, and node-selection accuracy. Evaluation on a self-built 600-sample test set reports 97% format validity, node-level F1 0.62, and graph-level F1 0.51, outperforming few-shot and CoT baselines with GPT-4o and Claude models. An end-to-end experiment on ComfyBench reports a 0.67 pass rate versus 0.56 for ComfyAgent, leading the authors to claim that their 7B model significantly surpasses prior state-of-the-art methods built on larger closed-source models.
Significance. If the results hold, the paper would be a useful demonstration that a 7B open model can outperform much larger closed models on structured workflow generation through SFT followed by reinforcement learning with a custom reward. The comparison of code-based versus JSON-based workflow representations, the detailed knowledge-base construction, and the integration into ComfyUI-Copilot are practical contributions. The reasoning-data generation and reward design are described clearly enough to be replicated, modulo the use of proprietary LLMs to produce rationales and descriptions. However, the strongest end-to-end claim rests on a comparison that is not currently controlled, and the node-selection reward is recall-only, so the evidence for the headline superiority is weaker than the text suggests.
major comments (3)
- [Sec. 4.5, Table 3] The 0.67 versus 0.56 pass-rate comparison is not a controlled head-to-head. The ComfyAgent and GPT-4o numbers are taken from the original paper, while ComfyUI-R1 is evaluated with its own retrieval pipeline (top-3 workflows from a 3,917-workflow KB embedded with text-embedding-3-small) and an execution harness that is not shown to be identical to the one used for the published baselines. Because the KB is scraped from ComfyUI community sites (Sec. 3.1) and ComfyBench tasks are themselves ComfyUI workflows, the paper must quantify overlap or near-duplicates between the KB and the ComfyBench test set; if gold workflows leak into retrieval, Vcand can contain the correct nodes and inflate the pass rate. I ask for an overlap analysis, a re-run of ComfyAgent under the same retrieval and execution conditions, or an ablation that isolates the generator from the retrieval component.
- [Sec. 3.3, Eq. (5)] The node-selection reward R_correct = |Vp∩Vg|/|Vg| - 1 is recall-only. It reaches its maximum of 0 whenever all gold nodes are included, regardless of how many additional valid but non-gold nodes are selected; R_fidelity only penalizes nodes outside Vcand and mismatches between the selected_nodes block and the workflow block, not extra in-candidate nodes. Thus the reward does not penalize a significant class of over-generation, which is also consistent with the case study's observation that ComfyUI-R1 produces more nodes than ComfyAgent. I recommend adding a precision or cardinality term and, at minimum, reporting reward variants in the ablation study.
- [Sec. 4.1, Table 1] The main test set is evaluated with an oracle candidate set that always contains the gold node set, which the paper acknowledges as an evaluation of reasoning over pre-retrieved nodes. This is a fair across-model protocol, but it means the high absolute F1 scores and the format-validity rate do not by themselves establish end-to-end usability; the only end-to-end evidence is the ComfyBench experiment, whose control issues are raised above. The paper should either add end-to-end results on its own test set or clearly state in the abstract and conclusion that the superiority claims are for the pre-retrieved-node setting.
minor comments (4)
- [Eq. (9)] The displayed KL divergence is not the standard KL(πθ||πref); as written it places expectations under πref and appears to be the reverse KL with a -1 offset. Please correct the equation or clarify the convention used.
- [Sec. 3.2] The split statement is numerically inconsistent: 3,717 workflows split into training and 200 test should yield 3,517 training workflows, and with three generated samples per workflow (Qwen-Max, Claude 3.5, GPT-4o) the expected counts are 10,551 training and 600 test samples, not 11,140. Please clarify the sample-generation process.
- [Sec. 4.3] The implementation details report the main hyperparameters, but the paper does not state the exact RL training data size, the inference prompt template, or whether the model and training code will be released. Please provide a repository link or state the release plan for reproducibility.
- [Sec. 4.6, Fig. 3-5] The qualitative claims that ComfyUI-R1's outputs 'adhere' to style and 'seamlessly combine' images are subjective; adding a small quantitative metric, such as CLIP similarity of generated images to the instruction, would strengthen the case study.
Circularity Check
No material circularity: the training and evaluation pipeline is metric-aligned but not circular; borrowed ComfyBench baseline numbers are a comparison-fairness issue, not a definitional reduction.
full rationale
I walked the paper's derivation chain: SFT data are constructed from a curated workflow KB (Sec. 3.1-3.2), the model is trained with a rule-metric hybrid reward (Sec. 3.3) under GRPO (Sec. 3.4), and evaluation uses held-out test instructions plus ComfyBench (Sec. 4.5). No step defines X in terms of Y such that the claimed prediction is identical to its input by construction. The candidate-node protocol Vcand = Vg ∪ Vrandom (Sec. 3.2) does give the model the gold nodes during both training and test, and the paper explicitly discloses that this "evaluation setup is designed to assess the model's ability to reason over pre-retrieved node information, rather than its retrieval capability" (Sec. 4.1). That is a scoped evaluation choice, not a circular derivation. Likewise, R_correct = |Vp∩Vg|/|Vg| - 1 (Eq. 5) is directly aligned with the node-level F1 metric, but aligning a reward with the target metric is standard training practice, not a fitted-parameter-called-prediction. The strongest non-circularity concern is Table 3: "The numbers of GPT-4o methods are taken from the original paper [Xue et al. 2024]," while ComfyUI-R1 uses its own retrieval over a 3,917-workflow KB. This makes the 0.67 vs 0.56 comparison uncontrolled and should be weighed as a correctness/robustness risk, but it is not an input-output equivalence. Self-citations (ComfyUI-Copilot, Marco-o1, Anim-Director, etc.) are contextual or related-work citations and are not load-bearing for the central claim. Overall, the central result is an empirical trained-model comparison, self-contained against the external ComfyBench benchmark modulo the borrowed baseline numbers, with no identifiable circular step.
Assumptions & free parameters
free parameters (2)
- Distractor ratio in candidate node set =
0.8 x |V_g|
- Number of retrieved workflows in end-to-end setting =
3
assumptions (4)
- domain assumption The JSON-to-code and code-to-JSON parsers are assumed reversible and semantically faithful.
- domain assumption LLM-generated workflow descriptions and reasoning rationales are assumed accurate reflections of what the workflows do.
- domain assumption WorFEval-style LIS and MCIS graph matching is assumed to measure workflow quality.
- domain assumption Community-sourced workflows used as ground truth are assumed correct and well-designed.
Cite this review
Pith. "Pith review of ComfyUI-R1: Exploring Reasoning Models for Workflow Generation." pith.science (2026). https://pith.science/paper/BT46BYYO
@misc{pith2026250609790,
author = {Pith},
title = {Pith review of: ComfyUI-R1: Exploring Reasoning Models for Workflow Generation},
year = {2026},
howpublished = {\url{https://pith.science/paper/BT46BYYO}},
note = {Machine review of arXiv:2506.09790}
}
read the original 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.
Figures
Figures from the paper (3 more)
Forward citations
Cited by 3 Pith papers
-
Knowledge-Centric Agents for Workflow Generation in ComfyUI
A knowledge-centric pipeline distills strategies and pseudo-codes from real workflows, fine-tunes a language model on those levels, and reconstructs executable ComfyUI graphs from task descriptions.
-
Na\"ive PAINE: Lightweight Text-to-Image Generation Improvement with Prompt Evaluation
A lightweight predictor ranks initial noises by expected human-preference score for a prompt, selecting the best few for diffusion generation and reporting prompt difficulty.
-
JarvisHub: An Open Harness for Canvas-Native Multimodal Creative Agents
JarvisHub open-sources a three-layer canvas-state, protocol-bridge, and agent-runtime harness so multimodal creative agents can inspect and update a shared editable project graph over long workflows.
Reference graph
Works this paper leans on
-
[2024]
Improving Text-to-Image Consistency via Automatic Prompt Optimization. arXiv:2403.17804 [cs.CV] https://arxiv.org/abs/2403.17804 Qian Ning, Weisheng Dong, Guangming Shi, Leida Li, and Xin Li. 2021. Accurate and Lightweight Image Super-Resolution With Model-Guided Deep Unfolding Network. IEEE Journal of Selected Topics in Signal Processing15, 2 (2021), 240...
arXiv 2021
-
[2025]
Flow: Modularized Agentic Workflow Automation. InThe Thirteenth Interna- tional Conference on Learning Representations. https://openreview.net/forum?id= sLKDbuyq99 OpenAI. 2024. Introducing OpenAI o1-preview. https://openai.com/index/introducing- openai-o1-preview/. OpenAI. 2025a. Introducing Deep Research. https://openai.com/index/introducing- deep-resea...
arXiv 2025
Reviewed August 7, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.