Nodes/ComfyUI Old Photo Restoration/Global Restoration with Scratch Processing
ComfyUI Node

Global Restoration with Scratch Processing

Global Restoration for photos with actual scratches and tears

By Haoming02·Created 2 years ago·Updated about a year ago· 66
Global Restoration with Scratch Processing
  • image
  • IMAGE
hrfalse
gpu_id0

Global Restoration with Scratch Processing is Stage1's sibling for photos that are actually torn up - the ones with scratches, creases, or missing chunks running through them, not just faded and soft. If your photo is just generally low quality, use plain Global Restoration (Stage1) instead; this node runs an extra scratch-detection and inpainting step on top of the same base restoration, which costs you more compute for damage that isn't there if you don't need it.

It's part of Haoming02's ComfyUI Old Photo Restoration pack, a native port of Bringing-Old-Photos-Back-to-Life (the 2020 Microsoft Research paper on this exact problem). Same author who maintains Forge Classic/Neo in the WebUI world - this isn't a drive-by port; he ported the original algorithm to Automatic1111 first, back in 2023, then to ComfyUI in 2024, and the launch reception was solid: people specifically liked how much more streamlined the node setup was compared to the other ComfyUI port of the same paper floating around.

How it works

Under the hood this runs the same Global restoration network as Stage1, but first passes the image through a scratch/defect mask and repairs those regions before the general restoration pass runs. That's the mechanical difference from Stage1: detect-then-inpaint the actual damage, on top of the same fading/blur/noise correction. It's still a fixed GAN pipeline, not a diffusion model - deterministic output, no prompting, no seed.

Inputs and outputs

Three fields on this one:

  • image (IMAGE) - the scratched photo.
  • hr (BOOLEAN, default false) - runs the process with higher parameters. The README doesn't go much beyond that description; treat it as a quality-over-speed toggle and flip it on if the default pass leaves visible scratch remnants.
  • gpu_id (STRING, default "0") - set to -1 for CPU if you don't have an Nvidia GPU, or if you're getting an out-of-memory error.

Output is a single IMAGE. As with Stage1, faces usually come out softened by this pass - if the photo has faces worth preserving detail on, chain this output into Face Detection (Stage2) next.

Installing it

Via ComfyUI Manager: search "ComfyUI Old Photo Restoration," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Haoming02/comfyui-old-photo-restoration

Check for a lib_bopb2l folder in the install directory afterward; if it's missing, download backend.zip from this pack's Releases and extract it there yourself.

The checkpoints this node needs are the same ones Stage1 uses - global_checkpoints.zip, from the Releases page of the author's earlier A1111 extension (Haoming02/sd-webui-old-photo-restoration, not this repo). Extract the checkpoints folder itself into lib_bopb2l/Global/checkpoints - grabbing just the loose files inside instead of the folder is the single most common install mistake here, and it fails silently rather than telling you what's wrong.

Common issues

It's noticeably slower than plain Global Restoration. That's the scratch-detection step, and it's expected - if your photo has no actual scratches, switch to Stage1 and skip the overhead.

Out of memory. Reported by at least one user on the pack's launch thread, while others ran fine on modest VRAM (4GB, with upscaling stacked on). If you hit it, set gpu_id to -1 and take the CPU hit instead.

Scratches partially removed, background artifacts introduced. The scratch-repair step is inpainting, not magic - heavy or unusual damage patterns can confuse the mask detection. Toggling hr on sometimes helps; for genuinely severe damage, no setting here fully substitutes for a diffusion-based inpaint pass afterward.

Categoryold-photo

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
hrBOOLEANfalse
gpu_idSTRING0

Outputs (1)

NameTypeDescription
IMAGEIMAGE