LayerMask: MaskMotionBlur
Directional blur on a mask
- mask
- mask
This blurs a mask in a direction - a streaky, motion-style smear at whatever angle you pick, rather than the even softening you'd get from a plain blur. You use it when you want a mask whose edge trails off along an axis: motion trails, a speed-streak selection, a directional falloff for compositing something that's supposed to look like it's moving.
It's a niche tool, but when you need it, nothing else in the basic toolkit does it. A regular Gaussian blur spreads a mask equally in all directions; this one spreads it along a line, which is what "motion" actually looks like.
How it works
It convolves the mask with a directional (linear) kernel oriented at your chosen angle. Longer kernel means a longer smear; the angle rotates the direction of travel. The result is a mask that's sharp across the motion axis and stretched along it.
The inputs and outputs that matter
mask(MASK) - the mask to smear.invert_mask(BOOLEAN, default true) - this defaults to true, like many mask nodes in the pack. If the blur's affecting the opposite of what you expected, flip it.blur(INT, 1–9999, default 20) - the length of the motion streak. This is the main dial: higher = longer trail.angle(FLOAT, −360 to 360, default 0) - the direction of the smear in degrees. 0 is horizontal; 90 is vertical; anything between for a diagonal streak.
Output is a single motion-blurred mask (MASK).
How to install it
ComfyUI Manager → search ComfyUI Layer Style → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle
Restart to install requirements. No model download.
Common issues & troubleshooting
If the node's absent, that's the pack-level IMPORT FAILED situation - ComfyUI_LayerStyle failing to load, not this node. Check startup logs. The recurring causes across this pack: a stale install predating the split into ComfyUI_LayerStyle and ComfyUI_LayerStyle_Advanced (delete and reinstall), or a broken dependency crashing the import. Reinstall clean via Manager.
For the effect: if it looks like a normal soft blur instead of a directional streak, your blur is probably too small to read as motion - push it up. If the streak runs the wrong way, adjust angle (and remember 90 vs −90 are opposite directions). And as with its siblings, the invert_mask default of true is the first thing to check when the result looks inside-out. A big blur on a large mask isn't free - long directional kernels cost time, so keep it reasonable while you're dialing it in.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| invert_mask | BOOLEAN | true | — |
| blur | INT | 201–9999 | — |
| angle | FLOAT | 0.0-360–360 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |