NAFNet Restore
The workhorse node with tiling the quick buttons don't give you
- image
- model
- IMAGE
NAFNet Restore is the pack's workhorse - the node you graduate to once the auto-loading quick buttons (Denoise, Deblur) feel too locked-down. Denoise bundles a fixed SIDD model, Deblur bundles a fixed GoPro model. Restore takes whatever model NAFNet Load Model hands it, runs the same engine underneath, and adds the tiling controls the quick buttons mostly hide. Same brain, more leash.
It plugs into the middle of a workflow the way an upscaler does: Load Image → Restore → out. What it does to the image depends entirely on which model you fed it - denoise weights clean noise, GoPro weights attack motion blur. The node itself is agnostic.
The inputs that actually matter
Just three, and only two of them will you ever touch:
- image - any IMAGE tensor. Standard ComfyUI.
- model - the
modeloutput of NAFNet Load Model. This is the whole point: change the loader's dropdown, and the same Restore node does a different job. - tile_size (default 512, range 0–2048) - the one setting worth understanding. Set 0 for auto: images bigger than about a megapixel get tiled automatically with a sensible 512px tile. Set an explicit value like 512 or 768 to force it. Lower keeps peak VRAM down; higher means fewer tile seams to blend.
- tile_overlap (default 64) - how much neighboring tiles overlap before results are averaged. 64 is a fine default; bump it if you ever see faint seams on the output. It costs a little speed.
Output is a single IMAGE, ready to wire into Save Image, a preview, or (the usual next step) an upscaler.
How tiled processing works
Instead of feeding the whole image through the model in one shot, the node splits it into overlapping tiles, runs each through the network, and averages the overlapping regions so you don't get visible tile boundaries. That's what keeps a 2K photo runnable on a 6–8 GB card - full-frame inference through the width64 denoiser on a big image is exactly the kind of thing that OOMs a modest GPU.
Where it fits in a real workflow
This is a cleaner, not a creator. NAFNet is a plain feed-forward restoration network from MEGVII Research's ECCV 2022 "Simple Baselines" paper - it removes noise and blur, it doesn't invent detail. That puts it in a different lane from generative restorers like SeedVR2 or SUPIR, which hallucinate plausible detail. The sensible order is to restore first, then upscale: upscaling bakes in whatever noise and blur are already there, and it's far easier to clean a small image than to scrub artifacts out of a 4K one.
Install
ComfyUI Manager, search "NAFNet", install. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/marduk191/ComfyUI-NAFNet.git
cd ComfyUI-NAFNet
pip install -r requirements.txt
Restart after. The ~1.3 GB of models arrive via Git LFS; if your clone has no models/*.pth (just tiny pointer files), run python download_models.py inside the pack folder - it pulls the real weights from Google Drive.
Common issues
- Restore throws a model-not-found. The models aren't on disk - run the downloader above.
- Colorful noise/artifacts on the output. Wrong model for the input. SIDD weights hate heavy compression, GoPro weights hate out-of-focus blur. The README's warning is not decorative; NAFNet is domain-specific by training data.
- The model dropdown in the loader is empty. Same root cause as the first bullet.
- OOM on big images. Drop
tile_sizeto 512 (or leave 0 for auto) and keeptile_overlapat 64. The convenience Denoise/Deblur nodes tile automatically too, but this node is where you control it directly.
One caution: the README says the loader works with "any NAFNet/NAFSSR model," and it technically does, but the stereo NAFSSR weights expect a pair of images. Feed them a single image and you'll get odd output. Keep those on the dedicated NAFSSR Stereo Super-Resolution node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model | NAFNET_MODEL | — | |
| tile_sizeopt | INT | 5120–2048 | Tile size for processing. 0 = auto (tiles large images automatically) |
| tile_overlapopt | INT | 640–256 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |