ComfyUI Node

HT Surface Blur

Photoshop's surface blur, tiled so it won't OOM — HT Surface Blur

By ArtHommage·Created 2 years ago·Updated about a year ago· 4
HT Surface Blur
  • image
  • blurred_image
radius5
threshold15.0
memory_usageconservative

A plain blur smooths everything, edges included, which makes faces look like wax. Photoshop's Surface Blur filter was the classic answer: it blurs the flat areas while leaving strong edges alone - skin stays smooth, but the eyes and mouth stay crisp. HT Surface Blur (from the HommageTools pack) brings that to ComfyUI as a native node, and it's engineered for the one thing that kills naive implementations: memory. It processes the image in tiles and sizes those tiles against your available VRAM, so a big 4K portrait doesn't blow up your GPU.

How it works

The algorithm is edge-aware. For each pixel it looks at its neighborhood and computes weights from both color difference and position - pixels that are too different in color from the center count as an edge and barely contribute to the blur; similar colors blur freely. That's what the two main inputs control:

  • radius (1–100, default 5) - how big the neighborhood is. Bigger radius = stronger smoothing.
  • threshold (0–255, default 15) - how much color difference counts as "an edge." Lower threshold preserves more detail; higher threshold lets the blur push through areas of subtle variation.

If that sounds like a bilateral filter, it's a close cousin - same family, same intent. Where this node earns its keep is the memory handling. It estimates the working set for the kernel, picks a tile size based on your GPU's total memory, and processes in overlapping tiles to avoid seams. The memory_usage menu (conservative / aggressive / super_aggressive) is a dial between safety and speed: conservative targets 70% of VRAM with small tiles, super_aggressive pushes toward 95%. On CPU-only setups it assumes 8GB and tiles accordingly.

The output is a single blurred_image, BHWC, ready to feed anywhere.

When to reach for it

It's the portrait-retouch / texture-cleaning tool in the pack. Skin smoothing without erasing the eyes, denoising flat regions while keeping edge detail, softening backgrounds before compositing, cleaning up generated textures - all the jobs where a gaussian just destroys too much. The KB's upscaling essay makes the same point about soft sources: when a render is noisy or textured, cleaning before upscaling beats upscaling the noise. Surface blur is a great fit for that first pass.

Installing it

HommageTools install, once:

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

Restart ComfyUI, or ComfyUI Manager → "HommageTools". Pure PyTorch, no model downloads, no extra binaries.

Where it bites

Radius and threshold have a cost curve. A radius of 100 on a large image is a genuinely heavy kernel, and the tiling keeps it alive but doesn't make it fast - you can wait a while on high settings. super_aggressive on a small GPU (6–8GB) is a gamble; the node thinks it has 95% of VRAM and may still spill or crawl. The pack's own disclaimer is "perpetual alpha," so treat extreme settings as test territory, not defaults. And the practical sweet spot for most portrait work is a single-digit radius with a threshold in the 10–30 range - beyond that you're blurring structure, not texture. Start conservative, look at the result, then push.

CategoryHommageTools/Filters

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
radiusINT51–100
thresholdFLOAT15.00–255
memory_usageCOMBOconservative3 options: conservative, aggressive, super_aggressive

Outputs (1)

NameTypeDescription
blurred_imageIMAGE