Nodes/imgutils/Imgutils Restore (NAFNet)
ComfyUI Node

Imgutils Restore (NAFNet)

Deblur anime without re-rolling the seed

By xiaden·Created 2 months ago·Updated 2 months ago· 0
Imgutils Restore (NAFNet)
  • image
  • image
modeREDS
tile_size256

A reference image that's motion-blurred, or an upscale that smeared the linework, doesn't mean the whole job is dead - it means the pixels need fixing, not the seed. Imgutils Restore (NAFNet) is the node for that: it runs a real restoration network over your image to pull blur and degradation out, no re-sampling, no diffusion lottery. It's part of the xiaden/comfyui-imgutils pack wrapping the deepghs/imgutils library.

NAFNet (Nonlinear Activation Free Network) is a lightweight, fast image-restoration architecture that punched way above its size when it came out. This node exposes three of its trained variants through the mode dropdown:

  • REDS (default) - trained on the REDS video deblurring benchmark. The general-purpose deblur, and the one to start with.
  • GoPro - also deblurring, trained on the GoPro dataset. Different distribution of blur (real camera shake); worth trying if REDS leaves your image mushy.
  • SIDD - this one's for denoising, not deblurring. Use it when the problem is sensor-style noise.

The other input is tile_size (default 256, range 64–512, step 64): the image is processed in tiles so the model doesn't blow past your VRAM. Smaller tiles = less memory but more seams and slower overall. The single output is the restored image, same dimensions as the input - this is restoration, not upscaling.

What it's good at (and isn't)

Where this node shines: cleaning up motion-blurred screenshots of anime, rescuing a frame from a low-quality video rip, reducing the blocky compression artifacts that cany an upscale pass sometimes preserves. The author's own note is the honest one - NAFNet can struggle with Gaussian noise, which is the "everything is slightly smeared with white fuzz" look. That's more SCUNet's job (also in this pack). So the rough split: blur → NAFNet, grain/noise → SCUNet, and if the image has both, try SCUNet first since over-deblurring a noisy image just bakes the noise in.

A couple of things that trip people up. Restoration models don't invent crisp detail from nothing - if a face was already a 20-pixel smear, this will clean the smear, not recover the face (that's what a generative upscaler does, at the cost of hallucinating features). And tile seams: if you see faint gridlines, raise tile_size to 384 or 512 rather than fighting it with a blur afterward.

Install & gotchas

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

Restart ComfyUI. This pack uses the newer V3 node API, so ComfyUI 0.25.0+ is required or the nodes won't register. The NAFNet weights download from HuggingFace Hub on first run (cached in ~/.cache/huggingface/hub/), so the first execution is slow - and it'll fail entirely if you're offline. Also worth knowing: like every image-to-image node in this pack, it shows a live preview in the node, so you can A/B the three modes without running the whole workflow.

Categoryimgutils/restore

Inputs (3)

NameTypeDefaultDescription
imageIMAGEInput image to restore/deblur.
modeCOMBOREDSNAFNet model variant: REDS, GoPro, or SIDD.
tile_sizeINT25664–512Processing tile size.

Outputs (1)

NameTypeDescription
imageIMAGE