Nodes/ComfyUI_agilly1989_motorway/ImageSharpen_motorway_edition
ComfyUI Node

ImageSharpen_motorway_edition

Unsharp-mask sharpen on a piped image

By agilly1989·Created 2 years ago·Updated about a year ago· 7
ImageSharpen_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_image_keyimage
sharpen_radius1
sigma1.00
alpha1.00
OUTPUT_IMAGE_keyIMAGE

When a generation comes out a hair soft - which happens constantly, especially after a resize or a low-denoise pass - the fix is usually a light sharpen. ImageSharpen_motorway_edition is stock ComfyUI's ImageSharpen (an unsharp-mask style filter), wrapped for the MOTORWAY 🚌💨 pipe in agilly1989/ComfyUI_agilly1989_motorway.

It reads the image out of the pipe under INPUT_image_key (default "image"), sharpens it, and stores the result back under OUTPUT_IMAGE_key (default "IMAGE"). Only visible output is the Motorway pipe - the sharpened image waits in the pipe under that key for the next node.

Inputs that matter

  • INPUT_image_key (default "image") - pipe key of the source
  • sharpen_radius (INT, 1 to 31, default 1) - how wide the edge-detection area is
  • sigma (FLOAT, 0.1 to 10, default 1) - the Gaussian blur spread inside the unsharp mask
  • alpha (FLOAT, 0 to 5, default 1) - how much sharpening is applied
  • OUTPUT_IMAGE_key (default "IMAGE") - where the result lands

The honest way to use it: start at the defaults and nudge alpha up. It's the strength knob, and going past ~1.5 starts to look crunchy. sharpen_radius and sigma control the kind of sharpening - small radius plus small sigma is fine detail, larger values sharpen at the scale of edges and start producing visible halos. This is a corrective tool, not a detail-inventor: it makes existing contrast pop, it can't add resolution. The KB's upscaling essay makes the same point about the whole interpolator family - if the image is genuinely soft, sharpen before or after a real upscale pass, not instead of one.

How it works

Standard clone mechanics: pop the Motorway, pull the image out via the input key, run stock ImageSharpen with your widget values, store the result under the output key, and return a clone of the pipe so nothing upstream is mutated.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

Restart ComfyUI, or grab it via ComfyUI Manager by searching "motorway". No requirements.txt, no model downloads - pure Python.

Gotchas

Keys are exact and case-sensitive; a 'MotorwayClass' object has no attribute 'hash_' error means your key string matches nothing in the pipe. Watch the case trap - read "image" (lowercase), write "IMAGE" (uppercase) - so chained clones need keys you set to match. And the family caveat: BETA, with the motorway_edition clones disabled in the 1.1.7 hotfix - if the node isn't in your menu, stock ImageSharpen does the identical job with wires.

Categoryagilly1989 Nodes/Motorway-ed/image/postprocessing

Inputs (6)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_image_keySTRINGimage
sharpen_radiusINT11–31
sigmaFLOAT1.000.1–10
alphaFLOAT1.000–5
OUTPUT_IMAGE_keySTRINGIMAGE

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨