Image to Multi-Language Prompt (OpenAI API)
The node that turns any image into three prompts — and runs zero models itself
- image
- en_prompt
- zh_tw_prompt
- zh_cn_prompt
The name sells it short. ImageToMultiPrompt isn't a vision model - it's a thin client for one. You drop in an image, it phones any OpenAI-compatible vision endpoint, and comes back with three prompts: English for generating, plus Traditional and Simplified Chinese so you can check whether it saw what you saw. No local model, no giant weights, no GPU load - the pack's entire runtime dependency is a single requests line.
You'll notice that fast, because the default api_url is http://192.168.1.9:8000/v1 - that's the author's LAN server baked into the default. The first thing you do with this node is replace it with your own endpoint.
Why you'd reach for it
The old way to reverse-engineer an image into a prompt is a wd14 tagger or CLIP interrogator: fast, local, and it hands you a comma-separated tag list that suits anime SDXL models. That's still the right tool for Illustrious-style tag prompting. But narrative-flavored, LLM-encoded models like Z-Image want flowing natural-language descriptions, not tag spam. This node covers both camps: its system_prompt_selector ships 13 templates, and which one you pick changes the output style completely. sd_style spits out comma-separated descriptive keywords. midjourney gives you aesthetic keyword soup with lens and lighting calls. nano_banana and z_image_turbo return rich narrative prose. Same endpoint, different persona.
How it works
Grounded in the source, this is the whole pipeline: the node takes the first frame of your input image (image[0]), converts the tensor to a PIL image, and encodes it as a base64 JPEG. It loads your chosen system prompt from a .md file in the pack's prompt/ folder, then POSTs to {api_url}/chat/completions with the image embedded as a data:image/jpeg;base64,... URI in the message content. The instruction to the model is strict: reply with a pure JSON object containing en, zh_tw, and zh_cn keys, no markdown fences. The node strips stray code-fence wrappers, parses the JSON, and returns three strings - all within a 30-second timeout, no retries.
The inputs that matter
Most fields you can leave alone, but these three decide whether it works at all:
- api_url - must end in
/v1; the node appends/chat/completionsitself. Point it at LM Studio (http://127.0.0.1:1234/v1), Ollama, vLLM, or any cloud OpenAI-compatible server. - model_name - this has to be a vision model (GPT-4o, Qwen-VL, LLaVA, Gemma vision). A text-only model gets a base64 image it can't see and will either hallucinate or error.
- system_prompt_selector - the dropdown of templates; pick
Customand fillcustom_system_promptif you want your own instructions.
api_key defaults to apikey, which most local servers ignore. temperature (0–2), max_tokens (1–8192), and seed pass through to the API as-is - the seed is genuinely forwarded, so reproducible results are possible if your endpoint honors it.
Outputs
- en_prompt - wire this into your CLIP Text Encode (or the Qwen/T5 encoder your target model uses) as the positive prompt.
- zh_tw_prompt / zh_cn_prompt - connect both to a Show Text node to review what the model understood before you generate. Trust nothing until you've read these.
Installing
Via ComfyUI Manager, search "ComfyUI-ImagePrompt" and install, or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/JetterTW/ComfyUI-ImagePrompt
cd ComfyUI-ImagePrompt
pip install -r requirements.txt
Then restart ComfyUI. That's it - requirements.txt is just requests>=2.31.0, so there are no model downloads or torch-weight surprises. The model lives on whatever endpoint you point at, not on your machine.
Where people get burned
The default URL points at the author's private server, and it fails the moment you try it - change it or nothing works. Use a text-only model and the JSON comes back empty or the call errors. The JPEG is encoded at full resolution, so a 2048px image becomes a multi-megabyte base64 blob; slow local VLMs can blow past that 30-second timeout. Downscale the image before it hits this node if your endpoint is sluggish.
And the privacy note, since "local and private" is the README's selling point: private only if your endpoint is local - the node ships your image to whatever URL you type. Given the ComfyUI LLM-vision malware history in this ecosystem, it's worth appreciating that this pack's entire runtime is one requests call - the attack surface is tiny, but the habit of checking what you install is worth keeping. When the call does fail, the node returns Error: ... strings as all three outputs rather than breaking your graph - handy for debugging, but wire a Show Text in and read them before they end up inside your prompt.
If you're on the tag-list side of things and just want fast local tags, a wd14 tagger is cheaper than spinning up a VLM. If you want narrative prompts for an LLM-encoded model, this is a clean, dependency-light way to get there - just don't forget to change that default URL first.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| api_url | STRING | http://192.168.1.9:8000/v1 | — |
| model_name | STRING | GPT-4o | — |
| api_key | STRING | apikey | — |
| system_prompt_selector | COMBO | 13 options: nano_banana, midjourney_nsfw_raw, midjourney, z_image_turbo, z_image_turbo_nsfw, midjourney_nsfw, +7 | |
| custom_system_prompt | STRING | Describe this image in detail. | — |
| max_tokens | INT | 20481–8192 | — |
| temperature | FLOAT | 0.700–2 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| en_prompt | STRING | — |
| zh_tw_prompt | STRING | — |
| zh_cn_prompt | STRING | — |