NAFNet Load Model
The dropdown that decides what your restore can do
- model
NAFNet Load Model is the node beginners skip and then get confused. The pack ships quick buttons - Denoise (SIDD) and Deblur (GoPro) - that pick a model for you, so it's easy to never touch the loader. But that's exactly the point of it: the loader is the only way to tell NAFNet Restore which model to run, and that includes models the quick buttons will never touch.
The entire interface is one dropdown. That's it. Seven checkpoints, all sitting in the pack's models/ folder:
- NAFNet-SIDD-width32/64 - denoising (smartphone/sensor noise)
- NAFNet-GoPro-width32/64 - motion-blur deblurring
- NAFNet-REDS-width64 - deblurring for video frames
- NAFSSR-L_2x / 4x - stereo super-resolution weights
One output, named model, and it wires straight into NAFNet Restore. Loader → Restore → done.
When you'd actually reach for it
Three cases. First, you want REDS: the width64 video-deblur checkpoint that the convenience nodes never load. Second, you want the tiled workflow - loader plus Restore with a real tile_size - because that's the combo that handles images larger than ~1024×1024 without blowing up VRAM. Third, you're iterating: swap the model name, rerun, and the same graph does a different job. The quick buttons lock one model per node; the loader doesn't.
If all you need is "make my grainy photo clean," skip this node and use NAFNet Denoise directly. The loader is for when the one-click path isn't flexible enough.
How it works
The dropdown isn't hardcoded - the loader scans the pack's models/ directory and lists every .pth it finds. So what you see is literally what's on disk, and if models are missing you get No models found - download from NAFNet repo instead of choices. Pick a file and it builds the matching architecture from a hardcoded config table (width, encoder/decoder block layout, and the dual-stream NAFSSR variant for stereo weights), then loads the state dict with strict=True. A truncated or wrongly-named checkpoint errors loudly rather than silently producing garbage, which is more than some loaders bother with.
Note it loads the model into VRAM the moment the graph runs - cuda if available, CPU fallback otherwise. On a CPU-only box the model itself loads fine, but the actual restore will crawl.
Install
Through ComfyUI Manager, search "NAFNet" or "comfyui-nafnet" and hit install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/marduk191/ComfyUI-NAFNet.git
cd ComfyUI-NAFNet
pip install -r requirements.txt
Then restart ComfyUI. Dependencies are torch, torchvision, numpy and gdown - you already have the first three via ComfyUI itself.
The gotcha that bites everyone
The ~1.3 GB of models ship through Git LFS. If Git LFS isn't installed on your machine, the clone drops down tiny ~130-byte pointer files instead of the real weights, and the loader's dropdown goes empty (or loads fail with a file-not-found). Two fixes:
git lfs install && git lfs pull
# or, skip LFS entirely:
python download_models.py
The downloader pulls from Google Drive via gdown and is the same fallback the README points to. Do this once, then the loader behaves.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 7 options: NAFSSR-L_4x.pth, NAFNet-GoPro-width32.pth, NAFNet-SIDD-width32.pth, NAFNet-GoPro-width64.pth, NAFSSR-L_2x.pth, NAFNet-SIDD-width64.pth, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | NAFNET_MODEL | — |