Nodes/DeepGHS_ImageRestore/DeepGHS Image Restore
ComfyUI Node

DeepGHS Image Restore

The quiet photo-restorer that won't redraw your grandpa's face

By GHOSTLXH·Created 23 days ago·Updated 23 days ago· 1
DeepGHS Image Restore
  • images
  • image
modelSCUNet-GAN
model_dir/tmp/ComfyUI/custom_nodes/DeepGHS_ImageRestore/models
tile_size0
tile_overlap0
batch_size0
silenttrue

Before you point SUPIR or SeedVR2 at that scratched-up scan from 1985, stop. There are two very different "restore" jobs in this hobby: repair the damage that's already there (noise, blur, compression, JPEG junk) and invent detail that was never captured. The big generative restorers do the second one - and in doing it they rewrite faces, which is exactly what you don't want for a family photo. DeepGHS Image Restore is the rare ComfyUI node that does the first job, and does it without hallucinating a single feature.

It's a thin wrapper over deepGHS's ONNX restoration models - NAFNet and SCUNet, the same lineage the dghs-imgutils library ships - delivered as one node under image/restore. Feed it an IMAGE, get a cleaned-up IMAGE back at the same resolution. It will not upscale; that's not the point. It's the prep step: de-blur and de-noise first, then hand the clean image to an upscaler that can't mistake your compression artifacts for detail. This is exactly the "upscaling before fixing defects bakes in artifacts" trap the upscaling guides warn about - this node is the fix-before-upscale step.

What you get for your ~100 MB

The model dropdown is the whole shop, five choices:

  • SCUNet-GAN (default) - all-round cleanup with a perceptual, looks-good-to-humans objective. ~91 MB.
  • SCUNet-PSNR - same family, tuned for the objective PSNR metric instead. Slightly less "punchy," marginally more "correct."
  • NAFNet-REDS - the authors' official general-purpose pick, but it's a bigger download (~275 MB).
  • NAFNet-GoPro - motion/defocus blur removal.
  • NAFNet-SIDD - sensor/readout noise removal.

One real gotcha, straight from the docs: NAFNet is bad at Gaussian noise - a known issue with those weights. Noisy image? Go SCUNet, don't fight it.

How it actually works

Under the hood the node calls restore_with_nafnet / restore_with_scunet from dghs-imgutils, runs them through onnxruntime, and auto-detects CUDA - GPU if onnxruntime-gpu is installed, CPU otherwise (it prints a diagnostic to the console each run). Models download from Hugging Face on first use into the node's own models/ folder, not your global HF cache, and each model loads only once per ComfyUI process. Big images get tiled inference, which is what keeps a 4K scan from nuking your VRAM.

The inputs you'll actually touch: model (above), and tile_size / batch_size if you're on a potato - a 0 means "use the model's own default" (256 for NAFNet, 128 for SCUNet). Leave tile_overlap alone, and silent just hides the progress bar. The output is a single image IMAGE tensor, same resolution as the input, alpha channel preserved for RGBA PNGs. Wire it straight into Save Image - but save as PNG, because JPEG has no alpha channel, and yes that's exactly how people "lose" transparency.

Installing it

ComfyUI Manager finds it if you search "DeepGHS" or "Restore." Manual path:

cd ComfyUI/custom_nodes
git clone https://github.com/GHOSTLXH/DeepGHS_ImageRestore

Then, in ComfyUI's own Python environment (that's python_embeded\python.exe for the Windows portable build - a very common miss):

cd D:\ComfyUI
python -m pip install -r custom_nodes\DeepGHS_ImageRestore\requirements.txt

It's just dghs-imgutils plus Pillow and numpy, so a 100–200 MB first install. Optional: uninstall onnxruntime, pip install onnxruntime-gpu (CUDA version matching your driver). Restart ComfyUI.

Where people get burned

  • First run "hangs." It's downloading the model (91–468 MB) to the console - not frozen, just patient. Downloads resume if interrupted.
  • The model_dir gotcha. The cache directory is set once per process. Change it mid-session and nothing happens - you have to restart ComfyUI first. The README calls this out explicitly, and it will quietly ignore you otherwise.
  • "Missing dependency dghs-imgutils." Run python -m pip install dghs-imgutils in ComfyUI's environment, restart.
  • CPU-only on big images is slow. Drop tile_size to ~128 and batch_size to 1, or install the GPU runtime. Out of memory? Same fix - the README notes peak memory scales with total pixels, tiling only trims per-tile overhead.

Is this pack going to set r/comfyui on fire? No - it's a niche, quiet tool, and that's fine. But for the actual job of making an old, noisy, blurry photo look like a photo again before you upscale it, it's hard to beat: cheap, no key, no API, no invented faces.

Categoryimage/restore

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
modelCOMBOSCUNet-GAN5 options: NAFNet-REDS, NAFNet-GoPro, NAFNet-SIDD, SCUNet-GAN, SCUNet-PSNR
model_dirSTRING/tmp/ComfyUI/custom_nodes/DeepGHS_ImageRestore/models
tile_sizeINT00–4096
tile_overlapINT00–4096
batch_sizeINT00–64
silentBOOLEANtrue

Outputs (1)

NameTypeDescription
imageIMAGE