Multi-stage pipeline · Real-ESRGAN + inpainting + GFPGAN

Repair damaged old photographs

A combined pipeline for photographs that have aged badly: cracks, scratches, stains, dust, fading, and low resolution. Three open-source models run in sequence to clean, upscale, and refine the image.

What the pipeline does

Old photographs have several kinds of damage at once. There may be physical damage (scratches, tears, water stains, foxing). There may be optical degradation (low resolution because the camera, scanner, or print was small). And the most precious part — the faces — may be soft because of all of the above. A single model rarely handles every kind of damage well, so this tool runs three:

  1. Morphological inpainting first. Classical computer-vision morphology operations identify high-frequency anomalies (thin bright or dark lines that don't fit the surrounding texture — i.e. scratches and dust) and reconstruct them from neighbouring pixels. This step happens before the neural networks, because feeding scratches into a generative model tends to produce strange artefacts.
  2. Real-ESRGAN super-resolution. A generative adversarial upscaler that adds plausible high-frequency detail while increasing resolution. It is trained on real-world degraded images, so it handles JPEG artefacts, blur, and noise as part of the upscaling rather than amplifying them. Output is typically 2× the input resolution.
  3. GFPGAN face refinement. Finally, the same face restoration model used by our standalone Face Restore tool runs on any detected faces in the upscaled image, replacing soft or low-detail face regions with sharp, photorealistic ones.

When to use the healer vs. individual tools

If your photo has only one kind of problem, use the specific tool for it. The healer is heavier and slower than the individual models because it runs all three. Use the healer when:

Use the individual tools when:

What the pipeline can and cannot fix

Realistic expectations help a lot here. The healer is good at:

It struggles with:

Suggested workflow for old family photos

  1. Scan the original at 600 DPI or higher. Don't over-process the scan; let the model see the raw degradation.
  2. If the print is heavily faded or has a colour cast, do a quick levels/curves adjustment in any image editor to restore basic contrast.
  3. Crop tightly. The healer downscales to 512px before processing, then upscales internally; a tight crop on the important part of the photo gets you the most resolution where it matters.
  4. Run the healer.
  5. If you want colour, run the result through the Photo Colorizer next.
  6. Make any final tweaks in an image editor. The healer's output is a starting point, not a deliverable.

Honesty about generative restoration

Two of the three stages in this pipeline are generative: Real-ESRGAN and GFPGAN. They invent detail. The detail is consistent with the rest of the image and looks photorealistic, but it is not detail that was present in the original print. For most family-photo use cases this is fine — the goal is to recover something that looks like the moment, not to forensically reconstruct every pixel. But for archival, journalistic, or historical work, you should disclose that AI was used.