Nodes/ComfyUI-Replicate/Replicate lucataco/qwen-vl-chat
ComfyUI Node

Replicate lucataco/qwen-vl-chat

Alibaba's VLM, strong on text-in-image

By replicate·Created 2 years ago·Updated 2 years ago· 207
Replicate lucataco/qwen-vl-chat
  • image
  • STRING
promptWhat is the name of the movie in the poster?
force_rerunfalse

Qwen-VL-Chat is Alibaba's chat-tuned vision-language model, and its reputation was built on one specific strength: reading text inside images. Posters, screenshots, signage, documents - Qwen-VL was one of the earlier open VLMs that could actually parse dense text and layout instead of just describing "an image with some writing on it." lucataco - a prolific packager of open models onto Replicate - put this one up as a hosted API, and this node calls it.

The default prompt on the node hints at exactly that use case: "What is the name of the movie in the poster?" - a text-reading question, not a generic "describe this" caption. If your job involves getting specific information out of an image rather than a general description, this is the node in the batch built for it.

How it works

Qwen-VL-Chat pairs a vision encoder with a chat-tuned language model, and unlike a plain captioner it's trained to hold something closer to a conversation - answering direct questions, following instructions about what to look at, and (in its original release) even grounding answers to specific regions of the image. The ComfyUI node exposes the simple text-in-text-out interface: you send an image and a question, Replicate runs the model, you get a STRING back.

The inputs and outputs that matter

  • image (required) - the picture to read or question.
  • prompt (default the movie-poster question above) - replace it with your own question. Being specific gets you better answers than a vague one: "what does the sign say?" beats "what's in this image?" if text is what you're after.

force_rerun skips the cache for a fresh call. Output is one STRING - feed it into a text node or downstream prompt input. Note there's no conversation-history input on this node, so each call is single-turn: it doesn't remember a previous question in the same run.

How to install it

One install covers every Replicate node in this pack.

  • ComfyUI Manager: search ComfyUI-Replicate, install, restart.
  • Manual:
    cd ComfyUI/custom_nodes
    git clone https://github.com/replicate/comfyui-replicate
    cd comfyui-replicate
    pip install -r requirements.txt
    
    then restart.

No local model download - this runs on Replicate's infrastructure. Set REPLICATE_API_TOKEN before you launch ComfyUI (get one at replicate.com/account/api-tokens); without it the node has nothing to authenticate with.

Common issues & troubleshooting

Auth error on first run. The token isn't set in the environment ComfyUI actually launched from. This is the single most common failure across every node in this pack - worth double-checking with a quick curl against https://api.replicate.com/v1/account with your token to confirm it's valid before blaming the node. On the portable Windows build, a token set as a global Windows environment variable specifically has been reported not to get picked up automatically - set it in the launch .bat if that happens to you.

It read the text wrong, or missed part of it. OCR-style reading is Qwen-VL's strong suit but it's not perfect, especially on small, stylized, or low-contrast text. Crop tighter to the text region before feeding it in if accuracy matters.

Answer feels generic instead of specific. Sharpen the question. This model does better with a pointed ask ("what is the price on the tag?") than an open-ended one.

Same answer on identical inputs. That's Replicate's cache, not the node misbehaving. Change the prompt or flip force_rerun.

Response is slow. Normal - it's a live API round trip, and the first call after idle time can carry a cold-start delay on top of that.

CategoryReplicate

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
promptoptSTRINGWhat is the name of the movie in the poster?
force_rerunoptBOOLEANfalse

Outputs (1)

NameTypeDescription
STRINGSTRING