Unveiling the Past: Transforming Ancient Paintings into Hyper-Realistic Photos

CN
ComfyUI.org
2025-04-09 12:56:30

1. Workflow Overview

m99gmbwl96hfg5ycqlab4b423333ad54620b487582757b0785994973d5c0146e17f61df022f19c3fd96.gif

This workflow transforms ancient paintings/portraits into hyper-realistic photos using SDXL models and multi-ControlNet guidance (OpenPose, Canny, Depth, Tile), achieving lifelike reconstruction of historical figures.

2. Core Models

Model Name

Description

NightVision XL Photorealistic

SDXL-based model optimized for portraits and ancient-style figures.

TTPLanet_SDXL_Controlnet_Tile_Realistic_v1

Enhances fabric and background textures.

xinsir_controlnet-openpose-sdxl-1.0

Extracts poses from paintings for natural posture.

xinsir_controlnet-canny-sdxl_V2

Preserves facial/garment edges to avoid distortions.

xinsir_controlnet_depth_sdxl_1.0

Adds 3D depth perception.

3. Key Nodes & Installation

  • WD14Tagger|pysssss

    • Function: Auto-generates prompts (e.g., "Hanfu, classical hairstyle").

    • Install: Install ComfyUI-WD14-Tagger via ComfyUI Manager.

  • ControlNetApplyAdvanced ×4

    • Function: Applies Tile/OpenPose/Canny/Depth with weights 0.3, 0.2, 0.5, 0.2.

    • Dependency: Download ControlNet models to models/controlnet.

  • CR Text Input Switch

    • Function: Toggles between auto-generated (WD14Tagger) and manual prompts (e.g., "Ancient Chinese man, black hair, Hanfu").

  • JjkText

    • Function: Provides preset prompt templates (gender-specific) for quick use.

4. Workflow Structure

Group Name

Description

Input Image

Load ancient painting (e.g., 360截图...jpg), resolution ≥1024x1536.

Prompt Engine

Auto-captioning or manual input (supports bilingual prompts).

ControlNet Stack

Four ControlNets process texture→pose→edges→depth sequentially.

SDXL Generation

Uses dpmpp_2m sampler, 30 steps, CFG=6, outputs 1024x1536 HD image.

Output

Saves as PNG with metadata.

5. Inputs & Outputs

  • Inputs:

    • Ancient painting (JPG/PNG).

    • Optional prompts (auto-generated if empty).

    • Resolution (default: 1024x1536).

  • Output:

    • Realistic portrait with context-aware background (e.g., blank or classical).

6. Notes

  • VRAM: ≥16GB GPU recommended (e.g., RTX 4080); reduce resolution or disable ControlNets if OOM occurs.

  • Painting Adaptation:

    • Add manual prompts for complex details (e.g., "embroidered dragon pattern").

    • Enable Face Detailer for blurry faces.

  • Troubleshooting:

    • Increase Canny weight to 0.6 if limbs are distorted.

    • Check VAE is BakedVAE if colors are unnatural.