Tag SEGS w/ External LLM
A vision model that writes a regional prompt for every crop
- image
- segs
- clip
- segs
- positive
WD14 tags are great if you're on an anime checkpoint and your crops are things with Danbooru vocabulary. For everything else - photoreal scenes, objects, "describe what's actually in this crop" - a tag vocabulary is the wrong tool. SimpleSyrup.TagSEGSWithExternalLLM is the general-purpose alternative: it sends each SEG crop to a vision-capable LLM through an OpenAI-compatible endpoint, gets back a natural-language description, and encodes it into per-region conditioning matched to your SEGS order. If WD14 is the regional tagger for booru models, this is the regional captioner for everything else.
The mechanism: for each SEG, it crops the region from the source image, shows the vision model that crop (with pixels outside the mask handled per seg_image_mode, default showing them as a transparent mask so the model sees the object in context), and sends it along with your user_prompt. The model's reply becomes the region's prompt, universal_positive text gets prepended, and the whole thing is CLIP-encoded with your connected clip into the positive conditioning batch - aligned with the segs that come out on the matching output. The system_prompt is your chance to steer how it writes ("describe only clothing," "output comma-separated tags," etc.).
Before anything works, you have to configure the provider. SimpleSyrup has two ComfyUI settings: "External LLM endpoint" (the OpenAI-compatible base URL) and "External LLM API key" (stored in your OS credential storage via the keyring dependency - a nice touch, the key isn't sitting in your workflow JSON). Save both and the model dropdown populates with the provider's models. That dropdown's default - "Configure external LLM endpoint" - is the node's way of telling you you haven't done the setup yet. The model you pick needs vision support; a text-only model will fail the moment it's handed an image.
Inputs worth your attention:
system_prompt/user_prompt- the two halves of your instruction. Empty by default, and empty means you get whatever the model feels like, so write these.max_tokens(default 1024) - caps reply length; higher costs more per call.reasoning_effort- defaultdefaultomits provider-specific reasoning controls;offexplicitly disables thinking for providers that support it through chat-template options. If your provider charges more for reasoning tokens,offis probably right for a tagging job.replace_underscore,trailing_comma,exclude_tags- the same output-shaping trio as the WD14 node, because whatever the model writes still has to survive CLIP encoding cleanly.
Outputs: segs and positive. Same contract as the WD14 sibling - regions and their conditioning travel together into regional samplers.
The honest economics: this is a paid, networked node. Every region is an API call, so a 40-region image is 40 billed calls, and the VLM weakness this space knows well - multi-subject attribution - applies to crops too. It's for when WD14's vocabulary genuinely can't describe what you're detailing, and the cost is the price of that. Also worth knowing: this category has a documented malware history in ComfyUI (the LLMVISION incident), so the author storing keys in OS keyring and using your own configured endpoint is the safe shape - but it's still an LLM node that reaches the network, so use an endpoint you control and a provider you trust.
Install: the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Artificial-Sweetener/SimpleSyrup
cd SimpleSyrup && pip install -r requirements.txt
or ComfyUI Manager → search SimpleSyrup → Install → restart, with a current ComfyUI (v3 extension API). No model downloads (the LLM lives on the provider's side). If model shows only the configure placeholder, the endpoint or key setting didn't save - recheck Settings → SimpleSyrup and make sure you saved after entering them.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Source image that the incoming SEGS were detected from. | |
| segs | SEGS | Existing SEGS to describe and keep aligned with the conditioning batch. | |
| clip | CLIP | CLIP model used to encode each generated regional prompt. | |
| model | COMBO | Configure external LLM endpoint | External vision model used to describe each SEG crop. |
| system_prompt | STRING | Instruction text that controls how the model writes regional tags. | |
| user_prompt | STRING | Per-region request sent with each SEG crop image. | |
| universal_positive | STRING | Positive prompt text added before every generated regional prompt. | |
| seg_image_mode | COMBO | transparent mask | How pixels outside each SEG mask are shown to the vision model. |
| replace_underscore | BOOLEAN | true | Replace underscores in generated tags before CLIP encoding. |
| trailing_comma | BOOLEAN | false | Add a final comma to each generated regional prompt. |
| exclude_tags | STRING | Comma-separated exact tags removed from generated regional prompts. | |
| max_tokens | INT | 10241–32768 | Maximum number of response tokens the external model may generate. Higher values allow longer replies but can take longer and cost more. |
| reasoning_effort | COMBO | default | Reasoning behavior for compatible providers. Default omits provider-specific controls; off sends thinking disabled through chat template options. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| segs | SEGS | Original SEGS returned in the same order as the conditioning batch. |
| positive | CONDITIONING_BATCH | Positive conditioning from external LLM tags, matched to SEGS order. |