☁️Mini SD image prompt retractor
Turn a picture into an SD-style tag prompt
- image
- tags
The node's own display name calls itself a "retractor," which is a translation slip - it extracts, not retracts. What it actually does is hand an image to a vision-capable LLM and ask it to write back a comma-separated tag prompt describing what's in the picture, the format SD1.5/SDXL-family checkpoints and their tag-trained derivatives (Illustrious, Pony) actually expect. It's a fast way to reverse-engineer a prompt from a reference image, or to auto-caption a batch of training images for a LoRA.
It's one of comfyui_LLM_party's "mini-party" nodes - one call, one job, all configuration on the node itself, no separate loader or persona chain required.
How it works
You feed it an image, it calls out to a vision model, and tags comes back as a single SD-style tag string. There's a wrinkle worth knowing: this call goes over a text-based API, and most LLM APIs that accept images want a URL they can fetch, not a raw file. That's what the optional imgbb_api_key is for - the pack's README explicitly recommends the free imgbb image host for exactly this case, and setting that key here lets the node upload your image and get a reachable URL before it ever asks the model to look at it.
The inputs and outputs that matter
image- the picture to describe. Required.model_name(defaultgpt-4o-mini) - has to be a model that actually accepts image input;gpt-4o-minidoes. Swap in a text-only model and this stops working, not because the node is broken but because the model literally can't see the picture.imgbb_api_key(optional) - needed if your API provider requires an image URL rather than an inline upload; get a free one from imgbb.com.seed(default 42) - change it if you want a different phrasing of the same image's tags rather than the same result every run.base_url/api_key- standard OpenAI-format credentials, optional if set inconfig.ini.
One output: tags (STRING) - wire it into a CLIP Text Encode node to regenerate something in the same spirit as the reference, or into a Save Text node if you're building a caption file for training data.
How to install it
- ComfyUI Manager: search "comfyui_LLM_party", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, thenpip install -r requirements.txtfrom inside the pack folder using ComfyUI's own Python, then restart.
No local model or GPU cost of its own - it's a thin wrapper around an API call, doing the same conceptual job as one of the dedicated auto-tagger nodes floating around the ecosystem, except this one asks a real vision LLM instead of a purpose-built tagger.
Common issues & troubleshooting
Tags come back empty or the call fails outright. Check credentials first, same as every API node in this pack - an empty api_key with nothing set in config.ini fails before the model ever sees the image.
The output reads like a caption sentence instead of comma-separated tags. Some models default to natural-language description even when the surrounding instruction asks for tags. If that keeps happening with gpt-4o-mini, trying a stronger model in model_name usually fixes it.
Vision call fails with a model error. Double-check model_name actually supports image input on whatever base_url you're pointed at - not every OpenAI-compatible relay proxies vision models the same way it proxies plain chat, even when text-only calls through that same relay work fine.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_name | STRING | gpt-4o-mini | — |
| base_urlopt | STRING | — | |
| api_keyopt | STRING | — | |
| imgbb_api_keyopt | STRING | — | |
| is_enableopt | BOOLEAN | true | — |
| seedopt | INT | 42 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tags | STRING | — |