Unlock Professional-Grade Portrait Editing with AI-Powered Workflow

CN
ComfyUI.org
2025-04-10 15:16:56

Automate portrait photo beautification with AI: Enhance skin, remove acne, refine hair & blur backgrounds with majicMIX, Ultralytics & SAM models. Learn how to set up this workflow in ComfyUI for stunning results.

Use Case
Portrait
Best For
Portrait
Key Nodes
FaceDetailer
VRAM
Low VRAM (≤8GB)
Reading Time
3 min
More Portrait Workflows

Workflow Overview

Automate portrait photo beautification with AI: Enhance skin, remove acne, refine hair & blur backgrounds with majicMIX, Ultralytics & SAM models. Learn how to set up this workflow in ComfyUI for stunning results.

Content type: Workflow

Primary intent: Download

Required Nodes

  • FaceDetailer

Setup Notes

  • Install the required models before opening the workflow template.
  • Recommended hardware: Low VRAM (≤8GB).

1. Workflow Overview

m9bi3mvrfz3xbbeqonub45b014d7479d0c50a58130a0d88f99533b2b535e6b2d6c8cbacde7f43e6a89c.jpg

This workflow is designed to automatically beautify portrait photos through AI models, featuring functions like skin smoothing, acne removal, hair refinement, and background blurring. It primarily uses the majicMIX realistic model for realistic-style enhancements, with Ultralytics detectors and SAM models for facial region localization and detailing.

2. Core Models

  • majicMIX realistic v2: Main model for photorealistic portraits (download to ComfyUI/models/checkpoints).

  • YOLOv8m-seg: Ultralytics segmentation model for face detection (requires comfyui-detection plugin).

  • SAM (Segment Anything Model): Meta's model for mask refinement (download sam_vit_b_01ec64.pth).

3. Key Nodes

Node Name

Function

Installation

FaceDetailer

Core node for face refinement

Built-in (requires ComfyUI-Impact-Pack)

UltralyticsDetectorProvider

Provides YOLOv8 detector

Install comfyui-detection via ComfyUI Manager

SEGSRangeFilterDetailerHook

Filters non-facial regions

Part of Impact-Pack

4. Workflow Structure

  1. Model Loading Group:

    • Input: None

    • Output: Model, CLIP, VAE

    • Nodes: CheckpointLoaderSimple

  2. Face Detection & Masking:

    • Input: Raw image

    • Output: Face BBox and masks

    • Nodes: UltralyticsDetectorProvider + SAMLoader

  3. Beautification Group:

    • Input: Image + prompts (e.g., "smooth skin, 8K")

    • Output: Enhanced image

    • Nodes: FaceDetailer + CLIPTextEncode

5. Inputs & Outputs

  • Inputs:

    • Image (e.g., 87979.jpg)

    • Positive prompt: "Smooth skin, refine, remove acne, HD"

    • Negative prompt: "Split hair, large pores"

  • Outputs: Saved image in ComfyUI folder.

6. Notes

  • Requires ≥6GB VRAM (GPU recommended).

  • Effects may be subtle; adjust prompts/parameters (e.g., denoise=0.5) manually.

  • Dependencies: ComfyUI-Impact-Pack, comfyui-detection.

FAQ