HT Moiré Removal
Strip the rainbow interference off scanned and photographed screens
- image
- processed_image
Photograph a computer monitor or scan a printed magazine and you know the enemy: those wavy, color-shifting interference bands that shimmer across fine patterns. That's moiré, and it wrecks perfectly good images right before they enter your pipeline. HT Moiré Removal is the pack's dedicated de-moiré filter - a frequency-domain clean-up that targets the interference pattern while leaving the underlying image mostly alone. It's the node you reach for when your source is a scan or a screen photo and you want a clean base for further processing.
How it works
It stacks three classic filters, each toggleable:
- Median filter (
median_enabled, kernel default 7) - a spatial pass that kills small periodic noise. Cheap, first line of defense. - Butterworth filter (
butterworth_enabled) - the frequency-domain workhorse. The image goes into the Fourier domain, a Butterworth low-pass attenuates the high-frequency band where moiré lives, and it comes back out. Thebutterworth_a/b(0.75/1.25) shape the filter's roll-off,butterworth_cutoff(30) sets where it starts cutting, andbutterworth_order(2) controls how aggressive the cut is. - Notch filter (
notch_enabled, off by default) - the surgical option. Screen-photo moiré isn't random; it concentrates at specific frequencies set by the pixel grid and camera angle. Notch filtering removes a band of frequencies rather than everything above a cutoff. Thenotch_h_spacing/notch_v_spacing(135/200) andnotch_size(15) define where those bands sit. Turn this on when the Butterworth pass leaves periodic residual bands - it's the difference between "softened the whole image" and "removed the actual pattern."
Everything runs tiled for memory - tile_size_mode (1024/768/512/Conservative/Aggressive), tile_overlap (128), edge_padding (64) - with global_normalization on to keep brightness consistent across tiles, which is exactly how you avoid the seams tiled processing usually introduces. resolution_scaling_factor (default 1) lets you pre-scale spatial parameters for very large inputs. Output: processed_image, straight into a preview or the next stage.
When to use it (and when not to)
Use it on scanned illustrations, photographed screens, digitized print - sources with genuine periodic interference. Don't expect it to "fix" a jpeg-compression mosaic or sensor noise; that's a different problem (the pack's other filters, like the denoiser, are aimed there). And remember frequency filtering trades detail for clean: start with median on, Butterworth on, notch off, then enable notch only if the periodic bands survive.
Installing
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/ArtHommage/HommageTools.git
cd HommageTools && pip install -r requirements.txt
restart, or Manager → "HommageTools for ComfyUI". It uses OpenCV/numpy for the median and FFT passes, which a standard ComfyUI environment already has - no extra model files. Given the pack's "perpetually in alpha" disclaimer, re-check results after updates: frequency-domain parameter behavior is exactly the kind of thing that gets tuned between versions.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolution_scaling_factor | FLOAT | 1.000–2 | — |
| tile_size_mode | COMBO | 1024 | 5 options: 1024, 768, 512, Conservative, Aggressive |
| global_normalization | BOOLEAN | true | — |
| tile_overlap | INT | 1280–256 | — |
| edge_padding | INT | 640–256 | — |
| median_enabled | BOOLEAN | true | — |
| median_kernel_size | INT | 73–21 | — |
| butterworth_enabled | BOOLEAN | true | — |
| butterworth_a | FLOAT | 0.750.1–2 | — |
| butterworth_b | FLOAT | 1.250.5–3 | — |
| butterworth_cutoff | INT | 305–100 | — |
| butterworth_order | INT | 21–5 | — |
| notch_enabled | BOOLEAN | false | — |
| notch_h_spacing | INT | 13550–200 | — |
| notch_v_spacing | INT | 20050–300 | — |
| notch_size | INT | 155–30 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| processed_image | IMAGE | — |