图像分区 · 外边界羽化与核心保护
The most parameter-heavy mask node in the pack — and you mostly just need the defaults
- corrected_mask
- mandatory_core_mask
- processing_support_mask
- selection
- final_feathered_mask
- outer_boundary_feather_ramp
- report_json
Feathering a mask sounds like the most boring operation in image editing, so here's the thing this node does that most feather nodes don't: it feathers the outer boundary of your selection outward into the source image, while keeping every pixel inside the selection at full strength. That's the difference between a mask that blends seamlessly and a mask that shrinks your edit area or softens its core. RegionEditProtectedOuterBoundaryFeather is the pack's careful, over-engineered version of that idea - and yes, it has sixteen-plus parameters. Don't panic; the defaults are designed to be usable.
The mechanism, from the source: a narrow outward-only ramp is added just outside your selection. Every pixel inside the corrected_mask keeps its existing alpha, and the surrounding source image gets a short smooth transition into it. That way you never erode the edit core - which is the classic feather mistake - and the seam blends into untouched pixels instead of cutting on the mask line. The mandatory_core_mask (whatever you must not lose, e.g. a face) and processing_support_mask (the editable window) define what's allowed to be feathered at all.
Required inputs are the geometry: corrected_mask, mandatory_core_mask, processing_support_mask, a selection (the pack's FACE_LOCAL_SELECTION type from the face/region selection nodes), and x, y, width, height for the crop. That's a lot of wires, but they're all things you already have by the time you're feathering.
The optional knobs, decoded. axis_feather_profile is the one that matters most: long_edge_10_short_edge_5 (feather by crop edges), long_axis_10_short_axis_5 (the default, feather by the long/short axis of the face), manual_per_side, or legacy_uniform_10. The axis-based profiles are smarter than uniform feathering because faces aren't square - the top of the head and the chin want different ramp distances. feather_width_mode switches between crop_short_side_ratio (feather width as a fraction of the crop, default) and fixed_pixels. Then come the raw numbers: outer_feather_crop_ratio (default 0.1), the four per-side multipliers, and a pile of *_feather_percent / *_adjustment_percent values for fine manual control.
Outputs: final_feathered_mask (what you wire forward), outer_boundary_feather_ramp (the ramp mask by itself, for inspection or debugging), and report_json.
Honest advice: treat this as a "run it on defaults, then touch one knob" node. The defaults - axis-based profile, crop-ratio width, 0.1 outer ratio - are tuned for face crops. Reach for the manual per-side controls only when the seam problem is asymmetric (hair on top blending worse than the chin, say), which is exactly what the per-side adjustment percentages exist for.
Install: ComfyUI Manager → Region Edit Toolkit (native-region-tile-planner-merge), or git clone https://github.com/Liu-Bot24/ComfyUI-Region-Edit-Toolkit.git into custom_nodes, pip-install requirements.txt into ComfyUI's real Python, restart.
Two traps. First, don't crank the outer ratio to the max (0.3) and wonder why the edit bleeds - the ramp is outward, so too much feather means the source visibly leaks into the edit zone at the edges. Second, this node expects its four inputs to describe the same crop; feed it mismatched geometry and the seams it produces will be in the wrong place. The pack is too new for community tuning threads, so let the outer_boundary_feather_ramp output be your teacher - it shows you exactly what the ramp looks like before you commit.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| corrected_mask | MASK | — | |
| mandatory_core_mask | MASK | — | |
| processing_support_mask | MASK | — | |
| selection | FACE_LOCAL_SELECTION | — | |
| x | INT | — | |
| y | INT | — | |
| width | INT | — | |
| height | INT | — | |
| axis_feather_profileopt | COMBO | long_axis_10_short_axis_5 | 4 options: long_edge_10_short_edge_5, long_axis_10_short_axis_5, manual_per_side, legacy_uniform_10 |
| feather_width_modeopt | COMBO | crop_short_side_ratio | 2 options: crop_short_side_ratio, fixed_pixels |
| outer_feather_crop_ratioopt | FLOAT | 0.1000.001–0.3 | — |
| fixed_feather_pixelsopt | INT | 241–512 | — |
| minimum_feather_pixelsopt | INT | 241–512 | — |
| maximum_feather_pixelsopt | INT | 40961–8192 | — |
| top_feather_multiplieropt | FLOAT | 1.000–3 | — |
| bottom_feather_multiplieropt | FLOAT | 1.000–3 | — |
| left_feather_multiplieropt | FLOAT | 1.000–3 | — |
| right_feather_multiplieropt | FLOAT | 1.000–3 | — |
| feather_at_original_image_boundaryopt | BOOLEAN | false | — |
| outer_feather_face_ratioopt | FLOAT | 0.0000–0.3 | — |
| internal_difference_feather_crop_ratioopt | FLOAT | 0.0060–0.03 | — |
| long_edge_feather_percentopt | FLOAT | 10.00–30 | — |
| short_edge_feather_percentopt | FLOAT | 5.00–30 | — |
| top_feather_adjustment_percentopt | FLOAT | 0.0-30–30 | — |
| bottom_feather_adjustment_percentopt | FLOAT | 0.0-30–30 | — |
| left_feather_adjustment_percentopt | FLOAT | 0.0-30–30 | — |
| right_feather_adjustment_percentopt | FLOAT | 0.0-30–30 | — |
| top_feather_percentopt | FLOAT | 10.00–30 | — |
| bottom_feather_percentopt | FLOAT | 10.00–30 | — |
| left_feather_percentopt | FLOAT | 5.00–30 | — |
| right_feather_percentopt | FLOAT | 5.00–30 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| final_feathered_mask | MASK | — |
| outer_boundary_feather_ramp | MASK | — |
| report_json | STRING | — |