APNext GPT Custom Vision
Custom image analysis with GPT, your prompt your rules
- images
- output
- clip_l
- faded_image
GptCustomVision is the OpenAI flavor of dagthomas's custom vision nodes: hand it one or more images and your own analysis prompt, and GPT looks at the picture and answers however you told it to. Where a plain captioner gives you one fixed style of description, "custom" is the point here - you write the instruction, so you can get tag-style output, a scene breakdown, a style clone, or a LoRA caption, all from the same node. If you already live in the OpenAI ecosystem and have a key, this is your image-to-prompt workhorse.
It exists because this is genuinely one of the most-wanted ComfyUI workflows: load an image, give a short steer, get a detailed prompt back for image-to-image or video. Pick this node over the Gemini or Claude versions purely on which API you're set up to pay for - the capability is similar, the bill goes to a different vendor.
How it works
The node encodes your images, fills your custom_prompt with any dynamic tokens if enabled, sends both to a GPT vision model, and returns the text. Its standout feature is dynamic prompting: turn on dynamic_prompt and the tokens ##TAG##, ##SEX##, ##WORDS## and ##PRONOUNS## in your instruction get replaced by the tag, sex, words and pronouns inputs - which is exactly how you build a reusable LoRA-captioning template that always refers to "ohwx man / him, his / 100 words" without editing the prompt each time. If you pass multiple images, fade_percentage blends them and also outputs the blended frame.
The inputs and outputs that matter
images- the image(s) to analyze.custom_prompt- your instruction to GPT. This is the whole node; write it well. Pair it with theCustomPromptLoaderto pull a saved template instead of retyping.gpt_model- the model dropdown (GPT-5 and GPT-4.1 families, including-miniand-nano).gpt-4.1-miniis the cost-sane default; the full models cost more per call for marginal caption gains.dynamic_prompt+tag/sex/words/pronouns- the template-substitution system for LoRA-style captioning.additive_prompt- extra text appended to the instruction.
Three outputs: output (GPT's full text), clip_l (a trimmed variant sized for a CLIP-L text slot), and faded_image (the blended composite when you feed multiple images).
How to install it
ComfyUI Manager: search comfyui_dagthomas, install, restart. Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas && pip install -r requirements.txt
then restart. Needs the openai library (in requirements.txt) and a key. Set OPENAI_API_KEY in the environment before launching ComfyUI.
Where people get burned
- Empty
custom_prompt= nothing useful. Unlike a fixed captioner, this node does what you tell it. No instruction, no coherent output. Start from aCustomPromptLoadertemplate if you're not sure what to write. - Key set after launch. Export
OPENAI_API_KEYbefore starting ComfyUI; it's read at startup. - Hosted ComfyUI blocks it. Outbound API calls and custom env vars usually aren't available on serverless instances - use a local vision node there instead.
- Dynamic tokens need the toggle.
##TAG##stays literal unlessdynamic_promptis on. If your captions come out with##TAG##in them, that's the switch. - Model names drift. The dropdown may list models your key can't call yet; that throws a runtime API error. The list is editable JSON (
data/gpt_models.json) - prune it to what you can actually access.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| custom_prompt | STRING | — | |
| additive_prompt | STRING | — | |
| dynamic_prompt | BOOLEAN | false | — |
| tag | STRING | ohwx man | — |
| sex | STRING | male | — |
| words | STRING | 100 | — |
| pronouns | STRING | him, his | — |
| fade_percentage | FLOAT | 15.00.1–50 | — |
| gpt_model | COMBO | 6 options: gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| output | STRING | — |
| clip_l | STRING | — |
| faded_image | IMAGE | — |