Replicate openai/gpt-5
GPT-5 as your caption writer, no OpenAI account required
- IMAGE_1
- IMAGE_2
- IMAGE_3
- IMAGE_4
- IMAGE_5
- text
- API_JSON
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_1throughIMAGE_5- up to five images in, one caption out.reasoning_effort-minimal,low,medium, orhigh. Defaultminimalis 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_runis off (it returns mock output on purpose), then confirm the images are actually wired in. The node drops unset optionals, so a missingIMAGE_xjust means the model saw less. - Caption too short / too long - that's
verbosityandreasoning_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_runvalidates 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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| dry_run | BOOLEAN | false | β |
| force_rerun | BOOLEAN | false | β |
| promptopt | STRING | β | |
| system_promptopt | STRING | β | |
| messagesopt | STRING | β | |
| IMAGE_1opt | IMAGE | β | |
| IMAGE_2opt | IMAGE | β | |
| IMAGE_3opt | IMAGE | β | |
| IMAGE_4opt | IMAGE | β | |
| IMAGE_5opt | IMAGE | β | |
| reasoning_effortopt | COMBO | minimal | 4 options: minimal, low, medium, high |
| verbosityopt | COMBO | medium | 3 options: low, medium, high |
| max_completion_tokensopt | INT | 0 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |
| API_JSON | STRING | β |