SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.17908 · 2025

ComfyMind: Toward General-Purpose Generation via Tree-Based Planning and Reactive Feedback

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2505.17908.json · badge: /api/ran/2505.17908.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
EnVision-Research/ComfyMind canonical (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
build_evaluation_messages Ran
ran on a synthesized input
EnVision-Research/ComfyMind/script/evaluation_wise.py
code served (permissive licence) · get_code("7652d95cf7d6258b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import base64

# Create a small sample image in base64 format (1x1 red pixel PNG)
# This is a minimal valid PNG that won't require external files
png_base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=="

prompt_data = {
    "Prompt": "A serene landscape with mountains and a clear blue sky at sunset",
    "Explanation": "The image should depict a peaceful mountain scenery with warm sunset colors, golden hour lighting, and a calm atmosphere. Mountains should be clearly visible with defined features and realistic terrain. The sky should transition from blue to orange and pink tones."
}

image_base64 = png_base64

ARGS = {
    "prompt_data": prompt_data,
    "image_base64": image_base64,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
encode_image Ran
ran; our contract draft was wrong, not the code
EnVision-Research/ComfyMind/script/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from xxyQwQ/ComfyBench, is pointer only (licence: NONE) · get_code("0ea99cab0cdb51ab")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xxyQwQ/ComfyBench, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_json Ran
ran on a synthesized input
EnVision-Research/ComfyMind/utils/tools.py
code served (permissive licence) · get_code("00e58640391e7193")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# The function extract_json takes a single parameter 's' which is a string
# It searches for JSON-like objects (balanced braces) within the string

# Test case 1: string with valid JSON object
test_string = '{"key": "value", "nested": {"inner": "data"}}'

ARGS = {
    's': test_string
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_scores Ran
ran on a synthesized input
EnVision-Research/ComfyMind/script/evaluation_wise.py
code served (permissive licence) · get_code("4b8a94cc59053bf8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
from typing import Dict, Any

torch_available = True
try:
    import torch
except ImportError:
    torch_available = False

# Construct the evaluation_text argument
# The function looks for patterns like "**Consistency**: 5" or "Realism: 8" etc.
evaluation_text = """
**Consistency**: 7
Realism:9
*Aesthetic Quality* : 6
Some other text here.
"""

# Define ARGS with all parameters for extract_scores
ARGS = {
    'evaluation_text': evaluation_text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
invoke_text_reasoning Ran
ran on a synthesized input
EnVision-Research/ComfyMind/utils/model.py
code served (permissive licence) · get_code("3e644685f037489f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
from unittest.mock import Mock, patch

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# Mock the OpenAI client and related constants
TEXT_REASONING_BASE_URL = "http://localhost:8000/v1"
TEXT_REASONING_API_KEY = "test-api-key"
TEXT_REASONING_MODEL_NAME = "test-model"

# Create a mock response object with the structure expected by the function
mock_message_content = "The answer is 42"
mock_choice = Mock()
mock_choice.message.content = mock_message_content

mock_usage = Mock()
mock_usage.prompt_tokens = 10
mock_usage.completion_tokens = 5
mock_usage.total_tokens = 15

mock_response = Mock()
mock_response.choices = [mock_choice]
mock_response.usage = mock_usage

# Create a mock completion method
def mock_create(*args, **kwargs):
    return mock_response

# Mock client
mock_client = Mock()
mock_client.chat.completions.create = mock_create

# Message format for OpenAI chat API - list of dicts
message = [
    {"role": "user", "content": "What is 2+2?"}
]

ARGS = {
    "message": message,
    "model_name": "test-model",
    "api_key": "test-api-key-override",
    "base_url": "http://localhost:8000/v1"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
invoke_vision_reasoning Ran
ran on a synthesized input
EnVision-Research/ComfyMind/utils/model.py
code served (permissive licence) · get_code("e0a5e7aa877646e5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
from unittest.mock import Mock, MagicMock

# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# Mock the global variables that the function references
VISION_REASONING_BASE_URL = "http://localhost:8000/v1"
VISION_REASONING_API_KEY = "mock-api-key"
VISION_REASONING_MODEL_NAME = "mock-vision-model"

# Create a mock message that could be passed to the chat completions API
mock_message = [
    {
        "role": "user",
        "content": "What is in this image?"
    }
]

# Mock the OpenAI client and response
mock_usage = Mock()
mock_usage.prompt_tokens = 10
mock_usage.completion_tokens = 5
mock_usage.total_tokens = 15

mock_choice = Mock()
mock_choice.message.content = "This is a test response from the vision model."

mock_response = Mock()
mock_response.choices = [mock_choice]
mock_response.usage = mock_usage

# Patch OpenAI to return our mock response
import sys
from unittest.mock import patch, MagicMock

mock_openai_module = MagicMock()
mock_client_instance = MagicMock()
mock_client_instance.chat.completions.create.return_value = mock_response

def mock_openai_init(base_url=None, api_key=None):
    return mock_client_instance

mock_openai_module.OpenAI = mock_openai_init

sys.modules['openai'] = mock_openai_module
sys.modules['openai.OpenAI'] = mock_openai_module

# Define the function arguments
ARGS = {
    "message": mock_message,
    "model_name": "mock-vision-model",
    "api_key": "mock-api-key",
    "base_url": "http://localhost:8000/v1"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_image Ran
ran; our contract draft was wrong, not the code
EnVision-Research/ComfyMind/script/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from xxyQwQ/ComfyBench, is pointer only (licence: NONE) · get_code("50b302b35ddbddda")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xxyQwQ/ComfyBench, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_image Not yet run
unverified (harvested, no recorded run)
EnVision-Research/ComfyMind/script/evaluation_wise.py
code served (permissive licence) · get_code("393004fc099595af")
How it ran

no invocation recorded.

file_to_path Not yet run
unverified (harvested, no recorded run)
EnVision-Research/ComfyMind/main_gradio.py
code served (permissive licence) · get_code("eed76456e1986f29")
How it ran

no invocation recorded.

invoke_vision Not yet run
unverified (harvested, no recorded run)
EnVision-Research/ComfyMind/script/evaluation.py
code served (permissive licence) · get_code("43c17cc3d3f4e7e8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
encode_image 2 other papers
1 dated earlier, 1 later
2309.16211 (2023-09)
VDC: Versatile Data Cleanser based on Visual-Linguistic Inconsistency by Multimodal Large Language Models
2606.10403 (2026-06)
KCSAT-ML: Probing Reasoning Models with Nationwide-Cohort Human Difficulty
encode_image 1 other paper
1 dated earlier
2409.01392 (2024-09)
ComfyBench: Benchmarking LLM-based Agents in ComfyUI for Autonomously Designing Collaborative AI Systems
load_image 1 other paper
1 dated earlier
2409.01392 (2024-09)
ComfyBench: Benchmarking LLM-based Agents in ComfyUI for Autonomously Designing Collaborative AI Systems

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

With the rapid advancement of generative models, general-purpose generation has gained increasing attention as a promising approach to unify diverse tasks across modalities within a single system. Despite this progress, existing open-source frameworks often remain fragile and struggle to support complex real-world applications due to the lack of structured workflow planning and execution-level feedback. To address these limitations, we present ComfyMind, a collaborative AI system designed to enable robust and scalable general-purpose generation, built on the ComfyUI platform. ComfyMind introduces two core innovations: Semantic Workflow Interface (SWI) that abstracts low-level node graphs into callable functional modules described in natural language, enabling high-level composition and reducing structural errors; Search Tree Planning mechanism with localized feedback execution, which models generation as a hierarchical decision process and allows adaptive correction at each stage. Together, these components improve the stability and flexibility of complex generative workflows. We evaluate ComfyMind on three public benchmarks: ComfyBench, GenEval, and Reason-Edit, which span generation, editing, and reasoning tasks. Results show that ComfyMind consistently outperforms existing open-source baselines and achieves performance comparable to GPT-Image-1. ComfyMind paves a promising path for the development of open-source general-purpose generative AI systems. Project page: https://github.com/LitaoGuo/ComfyMind

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2505.17908")
get_code_for_paper("2505.17908")
have("2505.17908")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2505.17908.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2505.17908.svg)](https://syntology.ai/paper/2505.17908)

Connect an agent — have() is free.