Nodes/RES4LYF/Image Median Blur
ComfyUI Node Runs on cloud

Image Median Blur

Edge-friendly blur for cleanup and detail work

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Image Median Blur
  • images
  • image
size6

A straightforward image filter that's more useful than it sounds. Image Median Blur runs a median blur over an image - and unlike a gaussian blur, a median filter smooths away speckle and noise while keeping edges relatively crisp. That property is exactly why it shows up in detail and retouching workflows: you can knock down grain or isolate the low-frequency "color and tone" layer of an image without turning edges to mush.

In the RES4LYF world you'll most often see it as a step inside frequency-separation and detail-transfer setups, where you deliberately blur a copy of the image to separate broad tone from fine texture. But it's a general-purpose filter - nothing stops you using it for plain cleanup.

How it works

For each pixel, a median blur looks at the neighborhood around it and replaces it with the median value rather than the average. Averages get dragged by outliers (a single bright speckle smears into its surroundings); medians ignore them. The result is smoothing that respects edges much better than a mean/gaussian blur. The size you pick sets how big that neighborhood is.

The inputs and outputs that matter

Two inputs, one image out - genuinely simple:

  • images (IMAGE) - the image (or batch) to blur.
  • size (default 6) - the neighborhood size. Bigger = stronger blur and more aggressive noise removal. This is your only real dial; small values (2–4) do gentle cleanup, larger ones flatten the image toward its broad tones.
  • image (IMAGE, output) - the blurred result.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

Portable ComfyUI: use the embedded pip. Restart, hard-refresh F5. No downloads.

Common issues & troubleshooting

It's slow on big images / large size. Median filtering is more expensive than a gaussian blur, and cost climbs with size. If a large kernel on a 4K image is crawling, either drop size or blur at a smaller resolution and scale back up. This is inherent to the median operation, not a bug.

Too much detail is gone. You over-sized it. Median blur at a large neighborhood flattens texture hard. Pull size down until edges and important detail survive.

Why not just gaussian? Use median when you want to remove speckle/noise while protecting edges - skin, line work, anything where a gaussian's edge-smearing would hurt. For a soft, dreamy overall blur, a gaussian is actually the better pick. Different tools.

Where it fits. In a frequency-separation flow, this is typically the blur that produces the low-pass (tone/color) layer. Pair it with the pack's Frequency Separation Hard Light LAB and Image Channels LAB nodes if that's what you're building.

CategoryRES4LYF/images

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
sizeINT6

Outputs (1)

NameTypeDescription
imageIMAGE