Unlock Realistic Anime Portraits: A Comprehensive Workflow for AI Enthusiasts

CN
ComfyUI.org
2025-05-16 07:28:49

1. Workflow Overview

maqh8dupfqsiq7eracdfd695b9547fe9802b4605843919ec129ac6883e2a379be09321116d1ad6ba88.png
  • Purpose: Convert anime/2D images into photorealistic portraits with automatic face/hand refinement.

  • Core Models:

    • majicMIX realistic v7: Base photorealism model

    • ControlNet (Canny): Preserve original composition

    • UltralyticsDetector (YOLOv8): Face/body detection

    • ESRGAN_4x: Image upscaling

2. Key Nodes

Node Name

Function

Installation

FaceDetailer

Auto-refine facial features

Via ComfyUI Manager

LineArtPreprocessor

Extract line art for ControlNet

Manual install ComfyUI-LineArt

WD14Tagger

Auto-tag input image content

Install pysssss extension

DifferentialDiffusion

Detail enhancement

Download model manually

3. Workflow Structure

  • Group 1: Input Processing

    • Input: Anime image (e.g., initial_song.jpg)

    • Output: Line art + tags (blue_hair, dress, etc.)

  • Group 2: Image Generation

    • Uses ControlNet with KSamplerAdvanced (40 steps, Euler, CFG=8)

  • Group 3: Refinement

    • FaceDetailer for face/hands (manual mask editing available)

  • Group 4: Upscaling

    • 2x ESRGAN upscale to ≥2048px

4. Input/Output

  • Inputs:

    • Image: Recommended 1024x1536px

    • Negative prompt: Auto-includes (worst quality:2), lowres

  • Output: PNG portrait saved to ComfyUI/output

5. Notes

  • VRAM: ≥12GB required (peak usage during refinement)

  • Dependencies:

    • SAM model sam_vit_b_01ec64.pth in models/sam

    • Chinese prompts auto-translated via BaiduTranslateNode

  • Troubleshooting:

    • Line art failure → Adjust image contrast

    • Distorted hands → Enable Hand Repair Component group