ImageFilterMin
Use Allor's ImageFilterMin to kill bright specks
- images
- IMAGE
Every generated or scanned image eventually gets a couple of stray bright pixels - a dust dot, a hot sensor pixel, a compression sparkle. ImageFilterMin is the quiet node that eats them. It's the morphological minimum filter: each pixel becomes the darkest value found in the little neighborhood around it. In plain terms, it's a "shrink the highlights" pass, and it's astonishingly good at making isolated bright specks disappear without smearing the whole image like a blur would.
It comes from the Allor Plugin (Nourepide/ComfyUI-Allor), a big image-processing pack where every node works on RGBA and on whole image batches. Min lives in the filter family alongside its siblings Mode, Rank, Max and the blur stack, and it's the one you'll reach for when "remove the noise dots" is the job, not "soften everything."
How it works
Under the hood it's PIL's ImageFilter.MinFilter applied to each image in the batch, one tensor→PIL→filter→tensor round trip per frame. The only control is size, which sets the neighborhood. There's a quirk worth knowing: the kernel is size + 1, and the input steps by 2, so you can't make an even kernel. A size of 2 (the default) gives you a 3×3 window, 4 gives 5×5, and so on. Bigger windows eat bigger specks, but they also start eating fine detail, because a minimum filter doesn't just remove hot pixels - it erodes bright structure generally. Thin highlights, bright strands, and small white text all get darker and thinner as the kernel grows. Treat it as a targeted despeckle, not a general-purpose smoother, and keep size low (2–4) unless the noise is chunky.
Inputs and outputs
The interface is refreshingly small:
images(IMAGE) - your input, and it accepts a batch. All frames get filtered.size(INT, default 2, step 2) - the one dial. Neighborhood size for the filter.
Output is a single IMAGE at the same resolution with the same channel count. Wire it straight into a PreviewImage/SaveImage, or keep the chain going with other Allor nodes - since the pack preserves the alpha channel, an RGBA input stays RGBA on the way out, which most core ComfyUI filter nodes quietly drop.
Installing it
Same install as the rest of the pack - search "Allor Plugin" in ComfyUI Manager and hit install, then restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
Then restart ComfyUI. The pack pulls rembg and onnx as its main Python dependencies and creates a config.json on first launch (more on that below). No model files are needed for this node - it's pure PIL math, zero downloads.
Where people get burned
The usual mistake is cranking size up because a speck is visible, then wondering why the image looks darker and detail is gone. Raise the kernel in small steps and only as high as the biggest speck requires. Also note this is a darkening filter by nature - if your problem is black dust on a white background, you want the pack's ImageFilterMax (which does the opposite) or ImageFilterRank with a high rank, not Min.
One pack-level gotcha: on first startup Allor writes config.json and enables a daily auto-update that does a soft git pull of the pack. The repo was rebased at some point (all images stripped from history), and a stale clone can occasionally hit a git hiccup on update - if you ever see odd update errors, check the pack's update docs rather than fighting the merge yourself.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| size | INT | 2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |