Nodes/ComfyUI-API-DockerCPU/Replicate openai/gpt-5
ComfyUI Node

Replicate openai/gpt-5

GPT-5 as your caption writer, no OpenAI account required

By trustypangolinΒ·Created 5 months agoΒ·Updated about a month agoΒ· 0
Replicate openai/gpt-5
  • IMAGE_1
  • IMAGE_2
  • IMAGE_3
  • IMAGE_4
  • IMAGE_5
  • text
  • API_JSON
β—„dry_runfalseβ–Ί
β—„force_rerunfalseβ–Ί
β—„promptβ–Ί
β—„system_promptβ–Ί
β—„messagesβ–Ί
β—„reasoning_effortminimalβ–Ί
β—„verbositymediumβ–Ί
β—„max_completion_tokens0β–Ί

Every ComfyUI user eventually hits the captioning wall. You've collected 500 images for a LoRA or a dataset, and the quality of your training captions decides more than any hyperparameter does - which is why the community's LoRA guides hammer on captioning as the highest-impact step. The Replicate openai/gpt-5 node from the ComfyUI-API-DockerCPU pack is the version of that job where GPT-5 does the writing, you never touch the OpenAI API directly, and your GPU isn't involved at all.

This is a vision-in, text-out node. You feed it up to five images, it looks at them with GPT-5's multimodal eyes, and returns a text string. The pack's own framing calls it "image-to-text generation for image training captions," which is the real use case: a captioning stage inside a dataset-prep workflow that ends in a LoRA trainer. People are absolutely doing this - GPT-5-driven captioning is showing up in training write-ups as the step that fixes the "meh captions" problem.

How it works

Schema-driven, same as every node in this pack. Your images get base64-encoded and sent as a Replicate prediction against openai/gpt-5; the model's text reply comes back as the text output, alongside API_JSON (the payload that went out). Notably, there is no required prompt - the only required inputs are the pack's shared dry_run and force_rerun booleans. That's deliberate: the fields are all optional so you can drive it however the job needs.

The inputs that matter:

  • prompt - your instruction to the model ("Write a detailed training caption for this image. Describe the subject, outfit, lighting, and composition."). This is the field you'll actually tune.
  • system_prompt - sets the assistant's behavior for the whole call. Great for enforcing a captioning style across a batch.
  • IMAGE_1 through IMAGE_5 - up to five images in, one caption out.
  • reasoning_effort - minimal, low, medium, or high. Default minimal is the sensible start for captioning: fast, cheap, and captions rarely need a model to think for a minute. Raise it only if the descriptions come out too shallow.
  • verbosity - low / medium / high. Pairs with reasoning: short captions for style LoRAs, verbose ones for detailed character work.
  • messages - a JSON string of a full message list if you want to run a multi-turn conversation instead of the simple prompt path. Ignore it for captioning; it's there for chat-style use.
  • max_completion_tokens - default 0. If you hit truncation on long captions, raise it.

Install

ComfyUI Manager (search "ComfyUI-API-DockerCPU") or:

cd ComfyUI/custom_nodes
git clone https://github.com/trustypangolin/ComfyUI-API-DockerCPU
cd ComfyUI-API-DockerCPU && pip install -r requirements.txt
export REPLICATE_API_TOKEN="your_token_here"

Restart ComfyUI. It lands under 🎨 DockerCPU API/🎨 Replicate. No model files, no OpenAI key - the REPLICATE_API_TOKEN is the only credential.

Troubleshooting

  • Captions come back empty - check dry_run is off (it returns mock output on purpose), then confirm the images are actually wired in. The node drops unset optionals, so a missing IMAGE_x just means the model saw less.
  • Caption too short / too long - that's verbosity and reasoning_effort, in that order. Don't reach for a bigger prompt first.
  • Truncated captions - raise max_completion_tokens. Higher reasoning efforts need more headroom, per the schema's own warning.
  • It costs money - every call is a billed Replicate prediction. For big datasets that adds up fast; consider batching and review before you caption 10,000 images. dry_run validates wiring free.
  • Young pack - April 2026, zero stars. The node works, but you're early. The alternative official route is Replicate's own ComfyUI pack, if you'd rather trust a vendor-maintained integration.

One caveat on expectations: GPT-5 captioning is genuinely good, but the community still swears by JoyCaption or hand-captioning for small high-stakes sets. Use this node when you want LLM-grade captions in-graph without standing up a local vision model - it's the right tool for that, and nothing else in the pack does it.

Category🎨 DockerCPU API/🎨 Replicate

Inputs (13)

NameTypeDefaultDescription
dry_runBOOLEANfalseβ€”
force_rerunBOOLEANfalseβ€”
promptoptSTRINGβ€”
system_promptoptSTRINGβ€”
messagesoptSTRINGβ€”
IMAGE_1optIMAGEβ€”
IMAGE_2optIMAGEβ€”
IMAGE_3optIMAGEβ€”
IMAGE_4optIMAGEβ€”
IMAGE_5optIMAGEβ€”
reasoning_effortoptCOMBOminimal4 options: minimal, low, medium, high
verbosityoptCOMBOmedium3 options: low, medium, high
max_completion_tokensoptINT0β€”

Outputs (2)

NameTypeDescription
textSTRINGβ€”
API_JSONSTRINGβ€”