Unlock the Secrets of Old Photo Restoration: A Comprehensive Workflow

CN
ComfyUI.org
2025-06-20 08:07:45

1. Workflow Overview

mc4j13qy6moivbdn1mb1953505c884c4a26a3100bfdc640bd9634284c407356f2daa7fecef05d7c2ef6.gif

This workflow is designed for old photo restoration and enhancement, with key features:

  • Damage Repair (scratches, cracks, stains)

  • Face & Background Reconstruction (using ControlNet and Inpainting)

  • Super-Resolution & Color Restoration (based on Stable Diffusion XL and custom models).

2. Core Models

Model Name

Function

Installation

JuggernautXL V9

Base image generation model for high-res restoration.

Via ComfyUI Manager or HuggingFace

Fooocus Inpaint

Local inpainting model for damaged areas.

Manual GitHub install

DepthAnything V2

Depth estimation to preserve structure.

Via ComfyUI Manager

ControlNet Tile

Maintains image details without over-smoothing.

Download .safetensors to correct folder

3. Key Nodes

  • BOPBTL_RestoreOldPhotos: Core restoration node (scratch detection + repair).

  • VAEEncodeForInpaint: Encodes damaged images into latent space for inpainting.

  • ControlNetApplyAdvanced: Applies multiple ControlNets (e.g., OpenPose, Depth).

  • KSampler (Efficient): Optimized sampler for speed/quality balance.

Dependencies:

  • Impact Pack: Install via ComfyUI Manager (Gaussian blur masks).

  • ReActor FaceSwap: Requires inswapper_128.onnx for face swapping.

4. Workflow Structure

  • Group 1: Damage Repair

    • Input: Old photo + mask of damaged areas.

    • Output: Initial repair via BOPBTL_RestoreOldPhotos.

  • Group 2: Crack Removal

    • Uses INPAINT_ApplyFooocusInpaint for fine cracks.

  • Group 3: ControlNet Control

    • Depth/Tile models preserve composition.

  • Group 4: Face & Background Redraw

    • Face swap with ReActor + background generation via KSampler (Efficient).

5. Inputs & Outputs

  • Inputs:

    • Resolution (default 1024x1024).

    • Seed value (use -1 for random).

    • Text prompts (e.g., "1 man, formal portrait").

  • Output: Restored PNG image (with metadata).

6. Notes

  • VRAM: 12GB+ recommended (e.g., RTX 3060+).

  • Model Paths: Verify paths for juggernautXL_v9Rdphoto2Lightning.safetensors.

  • Debugging: Right-click nodes to test individually ("Toggle Queue").