Nodes/ComfyUI Kontext Duo Image Analyzer/Kontext Duo Image Analyzer
ComfyUI Node

Kontext Duo Image Analyzer

Two images in, a Doubao description out — this node ships your image comparison to ByteDance's cloud

By yamanacn·Created about a year ago·Updated about a year ago· 9
Kontext Duo Image Analyzer
  • image_a
  • image_b
  • analysis_text
api_keyYOUR_ARK_API_KEY_HERE
model_idep-20250705181415-gkgwc
base_urlhttps://ark.cn-beijing.volces.com/api/v3
prompt请对比分析这两张图片,总结它们之间的核心差异和共同点。

Kontext Duo Image Analyzer is a ComfyUI node that takes two images, hands them to ByteDance's Doubao multimodal LLM running on the Volcengine Ark cloud, and hands you back a text comparison. No local model, no GPU spike - your images leave the machine, an API answers, and you get a STRING of prose describing what changed between image A and image B.

Why would you reach for it? Most image "understanding" in ComfyUI is tag extraction - WD14 and CLIP interrogators give you a word list, not an opinion. Those are free and local, but they can't tell you why two renders feel different. This node can: "the left image has warmer key light and shallower depth of field; the right one is flatter and bluer." If you're A/B testing samplers, prompts, or LoRA weights and you want an actual written readout of what shifted, that's the niche. The price is that it's an API call - you pay per request, you need network, and you're sending your generated images to a Chinese cloud. Privacy call to make with your eyes open, but for batch-eval workflows comparing dozens of output pairs it's a genuinely useful second set of eyes.

How it works

The mechanism is thin, and that's the point. The node takes both IMAGE tensors, converts each to a PIL image, base64-encodes them as PNGs, and stuffs them into an OpenAI-style chat completion - a text prompt plus two image_url data URIs - sent through the Ark SDK (volcengine-python-sdk[ark]) to https://ark.cn-beijing.volces.com/api/v3. The model's reply is returned verbatim as analysis_text. One quirk: it only takes the first frame of a batch (tensor[0]), so don't feed it a video and expect a comparison of frame 5.

Inputs and output that matter

  • image_a / image_b - the two images being compared. Wire up any two IMAGE outputs.
  • api_key - your Volcengine Ark API key.
  • model_id - this one will bite you (see below). It's the Ark Endpoint ID, not a model name.
  • base_url - leave it at the default Beijing endpoint unless your Ark account lives in another region.
  • prompt - what you want analyzed. The default is Chinese ("please compare and summarize the core differences and commonalities"); you can type English here and it works fine. Be specific: "compare composition, lighting, and color grade" gets you a much more useful answer.
  • Output analysis_text (STRING) - wire it into a ShowText node to read the result.

Installing it

Easiest path is ComfyUI Manager: search "Kontext" and install. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/yamanacn/comfyui_kontext_Analyze
cd comfyui_kontext_Analyze
pip install -r requirements.txt

Then restart ComfyUI. The dependency list is one package (volcengine-python-sdk[ark]), so no model downloads and no torch-adjacent dependency fights - about as painless as custom nodes get. One honest caveat: the README is half a template - the clone URL still says your-username and the screenshot is a placeholder - so treat the docs as aspirational and trust the code, which is short and readable.

The config trap

There are two ways to supply credentials: type them into the node's fields, or copy config.json.example to config.json in the node folder and let the node load them as defaults. The file is the better option, because ComfyUI embeds whatever you type into the workflow JSON - and workflows get shared. A key sitting in a shared JSON is a key that leaks; that's exactly how the config file idea keeps yours out of the graph.

Here's the thing the README buries: the default model_id (ep-20250705181415-gkgwc) is the author's personal Endpoint ID. Ark Endpoint IDs are per-user, generated when you deploy a model in the console. That default will not work for you. You need to create your own endpoint for a Doubao vision model on the Ark platform, copy your ep-… ID, and either put it in config.json or paste it into the field. Beginners hit this one constantly: they install, hit Run, and get an error that's really just "that endpoint doesn't exist for your account."

Common issues

  • "错误:请输入有效的 API Key" - the placeholder YOUR_ARK_API_KEY_HERE is still in the field, or your config.json is missing/misnamed.
  • Endpoint errors - almost always the borrowed model_id (above). Also check region: a non-Beijing Ark account won't get answers from the default base_url.
  • No output or a returned error string - the node returns errors as analysis_text rather than throwing, so read the ShowText output; it also prints a Kontext Analyze: line to the console.
  • Offline / no API access - there's no local fallback. Cloud or nothing.

It's a small, fresh, one-node pack from an author with zero community footprint yet - don't expect updates or issue triage. But the code is minimal and does exactly one thing, and if you're already inside the Volcengine Ark ecosystem it's a twenty-minute setup for image-comparison capability ComfyUI otherwise just doesn't have.

CategoryKontext

Inputs (6)

NameTypeDefaultDescription
image_aIMAGE
image_bIMAGE
api_keySTRINGYOUR_ARK_API_KEY_HERE
model_idSTRINGep-20250705181415-gkgwc
base_urlSTRINGhttps://ark.cn-beijing.volces.com/api/v3
promptSTRING请对比分析这两张图片,总结它们之间的核心差异和共同点。

Outputs (1)

NameTypeDescription
analysis_textSTRING