Nodes/SimpleSyrup/Tile & Tag SEGS
ComfyUI Node

Tile & Tag SEGS

Tile & Tag SEGS

By Artificial-Sweetener·Created 3 months ago·Updated 12 days ago· 2
Tile & Tag SEGS
  • image
  • clip
  • wd14_tagger
  • segs
  • positive
universal_positive
bbox_size872
crop_factor1.10
min_overlap16
filter_segs_dilation20
mask_irregularity0.00
irregular_mask_modeReuse fast
threshold0.35
character_threshold1.00
replace_underscoretrue
trailing_commafalse
exclude_tags1girl, solo, long_hair, short_hair, silhouette

The pain this solves is the annoying one: you're detailing a big image with a SEGS-based workflow, and every region needs its own prompt. If you've ever hand-written prompts for six tiles that turned out to contain things you couldn't see from the thumbnail, you know the feeling. Tile & Tag SEGS is the automation: it cuts your image into a deterministic grid of tile regions, runs a WD14 tagger over each crop, prefixes your shared positive text, and hands back the SEGS together with a matching conditioning batch. Each tile gets sampled with a prompt about what's actually in it.

It's a detailer input generator, not a sampler. You still do the actual refining with a SEGS detailer (SimpleSyrup's own scale-factor detailers, or Impact Pack's, since SEGS is the shared vocabulary here - that's the whole point of the format). This node just removes the "figure out what each region contains" step.

How it works

The node does four things in one pass. First, a tiler builds a deterministic scan-order grid of overlapping bounding boxes across your image. Second, it crops each region and feeds the crops through the connected WD14 tagger, which emits Danbooru-style tags at a confidence threshold. Third, it prefixes universal_positive to every generated tag string and CLIP-encodes each one. Fourth, it returns the tile SEGS and the conditioning batch in the same order, so the Nth SEG's prompt is the Nth conditioning entry. The plumbing that keeps them aligned is the pack's CONDITIONING_BATCH structure - same mechanism its [SEP] prompt batching and regional samplers use.

The inputs that matter

  • bbox_size - the target tile size in pixels (default 872). This is your resolution knob; smaller tiles mean more, smaller detail passes.
  • threshold vs character_threshold - the confidence cutoffs for general tags (default 0.35) and character tags (default 1.0). A character threshold of 1.0 is effectively "only keep character tags you're certain about," which makes sense for content tiles.
  • universal_positive - text prepended to every tile prompt, so your style anchor travels with the auto-tags.
  • exclude_tags - comma-separated tags stripped from the generated prompts. The default (1girl, solo, long_hair, short_hair, silhouette) is worth keeping an eye on: those are exactly the tags you don't want in a per-tile prompt.

The tile-geometry controls (crop_factor, min_overlap, filter_segs_dilation, and the mask_irregularity/irregular_mask_mode pair for organic, non-rectangular masks) are the fiddly ones you'll touch when tiles start showing seams or when rectangular masks cause visible region boundaries in the final composite.

Outputs and what they wire into

  • segs - the tile regions, usable by any Impact-compatible SEGS detailer.
  • positive - the aligned conditioning batch, matching the SEGS order. This is what you feed to a regional sampler or detailer instead of writing prompts by hand.

Installing it

SimpleSyrup installs as a whole pack. ComfyUI Manager: search SimpleSyrup under Node Pack and hit Install, then restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Artificial-Sweetener/SimpleSyrup.git
cd SimpleSyrup
# then install requirements with the Python that runs ComfyUI:
../venv/bin/python -m pip install -r requirements.txt

You also need a Load WD14 Tagger node in the graph feeding this one, and the tagger downloads its ONNX model from Hugging Face on first use - that's a few hundred MB the first time.

Common issues

The tags are Danbooru vocabulary, full stop. If your checkpoint is an Illustrious or NoobAI finetune this is a gift; if you're running a natural-language model like Flux, WD14's tag soup is a mismatch - the generated conditioning won't know what to do with it. And because this node leans on the tagger, it inherits the usual WD14 load: the model download is a real network dependency, and a first run that looks hung is often just the tagger still downloading. Keep character_threshold where you want content tags included; at the default it's basically off, so tiles get only confident general tags plus your universal positive.

CategorySimpleSyrup/Detailing

Inputs (15)

NameTypeDefaultDescription
imageIMAGEImage to split into tile SEGS for tagging or downstream workflows.
clipCLIPCLIP model used to encode each generated tile prompt.
wd14_taggerWD14_TAGGERWD14 tagger that reads each tile crop and suggests prompt tags.
universal_positiveSTRINGPositive prompt text added before every generated tile tag prompt.
bbox_sizeINT87264–4096Target tile box size in pixels.
crop_factorFLOAT1.101–10Tile crop expansion. Larger values include more surrounding context for tags.
min_overlapINT160–512Minimum pixel overlap between tile regions. Higher values reduce gaps but repeat more image area.
filter_segs_dilationINT20-255–255Grow or shrink tile masks before filtering. Positive values expand masks; negative values contract them.
mask_irregularityFLOAT0.000–1Organic variation added to tile masks. Higher values make masks less rectangular.
irregular_mask_modeCOMBOReuse fastHow irregular masks are generated. Reuse is steadier; random varies each tile; quality modes do more work.
thresholdFLOAT0.350–1Minimum WD14 confidence for general tags. Higher values keep fewer, more certain tags.
character_thresholdFLOAT1.000–1Minimum WD14 confidence for character tags. Higher values keep fewer, more certain character tags.
replace_underscoreBOOLEANtrueReplace underscores with spaces so generated tags read more naturally.
trailing_commaBOOLEANfalseAdd a comma after generated tag text for easier prompt composition.
exclude_tagsSTRING1girl, solo, long_hair, short_hair, silhouetteComma-separated tags removed from generated tile prompts.

Outputs (2)

NameTypeDescription
segsSEGSGenerated tile SEGS in the same order as the conditioning batch.
positiveCONDITIONING_BATCHPositive conditioning from WD14 tile tags, matched to SEGS order.