From Faces to Masterpieces: A Professional AI Portrait Workflow

CN
ComfyUI.org
2025-04-17 10:40:33

1. Workflow Overview

m9l8b8u0xglgb8h7dkh854da20564a69dcfc6fcf6751778243038ab433d6d5d2f2f1cf929c096e65f6d.jpg
  • Purpose:
    A professional AI portrait photography workflow integrating:

    • Face segmentation (Florence2 + SAM2).

    • Multi-ControlNet (pose + depth).

    • IPAdapter style transfer.

    • Local redraw optimization.

2. Key Nodes

  • Florence2Run: Detects faces and outputs masks/BBox.

  • Sam2Segmentation: Refines hair/clothing edges.

  • ControlNetApplySD3: Dual control (pose 0.6 + depth 1.0).

  • IPAdapterAdvanced: Blends style from reference images (strength 0.7).

  • GrowMaskWithBlur: Expands mask edges for natural blending.

3. Workflow Structure

  1. Face Detection:
    Input image → Florence2Run → BBox/mask.

  2. Matting:
    Sam2SegmentationGrowMaskWithBlur.

  3. ControlNet:
    Canny edge + depth control.

  4. IPAdapter:
    Style transfer from reference image.

  5. Generation:
    KSampler (dpmpp_sde, 20 steps).

  6. Post-Processing:
    Redraw (denoise=0.1) + comparison.

4. Inputs & Outputs

  • Inputs: Portrait image + style reference.

  • Outputs: High-res portrait (PNG) with comparison.

5. Notes

  • VRAM: ≥16GB GPU recommended.

  • Errors:

    • Check Florence2/SAM2 model paths if masks fail.

  • Optimization:

    • Reduce sampler steps or use FP16 models.