Nodes/TK ImageVL - Batch Image & VLM Tools/TK QwenVL Interrogator (Single)
ComfyUI Node

TK QwenVL Interrogator (Single)

Ask Qwen-VL about the image already in your graph — one in, one string out

By tackcrypto1031·Created 8 months ago·Updated 6 months ago· 2
TK QwenVL Interrogator (Single)
  • image
  • text
model_idQwen/Qwen2.5-VL-7B-Instruct
promptDescribe this image.
max_new_tokens2048
min_pixels200704
max_pixels1003520
temperature0.70
seed0

The "Single" version of the pack's Qwen interrogator is the one you reach for when the image is already in your workflow rather than sitting in a folder. Instead of a source_path and a texts list, it takes one IMAGE tensor and hands back one STRING. That's the whole difference - everything else about the model machinery is identical to the batch node.

Why you'd use it

The batch interrogator is a dataset tool: folder in, captions out. This one is an on-the-graph tool. The classic jobs:

  • img2img / image-to-video prompt seeding - run a Load Image into this node, get a description, then feed that text to a prompt enhancer or straight into the sampler's positive prompt.
  • Captioning a single image you just generated - wire the output of a sampler's VAE decode in and ask what's actually in it.
  • Asking questions - the prompt field is a real instruction, so "Describe the lighting and camera angle" works just as well as "Describe this image."

Because you're feeding an IMAGE, not a path, the node converts the tensor to a PIL image and writes it to a temp file before inference - the Qwen process_vision_info helper wants file paths, not tensors. You never see this; it just explains why there's a brief disk write per call.

The inputs that matter

Same model machinery as the batch version, so the same list of eleven Qwen-VL builds and the same caution: the 72B and 236B dropdown entries don't fit consumer cards - stick to the 2B, 3B, 4B, or 8B. Default is Qwen2.5-VL-7B-Instruct.

  • image - the IMAGE tensor to interrogate.
  • prompt - your instruction (default "Describe this image.").
  • min_pixels / max_pixels - bound the vision encoder's resolution (defaults ~448² and ~1000²). Lower max_pixels for speed, raise it for detail.
  • max_new_tokens - output length cap, default 2048.
  • temperature / seed - sampling controls; the node sets torch.manual_seed, so a fixed seed reproduces a run.

Output is a single text STRING. Nothing is saved to disk - if you want the caption as a .txt file you either use the batch node (which saves automatically) or add your own text-save node.

Installation

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

Restart after, or install via ComfyUI Manager by searching tk_comfyui_imageVL. The heavy dependencies (transformers>=4.45.0, qwen-vl-utils, accelerate, huggingface-hub) are what actually drive the model, so this node isn't a lightweight load.

Where people get burned

  • First run is a model download. The node pulls whatever model you selected into tk_comfyui_imageVL/models on first use - an 8B is several gigabytes and a few minutes.
  • VRAM. Same as the batch node: Qwen-VL Instruct carries assistant-style refusals, so explicit content gets dodged, and multi-subject frames get attributions wrong. If the job is NSFW natural-language captioning, JoyCaption is the better fit; if you need tags for an anime model, WD14.
  • One at a time. There's no batching here - looping it over many images is what the batch interrogator exists for.

For a quick, local, no-API answer to "what is in this image," it's the most useful single node in the pack. Just keep the model pick small and the expectations reasonable.

CategoryTK/QwenVL

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
model_idCOMBOQwen/Qwen2.5-VL-7B-Instruct11 options: Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen2.5-VL-3B-Instruct, Qwen/Qwen2.5-VL-72B-Instruct, Qwen/Qwen2-VL-7B-Instruct, Qwen/Qwen2-VL-2B-Instruct, Qwen/Qwen2-VL-72B-Instruct, +5
promptSTRINGDescribe this image.
max_new_tokensINT20481–8192
min_pixelsINT2007041024–99999999
max_pixelsINT10035201024–99999999
temperatureFLOAT0.700–1
seedINT00–18446744073709550000

Outputs (1)

NameTypeDescription
textSTRING