FeatherMask_motorway_edition
FeatherMask on the Motorway
- MOTORWAY ππ¨
- MOTORWAY ππ¨
A hard-edged mask is a seam waiting to happen. When you inpaint or composite, a mask with a razor edge produces a visible boundary - the classic "I can see exactly where the edit starts" problem. FeatherMask fixes that by blurring the mask's edges by a set number of pixels on each side, so the transition from "affected" to "untouched" is a gradient instead of a cliff. This is the Motorway-ed version from agilly1989/ComfyUI_agilly1989_motorway: same core node, but it reads the mask from a key on the pipe and writes the feathered result back to a key.
The inputs that matter
- INPUT_mask_key (default
mask) - where on the Motorway the original mask lives. Whatever key you stored the mask under earlier is what goes here. - left, top, right, bottom - how many pixels to feather on each side, independently. All default to 0, so the node is a no-op until you set at least one. That's the first thing to check if "it doesn't seem to do anything."
- OUTPUT_MASK_key (default
MASK) - the key the feathered mask is written to.
Output is the MOTORWAY pipe. Note the one-way traffic: input mask comes in under one key, output goes out under another, and the defaults (mask β MASK) are deliberately different so you don't overwrite your original. If you want in-place, set both keys to the same value - but you usually don't.
When to use it
Inpainting is the big one: feather the region mask before it hits the sampler and the painted area melts into the surrounding image. Also handy before any composite/blend where a mask determines influence - the feathered values act as soft weights instead of a binary yes/no. A few pixels of feather on each side is often all it takes to kill the "pasted on" look.
The independent sides matter more than people expect. An object sitting at the bottom edge of the frame doesn't need a bottom feather - that edge is the frame. Feathering it anyway can smear the boundary against the canvas. Set only the sides that are actually inside the image.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI, or install via ComfyUI Manager under "ComfyUI_agilly1989_motorway." No extra dependencies or models.
Standard pack caveat for anyone who lands here: v1.1.7's pyproject.toml describes a "HOTFIX - REMOVED MONKEYPATCH AND GENERATED NODES," and the generated clones are commented out of __init__.py. Core Motorway nodes work; the _motorway_edition clones may not appear in your menu until the author re-enables them. If it's missing, core FeatherMask is the same operation - park the mask on the bus with a ramp first and you've reconstructed the wrapper by hand.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| INPUT_mask_key | STRING | mask | β |
| left | INT | 00β16384 | β |
| top | INT | 00β16384 | β |
| right | INT | 00β16384 | β |
| bottom | INT | 00β16384 | β |
| OUTPUT_MASK_key | STRING | MASK | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |