Nodes/imgutils/Imgutils Restore (Adversarial)
ComfyUI Node

Imgutils Restore (Adversarial)

Scrubbing Faint Adversarial Noise

By xiaden·Created 2 months ago·Updated 2 months ago· 0
Imgutils Restore (Adversarial)
  • image
  • image

Rare thing in a custom-node pack: a "restore" node that doesn't download a single weight and runs in a blink on CPU. Imgutils Restore (Adversarial) sits in the imgutils/restore category of the imgutils pack, and its whole job is to strip a faint, low-level noise pattern out of an image using old-school filters - bilateral + guided - instead of a neural network.

What this is actually for

Some anime images - especially ones pulled from the web, or re-saved a few times - carry a barely-visible high-frequency noise/grid on top of the actual art. The imgutils library calls it "adversarial" noise, and it matters more than it looks: it wastes an upscaler's effort, can shimmer when you resize, and quietly degrades ControlNet preprocessing and compressors that assume a clean source. If you're batch-cleaning a dataset or prepping reference images, a light pass here makes everything downstream behave.

How it works

The node converts your image to PIL, calls remove_adversarial_noise from imgutils, and hands the result back. Bilateral filtering smooths flat areas while preserving edges (so lines don't smudge); guided filtering uses the original as a guide so detail is kept where it matters. Zero model files, zero VRAM, deterministic - run it on a thousand images and each one is identical.

The interface

It's the simplest node in the pack: one image input, one image output. Nothing else. There are no thresholds to tune because there's nothing to tune - it either helps or it doesn't.

The honest take

This is the lightweight member of the restore trio, and it's easy to over-expect from it. The other two (Imgutils Restore SCUNet and NAFNet) are real ML restoration models for heavy noise, JPEG mush, and actual degradation. This one is not that - feed it a genuinely damaged image and it does close to nothing, because the damage isn't what it's built for. It's for the specific faint-noise case. If your image looks clean already, the output is essentially identical, and that's fine; that's the point of a conservative filter.

Install

Same as every node in this pack - it's all one custom node repo:

cd ComfyUI/custom_nodes
git clone https://github.com/xiaden/comfyui-imgutils.git
cd comfyui-imgutils
pip install -r requirements.txt

Or install "imgutils" via ComfyUI Manager. Requires ComfyUI >= 0.25.0 (the pack uses the newer V3 node API) and Python >= 3.10. The only dependency is dghs-imgutils[gpu]. Because this node uses no model, there's nothing to download on first use - the pack's heavy stuff (taggers, upscalers, detectors) downloads its models on first run, but not this one.

Troubleshooting

There's very little that can go wrong with a deterministic filter, but if you installed the pack and don't see the node, it's almost always the ComfyUI version: the pack requires 0.25.0+ and older installs just won't register it. And if the output looks untouched, that's not a bug - you likely don't have adversarial noise, or you're hoping for real denoising, in which case you want the SCUNet or NAFNet sibling nodes instead.

Categoryimgutils/restore

Inputs (1)

NameTypeDefaultDescription
imageIMAGEInput image to remove adversarial noise from.

Outputs (1)

NameTypeDescription
imageIMAGE