Downloads · 30 days
0
DraconicDragon/NAFNet-VAE-DeGrid
NAFNet-VAE-DeGrid is a image-to-image model from DraconicDragon. Use it when you need one image transformed into another. The card lists the license as apache-2.0.
A quick and dirty NAFNet-small based image restoration model for Qwen/Wan VAE grid artifact removal/mitigation, trained with 0 experience and a lot of AI handholding. (Not trained for Qwen 2.1/Wan 2.2 VAE, doubt it'll…
Downloads · 30 days
0
Access
Public
Updated Sep 21, 2026
Repo size
471 MB
Likes
9
Public
Click a slice to open those files.
.pth234 MB · 50%
From the Hugging Face model README
A quick and dirty NAFNet-small based image restoration model for Qwen/Wan VAE grid artifact removal/mitigation, trained with 0 experience and a lot of AI handholding.
(Not trained for Qwen 2.1/Wan 2.2 VAE, doubt it'll work but you tell me)
Finetune (v1.1) - I trained a small 30k step finetune with slightly different settings and a smaller dataset where I filtered out most film grain-heavy images.
It seems to perform a somewhat noticeable amount better; And also doesn't suffer from a repetitive pattern that occurs on artifact-heavy images.
The model outputs a residual rather than the final image, so the residual needs to be added back to the original image.
Custom nodes are not required - but you need custom nodes linked below to use the model to it's full potential.
Load Upscale Model, passing it through Upscale Image (using Model), and then using Image Blend with a Float node set to -1.0 to add the residual back to the original image.
However, ComfyUI clamps the model output to the normal image range, so this mainly gives you the "Dark Pixels Mainly" behavior (see below). The positive residuals are preserved while the negative residuals are clamped away. This result is visually similar to Nyquist Notch shader.
Custom nodes:
For full control over the residual, use the ComfyUI NAFNet Residual node pack. It provides three modes:
The node pack also includes a NAFNet Residual Patch method, which patches ComfyUI to let you use the normal Load Upscale Model → Upscale Image (using Model) workflow while applying the residual automagically. The patch can use the same three modes, as well as Disabled to return to normal ComfyUI/Spandrel behavior, in case of any issues.
See the node pack README for installation and more details.
You can find images for one comparison in the assets folder. Download them and put them in your favourite image comparer or something.
Areas to look out for are:
The model was trained in FP16 with automatic mixed precision for 100k steps on my good old 3060 12GB, which took about 19-20 hours at a patch size of 256px and batch size of 8.
Dataset: The dataset consists mostly of image pairs of paintings, illustrations, and the like, with a focus on anime-oriented artworks. I don't know how it performs on realism.
Dataset image pairs:
While the model was trained on the artifacts of outputs from Qwen VAE, it seems to work with Wan 2.1 VAE outputs too, even if the outputs are slightly different.
Note that the model might perform slightly worse since it wasn't explicitly trained with Wan 2.1 VAE artifacts.
The model cannot imitate/replicate film grain (and averages/smooths/blurs it), not that it needs to be able to reproduce it, but it might struggle with generated images that would have film grain-like texture if not for the VAE grid artifacts.
Maybe I will revisit it because the dataset could definitely need many improvements which would help.
The finetune fixes most of that struggle and a repetitive pattern likely caused by that tiny extra punch of FFT loss that was there,
or the large film grain heavy portion of the full dataset
You can find PyTorch checkpoints as they came from training in the train/ subfolder:
100k steps - pretrain30k steps - finetuneTraining code (configs too, probably):