Nodes/was-node-suite-comfyui/Image Median Filter
ComfyUI Node Runs on cloud

Image Median Filter

Smooth out surface noise without melting your edges

By WASasquatch·Created 3 years ago·Updated about 16 hours ago· 1,840
Image Median Filter
  • image
  • IMAGE
diameter2
sigma_color10.0
sigma_space10.0

Per WAS's description, this applies a median filter to smooth out surface detail - and the reason to reach for a median filter specifically, rather than a plain blur, comes down to how the two techniques actually work. A Gaussian or box blur averages neighboring pixels, which smooths detail but also smears edges - the classic "everything looks like it's underwater" side effect of pushing a blur too far. A median filter instead replaces each pixel with the median value of its local neighborhood, not the average. That distinction is why it's specifically good at killing small, noisy detail while preserving hard edges far better than an averaging blur would: an edge is a real, consistent value shift, and the median of a neighborhood straddling that edge tends to land on one side or the other rather than blending the two, unlike an average.

What it's actually good for

Softening surface texture without wrecking structure - smoothing skin pores or fabric grain in a portrait without also blurring the edges of eyes, hair, or jawlines the way a Gaussian blur would; cleaning up noisy or grainy AI-upscaled surfaces; or prepping an image for a stylized, smoothed look before restyling it further. It operates purely at the local pixel level - it has no opinion about composition, lighting, or anything beyond immediate neighboring pixels, so don't expect it to fix anything bigger than surface noise.

How it works

Feed it an image, get an image back, same dimensions - a straightforward filter, drop-in anywhere an IMAGE is expected downstream: another filter, a Save Image, or a VAE Encode if you're feeding the result into an img2img pass.

It's worth keeping in your back pocket specifically because it's non-linear. A lot of the more visually interesting filters in WAS (Bloom, Chromatic Aberration, Film Grain) are meant to add character; Median Filter is one of the few in the pack whose entire job is to quietly remove something without leaving its own fingerprint - which is exactly what you want for a cleanup pass rather than a stylization pass.

Installing it

Part of the full WAS Node Suite pack:

  • ComfyUI Manager - search WAS Node Suite, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, then pip install -r requirements.txt from inside that folder, then restart ComfyUI.

Common issues

Pushed too hard, median filtering starts to look flat and a little plasticky - a mild, classic "over-smoothed" artifact rather than a natural-looking result, similar to what you'd see from an overdone noise-reduction pass in a photo editor. Treat it as a light-touch tool and dial it back if edges start looking waxy rather than crisp.

And the pack-wide caveat: WAS Node Suite has been unmaintained since December 2023, with "Import Failed" errors after a ComfyUI update a real, recurring complaint tied to older pinned dependencies colliding with newer ones. Reinstalling requirements.txt inside your ComfyUI venv is the usual fix if the whole suite stops loading.

CategoryWAS Suite/Image/Filter

Inputs (4)

NameTypeDefaultDescription
imageIMAGEThe image to smooth. A batch is handled one image at a time.
diameterINT20.1–255How wide an area each output pixel is averaged over, in pixels. 2 is a gentle clean-up, 15 visibly flattens texture, and large values are very slow because the cost grows with the square of this.
sigma_colorFLOAT10.0-255–255How different in colour two pixels may be and still be mixed, on a 0-255 scale. Small values such as 10 mix only near-identical colours and so preserve every edge; 150 mixes across most colours and blurs the picture like an ordinary blur.
sigma_spaceFLOAT10.0-255–255How far away in pixels a neighbour may be and still count. Larger values pull in more distant pixels, up to the limit set by diameter.

Outputs (1)

NameTypeDescription
IMAGEIMAGEThe smoothed image, still in RGB.