Nodes/ComfyUI Layer Style/LayerMask: MaskMotionBlur
ComfyUI Node Runs on cloud

LayerMask: MaskMotionBlur

Directional blur on a mask

By chflame163·Created 3 years ago·Updated 5 days ago· 3,113
LayerMask: MaskMotionBlur
  • mask
  • mask
â—„invert_masktrueâ–º
â—„blur20â–º
â—„angle0.0â–º

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.

Category😺dzNodes/LayerMask

Inputs (4)

NameTypeDefaultDescription
maskMASK—
invert_maskBOOLEANtrue—
blurINT201–9999—
angleFLOAT0.0-360–360—

Outputs (1)

NameTypeDescription
maskMASK—