Nodes/SimpleSyrup/All Prompt Attention SEGS
ComfyUI Node

All Prompt Attention SEGS

Every concept the model saw, handed back as SEGS — no typing required

By Artificial-Sweetener·Created 4 months ago·Updated 2 days ago· 2
All Prompt Attention SEGS
  • image
  • image
  • segs
  • mask
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_moderaw attention

Its sibling Concept Attention SEGS makes you type which concepts you care about (girl | pink hair | cat). This node removes the typing. Point it at the image that came out of a sampler and it reads the positive prompt's mapped tokens, then returns separate, overlapping soft SEGS for every concept the model actually attended to while generating. If you've ever stared at a generation and wondered which words were doing the work - or wanted regions for every subject without enumerating them - this is the discovery tool.

How it differs from Concept Attention SEGS

Both are SimpleSyrup's attention-capture nodes: they read cross-attention recorded during sampling, trace the graph back to the sampler that made the image, and turn attention into labeled SEGS. The differences are what make each worth having:

  • No concepts input. The concept list comes from the positive conditioning's mapped tokens automatically. There is genuinely no concepts field on this node - look at the schema and you won't find one.
  • evidence_mode defaults to raw attention. Concept Attention SEGS defaults to "concept isolation," which applies weighting to derive a cleaner stable region. Here you see the captured model probabilities more directly, which is better for understanding what the model was doing and worse if you want tidy silhouettes. Switch it to concept isolation when a region is headed into real downstream work.
  • The output list is as big as your prompt. Every mapped concept gets its own SEGS, overlapping where concepts overlapped in the model's attention.

The three outputs, and the controls that tame them

  • image passes through unchanged.
  • segs is the list - one labeled entry per concept instance.
  • mask is the soft union of every retained region.

Since "every concept" can be a crowd on a busy prompt, the controls that matter here are the pruning ones. keep_only (default 1) keeps the best N instances per concept, ranked by keep_by (default largest size, or attention confidence if you prefer). minimum_region_size discards attention components under 512 pixels by default - raise it when you're drowning in specks. combine_segs merges all retained instances of each concept into a single SEG. sampler_stage picks which sampler in the chain you're reading, and capture_start/capture_end trim which slice of denoising counts as evidence. The rest (minimum_strength, minimum_consensus, geometry_recall, split_sensitivity, instance_recall, matte_solidity, edge_feather, capture_profile) are the shared family stack, sensibly defaulted.

Why you'd actually reach for it

Three situations. First, you want to see what your prompt is doing - which tokens drew real attention and where, as an inspectable SEGS map. Second, you're building an automatic regional workflow and don't want to hand-maintain a concept list that changes every prompt; this node makes the regions a pure function of whatever prompt you wrote. Third, the SEGS output is Impact-compatible, so the regions feed detailers and the pack's regional samplers exactly like Concept Attention SEGS - but now they scale to any prompt without edits.

Watch out for

Same provenance rule as the whole family: the image must trace back to the sampler in the same workflow, untouched in between, or there's no captured attention to read. And because evidence starts as raw attention, expect overlap - the same pixels legitimately belong to "girl" and "pink hair" - which is deliberate, not a bug. If you're feeding these into something that wants a tight single region, switch evidence_mode to concept isolation and lean on minimum_strength and minimum_region_size. For a quick look, though, defaults plus the segs output are exactly right.

Part of SimpleSyrup: install once via Manager (search SimpleSyrup) or git clone into custom_nodes plus requirements.txt. No model downloads - the model was already doing the attention while it generated.

CategorySimpleSyrup/Detection

Inputs (17)

NameTypeDefaultDescription
imageIMAGEImage whose graph provenance identifies the upstream sampler; the image is returned unchanged.
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_modeCOMBOraw attentionConcept isolation derives a cleaner stable region; raw attention shows the captured model probabilities without isolation weighting.

Outputs (3)

NameTypeDescription
imageIMAGEUnchanged connected image.
segsSEGSSeparate labeled overlapping SEGS for prompt concepts.
maskMASKSoft union of every retained prompt attention region.