ScaleBy BBOX (SEG_ELT)
Grow or shrink one detection's box by a factor
- seg
- SEG_ELT
Worth flagging up front: this node isn't named anywhere in the pack's own README. The README documents the SEGS_ELT manipulation family - DecomposeSEGS, AssembleSEGS, From SEG_ELT, Edit SEG_ELT, Dilate SEG_ELT, and the bbox/crop_region extractors - but ScaleBy BBOX (SEG_ELT) isn't among the bullets, even though it clearly belongs to that same family by name and by its SEG_ELT-in, SEG_ELT-out shape. It exists, it works, it's just undocumented - one of the pack's real gaps.
What it does, going by the schema
It takes one decomposed detection element (a SEG_ELT, produced by DecomposeSEGS) and a scale factor, and outputs a modified SEG_ELT with its bounding box scaled by that factor. The name tells you the target field specifically: this scales the bbox - the tight box around the actual detected object - not the crop_region, which is the separate, usually-larger field a Detailer pads out for processing context. If you want to nudge how tightly or loosely a detailer works a region, crop_region and its padding factor are typically what govern that; this node is for adjusting the raw detected box itself.
Why you'd use it
After DecomposeSEGS, if one particular detection's box looks too tight (clipping into the subject) or too loose (including background you don't want touched), you can scale that individual element without touching the rest of the SEGS collection - reassemble with AssembleSEGS afterward and continue your pipeline as normal. It's finer, per-element control than adjusting a detector's global settings, useful when only one detection in a batch is misbehaving.
The input and output
seg(SEG_ELT) - the single decomposed element to modify.scale_by(FLOAT, default 1, range 0.01–8, step 0.01) - the multiplier. 1 is no change; below 1 shrinks the box, above 1 grows it.
Output is a single SEG_ELT - the same element with a scaled bbox, ready to feed back into AssembleSEGS or wherever the rest of your SEG_ELT-level editing chain goes.
Installing it
Comes with the whole pack, no separate step. Via ComfyUI Manager: search ComfyUI Impact Pack, Install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt
(portable: python_embeded\python.exe -m pip install -r requirements.txt), restart. No models needed - this is coordinate math on one element.
Common issues
Watch the range: 0.01 to 8 is a wide span, and typing 8 when you meant 0.8 will blow a modest face box out to nearly the whole frame - an easy typo with an ugly result once it reaches a Detailer. If a subsequent pass looks wildly over-processed, check this value first.
The other real trap is just the type: this wants a SEG_ELT, not a SEGS collection, so it only works after DecomposeSEGS has broken things apart, and you'll need AssembleSEGS afterward to get back into normal SEGS-consuming territory. Since this node is undocumented in the pack's own README, there's no worked example to check your usage against - if you're not sure the scaled box landed where you expect, pair this with From SEG_ELT bbox afterward to read the resulting coordinates back out and sanity-check them before running an expensive detail pass on it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seg | SEG_ELT | — | |
| scale_by | FLOAT | 1.000.01–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEG_ELT | SEG_ELT | — |