Nodes/ComfyUI_NYJY/BailianVL(NYJY)
ComfyUI Node

BailianVL(NYJY)

Give your ComfyUI graph eyes, without downloading a vision model

By aidenli·Created 2 years ago·Updated 4 months ago· 146
BailianVL(NYJY)
  • image
  • answer
modelqwen2.5-vl-72b-instruct
prompt请描述这张图片
max_tokens1024
api_key
seed1234

You've generated an image and you want to know what's in it - for captioning, for tagging a training set, for deciding whether a face is a mess before you waste a full batch. Running a vision-language model locally for that costs you VRAM and setup time. This node outsources the whole job: feed it an IMAGE and a question, and Alibaba's Bailian platform describes the image for you over the API. The default model is qwen2.5-vl-72b-instruct - a 72-billion-parameter vision model that would never fit on a consumer card, running on someone else's GPU. That's the whole pitch.

How it works

BailianVL takes your image tensor, converts the first frame to PNG, base64-encodes it, and sends it to the same DashScope endpoint BailianChat uses (https://dashscope.aliyuncs.com/compatible-mode/v1), formatted as an image-plus-text user message. The model answers and the node returns the text. The image is sent up as base64 PNG inside the request, so there's no upload step on your side and no local model files at all.

Like its sibling, the node caches responses by input hash - same image, same prompt, same key means no second API call on re-run.

The inputs that matter

  • image - any IMAGE tensor from your graph (Load Image, a sampler's VAE decode, whatever). Only the first frame is analyzed, so batch-wise you get one answer per node.
  • prompt - the question. Default is "请描述这张图片" ("describe this image"), which is fine if you read Chinese, but you'll almost always want to type your own instruction in your own language.
  • model - free-text STRING, default qwen2.5-vl-72b-instruct. Type any VL model ID Bailian exposes, or wire in the BailianVLOption node to pick from a checkbox list instead.
  • api_key (optional) - blank means it reads bailian.api_key from the pack's config.json.
  • max_tokens - reply length cap, default 1024.
  • seed - note the subtlety: a seed of 0 is passed as no-seed at all, so replies are non-deterministic at 0; any other value gives you reproducible output.

Output: a single answer STRING.

Getting set up

Same account story as BailianChat: register at bailian.console.aliyun.com, create a key, real-name verify (required or the API refuses), put the key in config.json under bailian.api_key. Install the pack as usual - ComfyUI Manager → Install via Git URL → https://github.com/aidenli/ComfyUI_NYJY - and restart. The openai pip dependency is what this node leans on.

Common issues

A proxy or VPN breaks it. Mainland-China service, author's explicit warning: turn the tunnel off or Bailian calls fail. If you get an error string back through the answer output rather than a caption, that's the usual suspect, followed by a missing/wrong key.

Quality varies by model. 72B instruct is genuinely good at dense, natural-language descriptions; qwen-vl-plus is the cheap tier and reads more like a content summary. For fine-grained captioning tasks people usually land on the bigger model and pay the few cents per image.

It's the fastest way to get a second pair of eyes on your output mid-workflow, and unlike the JoyCaption nodes in this same pack it needs zero local model files and almost no VRAM. Trade a little money and some network privacy for that convenience - that's the deal, and for most captioning-once tasks it's a good one.

CategoryNYJY/llm

Inputs (6)

NameTypeDefaultDescription
modelSTRINGqwen2.5-vl-72b-instruct
imageIMAGE
promptSTRING请描述这张图片
max_tokensoptINT10241–8192
api_keyoptSTRING
seedoptINT12340–2147483647

Outputs (1)

NameTypeDescription
answerSTRING