Nodes/SimpleSyrup/Concept Attention SEGS
ComfyUI Node

Concept Attention SEGS

Detector-free regions for whatever your prompt says

By Artificial-Sweetener·Created 4 months ago·Updated 2 days ago· 2
Concept Attention SEGS
  • image
  • image
  • segs
  • mask
conceptssubject
sampler_stage1
capture_start0.00
capture_end1.00
minimum_strength0.15
minimum_consensus0.25
geometry_recall0.85
split_sensitivity0.00
instance_recall0.65
minimum_region_size512
keep_only1
keep_bylargest size
combine_segsfalse
matte_solidity0.75
edge_feather8
capture_profilefast
evidence_modeconcept isolation

Every object detector has the same blind spot: it only knows the categories it was trained on. GroundingDINO knows "cat," YOLO knows "face," but neither knows "pink hair," "the older sister," or "the figure on the left" - concepts that only exist in your prompt. This node sidesteps detection entirely. It reads where the diffusion model itself was looking while it generated, and hands those regions back as SEGS. Your prompt becomes the detector, which means it can find anything you could describe well enough for the model to render.

How it works

Connect the image that came out of a sampler, tell it the concepts with concepts (girl | pink hair | cat is literally the shape the tooltip suggests - separate multiple concepts with |), and it traces the graph back to the sampler that produced the image. That sampler's model was quietly recording cross-attention the whole time it denoised (see Attention Capture Model for the internal plumbing). The node pulls the recorded evidence for your concepts, thresholds it, and reconstructs labeled, soft regions.

Outputs: the image passes through unchanged, segs is the labeled SEGS list (one or more instances per concept), and mask is the union of everything retained. Because the regions come from attention rather than a bounding-box model, they're soft and overlapping by nature - matted with edge_feather and matte_solidity defaults that keep them usable rather than raw heatmaps.

The knobs beginners actually touch

The control stack is shared across SimpleSyrup's whole attention family, so most of it you'll never open. The ones that matter for results:

  • concepts - the whole point of this node. Be precise; the concept should match wording the positive prompt used, or the attention isn't there to find.
  • sampler_stage - which sampler in the chain to read (1 first, 2 second, 0/-1 last). Default 1 is right for a normal first-pass setup.
  • minimum_strength - how tight the silhouette is. Higher narrows each region toward the concept's semantic core and sheds halo.
  • keep_only / keep_by - keep the best N instances per concept (default 1, ranked by largest size) instead of every scattered instance. Raise it if a concept has multiple separate occurrences you want as distinct SEGS.

The long tail (capture_start/capture_end, minimum_consensus, geometry_recall, split_sensitivity, instance_recall, minimum_region_size, combine_segs, capture_profile, evidence_mode) is real but defaulted sanely. capture_profile is the one overhead trade worth knowing: fast is the default, exhaustive records every eligible attention call and costs time.

Why SEGS, and what to do with them

SEGS is the Impact Pack's container for "a set of detected regions," and the whole point of SimpleSyrup adopting it is that these regions drop straight into Impact-compatible machinery - a Detailer that crops, re-renders at proper resolution, and pastes back, or the pack's own Simple Preview SEGS, Batch SEGS, and regional samplers. So where you'd normally put a YOLO or GroundingDINO detector in front of a detailer, you can put this instead, and suddenly the thing being detailed is "the red dress" rather than "person number two." It pairs especially well with the region-to-prompt workflow: regions here come from prompt concepts, so the per-region prompt for a second pass practically writes itself.

Gotchas

It's attention, not geometry. A concept the first pass rendered weakly gives a weak, wobbly region - garbage in, garbage out, only the "garbage" is the model's own uncertainty. A concept absent from the prompt returns an empty SEGS set, silently. And the provenance rule applies hard here: the image must trace back to the sampler in the same workflow with nothing editing it in between, or the node has nothing recorded to read. This is a complement to bbox detectors, not a replacement for them - if you need a tight, reliable face box for a high-detailer pass, YOLO is still the right tool; if you need "wherever the lantern is," this is.

Install SimpleSyrup once (Manager search SimpleSyrup, or clone into custom_nodes and install requirements.txt). No detector model downloads are needed for this node - that's the point.

CategorySimpleSyrup/Detection

Inputs (18)

NameTypeDefaultDescription
imageIMAGEImage whose graph provenance identifies the sampling chain; the image is returned unchanged.
conceptsSTRINGsubjectEnter one or more concepts separated by |, such as girl | pink hair | cat.
sampler_stageINT1-1–1024Selects the connected sampling stage: 1 is first, 2 is second, and 0 or -1 selects the last; oversized values use the last.
capture_startFLOAT0.000–0.99Start of denoising evidence to include; later values ignore more of the initial composition phase.
capture_endFLOAT1.000.01–1End of denoising evidence to include; earlier values ignore more late refinement attention.
minimum_strengthFLOAT0.150–1Minimum normalized attention association retained in a region; higher values narrow the silhouette toward its semantic core.
minimum_consensusFLOAT0.250–1Fraction of selected observations that must support a pixel; higher values keep more persistent regions.
geometry_recallFLOAT0.850–1Higher values recover fainter connected object extent from exact attention, preserving tails and shafts but admitting more halos.
split_sensitivityFLOAT0.000–1Sensitivity to divide one connected region around separate peaks; higher values can split a soft silhouette into multiple instances.
instance_recallFLOAT0.650–1Higher values retain weaker disconnected instances relative to the strongest one, which helps repeated sparse concepts.
minimum_region_sizeINT5121–1048576Discard attention components smaller than this many pixels.
keep_onlyINT10–1024Keep the best N instances per concept; 1 keeps the largest and 0 keeps all.
keep_byCOMBOlargest sizeRanks retained instances by area or attention confidence.
combine_segsBOOLEANfalseCombines retained instances of each concept into one SEG.
matte_solidityFLOAT0.750–1Higher values flatten accepted interiors toward fully opaque alpha.
edge_featherINT80–4096Width in output pixels of the matte boundary transition.
capture_profileCOMBOfastControls observation density: fast minimizes overhead, balanced adds temporal evidence, and exhaustive retains every eligible call.
evidence_modeCOMBOconcept isolationConcept isolation derives a cleaner stable region; raw attention shows the captured model probabilities without isolation weighting.

Outputs (3)

NameTypeDescription
imageIMAGEUnchanged connected image.
segsSEGSLabeled attention-derived instances for the concepts.
maskMASKUnion of all retained concept instances.