Shima SEGPromptTarget
Point a regional prompt at exactly the segments you detected
- conditioning
- segs
- conditioning
- combined_mask
Here's the gap this node fills: a detector hands you SEGS, and you want to re-prompt a region - say, "give that person a red jacket" - without affecting the background. Standard conditioning can't do that. SEGPromptTarget takes your conditioning and a set of SEGS, merges all the detected masks into one region, and applies your conditioning to just that area using ComfyUI's native mask-based conditioning. It's the bridge between "what I detected" and "what I want changed there."
What it does, mechanically
The heavy lifting is Impact Pack's segs_to_combined_mask, which takes the list of SEG objects and builds a single contiguous mask, handling the bbox placement back into full-image coordinates for you. Then it flattens that to a 3D mask and feeds it through ComfyUI's core ConditioningSetMask - the exact same node your Conditioning (Set Mask) uses under the hood. Result: a conditioning that only influences the detected region, and the combined mask itself as a second output so you can preview or reuse it.
Inputs, the ones that matter:
conditioning- what you want to inject into the region.segs- the detected regions, from any SEGS producer (Impact detector, Shima AutoYoloSEG, SAM nodes).strength- how hard the conditioning bites, 0 to 10. Below 1 makes it a soft nudge; above 1 is aggressive.set_cond_area-defaultormask bounds. This is the same choice as core ComfyUI's mask-area setting:mask boundsrestricts the conditioning area to the tight bounding region (faster, can cause seams at the box edge),defaultkeeps the full-area behavior.
Outputs are conditioning (wire into your KSampler or Detailer) and combined_mask (a MASK you can preview or feed a ControlNet).
One graceful-failure detail: if the SEGS list is empty it returns your conditioning untouched plus an empty 64×64 mask rather than crashing the queue - annoying if you expected a region and got none, but better than a red error mid-batch.
Installing it
Part of KDB-USJP/shima_wf:
cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf
Restart ComfyUI. It imports impact.core and impact.utils at runtime, so ComfyUI-Impact-Pack is a hard requirement - the pack's installer pulls it automatically. No extra model files.
Where it fits (and where it doesn't)
This is a composing tool rather than a generator: pair it with a detailer pass or a second sampler that reads the region-conditioned prompt, rather than expecting the conditioning alone to change the image. The one genuine trap is mask bounds vs default - if you see hard edges around your edited region, the box boundary is showing, and switching to default (or feathering your mask upstream) is the usual fix. For the "change only what I detected" use case, it's the cleanest single node in this pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| segs | SEGS | — | |
| strength | FLOAT | 1.000–10 | — |
| set_cond_area | COMBO | 2 options: default, mask bounds |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| combined_mask | MASK | — |