Nodes/ComfyUI_Fill-Nodes/FL Simple GPT Vision
ComfyUI Node

FL Simple GPT Vision

One image in, one GPT-4 Vision caption out

By filliptm·Created 3 years ago·Updated about 15 hours ago· 628
FL Simple GPT Vision
  • image
  • STRING
model
system_promptYou are a helpful assistant that describes images accurately and concisely.
request_promptDescribe this image in detail.
max_tokens300
temperature0.7
detail

Fill-Nodes has a whole GPT section - batch captioners, DALL-E generation, an image-editing node, a plain text-completion node - and FL_SimpleGPTVision is the stripped-down one of the bunch: one image, one caption, no batching, no directory scanning, no auto-save. If FL_GPT_Vision is the production captioning pipeline, this is the "just tell me what's in this picture" version.

How it works

It sends a single image to OpenAI's GPT-4 Vision-capable models along with a system prompt and a request prompt, and hands back the model's text response as a plain string. There's built-in rate-limit handling - if OpenAI throttles the request, it retries with exponential backoff instead of just failing outright, which matters more than it sounds like the first time you're hammering this node in a loop.

Worth noting: unlike FL_RunwayImageAPI or FL_VertexGemini25FlashImage elsewhere in this pack, there's no api_key field on this node at all. The pack's other OpenAI-backed nodes (FL_GPT_Text, FL_GPT_Vision) fall back to the OPENAI_API_KEY environment variable when no key is passed in - since this one has no key input whatsoever, that environment variable is presumably the only way it authenticates. Set it before you launch ComfyUI, or this node has no way to talk to OpenAI at all.

The inputs and outputs that matter

  • image - the single image to describe.
  • model - gpt-4o-mini, gpt-4o, or gpt-4-vision-preview. gpt-4o-mini is the cheap, fast default choice for straightforward captioning; reach for gpt-4o when you need more careful or nuanced descriptions.
  • system_prompt (default "You are a helpful assistant that describes images accurately and concisely.") and request_prompt (default "Describe this image in detail.") - the two you'll actually rewrite. Change request_prompt to steer what kind of description you want - a short alt-text line versus a dense training caption are very different asks, and this is where you make that distinction.
  • max_tokens (default 300) - caps response length; raise it if your captions are getting cut off mid-sentence.
  • temperature (default 0.7) - lower it toward 0 for consistent, literal descriptions; raise it if you want more varied phrasing across runs.
  • detail (auto / low / high) - OpenAI's own image-detail setting, trading resolution/cost for how much fine detail the model actually looks at. low is cheap and fast but can miss small details; high costs more tokens but reads the image more carefully.

Output is a single STRING - the caption text, ready to feed into a prompt builder, a save node, or straight into your positive conditioning.

How to install it

ComfyUI Manager: search "Fill-Nodes", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt

This pulls in the OpenAI Python SDK along with everything else Fill-Nodes needs - it's a big pack for one small node, so don't be alarmed by the size of the install for what looks like a simple captioner.

Common issues & troubleshooting

Node errors immediately with an auth failure. OPENAI_API_KEY isn't set in the environment ComfyUI is actually running in - setting it in your shell after ComfyUI's already launched won't help; export it before starting the server (or set it in whatever process manager/Docker env you use).

Getting rate-limited constantly. The built-in retry/backoff handles transient throttling, but if you're batching this node in a loop against a low-tier OpenAI account, you'll still eventually hit a wall the retries can't paper over - space out requests or upgrade your API tier.

Caption is generic or misses the point of the image. Rewrite request_prompt to be specific about what you want ("describe the lighting and composition," "write a single-sentence alt-text," "list visible objects only") - the defaults are intentionally generic starting points, not the ceiling of what this node can produce.

Category🏵️Fill Nodes/GPT

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
modelCOMBO3 options: gpt-4o-mini, gpt-4o, gpt-4-vision-preview
system_promptSTRINGYou are a helpful assistant that describes images accurately and concisely.
request_promptSTRINGDescribe this image in detail.
max_tokensINT3001–4096
temperatureFLOAT0.70–2
detailCOMBO3 options: auto, low, high

Outputs (1)

NameTypeDescription
STRINGSTRING