Nodes/Eric_Image_Processing_Nodes/Deep Image Prior (Unsupervised)
ComfyUI Node

Deep Image Prior (Unsupervised)

A denoiser that trains itself from scratch on your one image

By EricRollei·Created 9 months ago·Updated 8 months ago· 9
Deep Image Prior (Unsupervised)
  • image
  • restored_image
  • optimization_info
iterations3000
learning_rate0.010
deviceauto
show_progresstrue
early_stoppingtrue

Most "AI denoiser" nodes ship a checkpoint you download once and reuse forever. This one is different in a way that matters a lot for how you use it: there is no checkpoint. Every single time you run Deep Image Prior, it initializes a fresh CNN and optimizes it - from random weights - against your one input image, for however many iterations you tell it to. There's nothing to download, but there's also nothing fast about it. Know that going in, because it changes what this node is actually for.

The idea, and why it works without training data

Deep Image Prior is a real 2018 research result (Ulyanov, Vedaldi, Lempitsky), and the insight is genuinely clever: a convolutional network's architecture - before it has learned anything - is already biased toward producing natural-looking images rather than noise. So instead of training a network on thousands of clean/noisy image pairs and then running it on your photo, this node trains a network to reproduce only your one noisy photo, and stops before it gets good enough to reproduce the noise too. The network's structural bias does the denoising; no external data is involved at any point. That's why it's called unsupervised - there's no supervision signal beyond the image itself.

The practical consequence is that this is an optimization loop, not an inference pass. iterations is doing the same job epochs does in Noise2Void: too few and the network hasn't converged past a blurry approximation, too many and it starts reconstructing the noise it was supposed to remove (which is exactly why early_stopping exists - it watches for that point and calls a halt).

Inputs and outputs that matter

  • iterations (default 3000, range 500–10000) - the optimization budget. The default is a reasonable middle ground; drop it for a quick preview, raise it if you have iteration count to spare and want to squeeze out more.
  • learning_rate (default 0.01) - standard Adam-style learning rate for the optimization. Lower it if you see instability or oscillating results; the default works for most images.
  • early_stopping (boolean, default on) - stops the optimization once the network starts drifting toward overfitting the noise instead of just the signal. Leave this on; it's the mechanism that keeps this method from just handing you your noise back.

Outputs are restored_image and optimization_info, a string reporting the iteration budget, learning rate, device, and whether early stopping triggered.

Installing it

Through ComfyUI Manager, search Eric's Image Processing Nodes. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Image_Processing_Nodes
cd Eric_Image_Processing_Nodes
pip install -r requirements.txt

Restart ComfyUI. Nothing to download - no weights exist for this method by design - but a CUDA GPU makes a real difference here since you're running thousands of backprop steps per image rather than one forward pass. On CPU, expect this to be genuinely slow.

Where people get burned

The biggest one is simply not budgeting time for it. This isn't a "drop it in a batch of 50 images and walk away" node the way a pretrained denoiser is - every image restarts the optimization from zero, so a batch multiplies the per-image cost by your iteration count, every time. If you need denoising for a large batch fast, use NAFNet Denoise or SCUNet instead (both run a single forward pass through pretrained weights) and save Deep Image Prior for the handful of images where you want its specific behavior - it tends to do well on structured degradations (missing regions, specific corruption patterns) precisely because it isn't limited to whatever noise types a training set happened to include.

The second trap is treating iterations as a quality dial you can only turn up. Push it too high without early_stopping and you'll watch the output slowly reabsorb the noise, since a network optimized forever against a noisy target eventually just memorizes the target. If a high-iteration run looks worse than a lower one, that's what's happening - bring early_stopping back on or dial iterations down rather than up.

CategoryEric's Image Processing/Auto-Denoise

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
iterationsINT3000500–10000
learning_rateFLOAT0.0100.001–0.1
deviceCOMBOauto3 options: auto, cpu, cuda
show_progressoptBOOLEANtrue
early_stoppingoptBOOLEANtrue

Outputs (2)

NameTypeDescription
restored_imageIMAGE
optimization_infoSTRING