Resampler | Triangle
Smooth, safe, no ringing
- resampler
Resampler | Triangle is the filter that never offends anyone: it's the classic bilinear-style kernel, a simple linear falloff around each pixel. It's the "safe" resampler - soft, predictable, zero ringing - and it's a genuinely useful default in this pack even though it won't win any sharpness awards. When you don't want to think about filters, this is the one you can set and forget without risk.
How it works
The kernel is literally a triangle: weight falls off linearly from 1 at the center pixel to 0 at radius pixels away. The one input is radius (integer, default 1, min 1), and at radius 1 it's the direct equivalent of bilinear interpolation. Raise it beyond 1 and you get a wider, softer footprint - more blur, still no ringing, and slower. In practice radius 1 is what you'll almost always use, because the whole point of this filter is that it's gentle.
Output is a resampler wire to plug into Resample Image, Resample Mask, or Resample Latent.
When to reach for it
Two situations where Triangle is the right call rather than a compromise:
- Masks you want soft on purpose. If you're building a feather into a mask before compositing or inpainting, a triangle-resampled mask edge is a smooth gradient with no overshoot. (For masks you want hard, use Resampler | Nearest-Neighbor instead - this pack's inpaint workflow treats the two cases as distinct, and so should you.)
- Resizing something noisy, low-res, or already blurry. A sharp kernel like Lanczos will happily sharpen the noise and produce halos. Triangle just averages, which is what a noisy source wants. The upscaling rule of thumb - don't reach for a sharpener when the source is soft - points straight at this node.
Downsides: it's soft, so upscaling a sharp photo with it looks slightly mushy next to Lanczos, and it blurs slightly even when you're only shrinking a little. If your source is genuinely sharp, Resampler | Lanczos will beat it on detail; if your source is soft or your edges are a mask, Triangle is often the better answer.
Installing
Ships in comfyui-some-image-processing-stuff:
cd ComfyUI/custom_nodes
git clone https://github.com/wmpmiles/comfyui-some-image-processing-stuff
Restart, or use ComfyUI Manager → search "Some Image Processing Stuff". No dependencies beyond PyTorch, no models to fetch. Remember the resampler wire must be connected into a Resample node - it's a required input, not an optional decoration.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| radius | INT | 1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| resampler | RESAMPLER | — |