AntialiasingImage
2x up, 2x down, edges get smoother
- images
- IMAGE
AntialiasingImage smooths jagged edges by doing something almost embarrassingly simple: it upscales your image by 2x with a high-quality filter, then scales it back down to its original size. That's supersampling, the same basic idea a game renderer uses when it renders at 4K and displays at 1080p - extra samples in the middle means the pixels that survive are averages of a bigger neighborhood, and staircase edges get rounded off.
You'd reach for this when you've generated or processed something that comes out hard-edged and crunchy. Binarized line art, upscaled pixel-style images, a low-res render slammed up to size - all of those tend to have ugly jaggies that a plain resize doesn't fix. This node softens exactly that without changing the resolution.
How it works
The implementation is compact and fixed-parameter. Each image is converted to a PIL image, scaled up by a hard-coded factor of 2.0 using LANCZOS resampling, then scaled back down to the original dimensions, also with LANCZOS. Up-and-down through the same high-quality filter means the output is the same size as the input but with anti-aliased edges, because the downsample averages each output pixel over a 2x block of the upsampled image. Alpha is preserved if present, though only the RGB channels go through the resampling - transparency rides along untouched.
A couple of honest limitations. There are no parameters - the scale factor is locked at 2.0 and the filter is always LANCZOS. If you want 4x supersampling or a different filter, this isn't the node. And it's not free: the intermediate image is four times the pixel count, so on a big image it costs real time and memory. It's also not a cure-all - on hard binary edges, LANCZOS can introduce faint halos, and for masks a blur-and-threshold approach is often the better call. Think of it as the quick, no-options smoothing pass, not a professional anti-aliasing toolchain.
Inputs and output
images(IMAGE) - the image (or batch) to smooth.
Output is a single IMAGE tensor at the same resolution, edges softened, alpha preserved.
Where it sits in a workflow
It slots in naturally as a post-processing step after a binarize or a hard upscale - the kind of "polish" node you drop in front of a save or a preview to take the digital crunch off. If you're doing anything with line art or sprites, it's worth a try before you reach for a fancier denoise or blur chain, because it doesn't smear detail the way a plain Gaussian blur does; it just knocks the jaggies down.
Installing
Standard for this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/keit0728/ComfyUI-Image-Toolkit
Restart ComfyUI, or install "ComfyUI-Image-Toolkit" from ComfyUI Manager. It needs opencv-python==4.11.0.86 (pinned - the pack's only dependency) and Pillow, which ships with ComfyUI already. No models, no downloads, CPU-only.
Gotchas
The fixed 2x factor is the one that surprises people - there's no way to ask for more aggressive smoothing, so if the result still looks steppy you're not missing a setting; you need a different approach. And as with every node here: this is a tiny anonymous pack (Japanese author, last touched mid-2025, README clone URL is a placeholder that says your-username). It works as advertised; just don't expect an issue tracker with answers.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Images to apply antialiasing effect. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |