Unlock Professional Child ID Photos with AI-Powered Workflow

CN
ComfyUI.org
2025-05-15 05:10:53

1. Workflow Overview

maowvfcfwn1nxh7dhxf42ac89fb8e6579bb734cb8c85245c2c9928d2abd42b97f64c2ed28c1f1cdc9a.png

This workflow generates high-quality child ID photos by combining face detection, style transfer, and LoRA fine-tuning. It supports multiple clothing templates and background options, ideal for school or passport photos.

2. Core Models

  • Main Model: 基础算法_F.1

    • Function: Base image generation with portrait optimization.

  • LoRA Model: 儿童证件照 | 人像摄影系列_v1.0

    • Function: Enhances child-specific features (skin tone, expressions).

  • PulidFlux Model: pulid_flux_v0.9.1.safetensors

    • Function: Improves face similarity and detail retention.

3. Key Nodes

  1. LoadImage

    • Role: Loads input images (e.g., casual photos) and auto-crops faces.

  2. AutoCropFaces

    • Role: Crops faces to 1:1 ratio (default) for ID photo standards.

  3. ApplyPulidFlux

    • Role: Adjusts face similarity weight (default 0.6).

  4. LoraLoader

    • Role: Applies child portrait LoRA at strength 1.

  5. CLIPTextEncode

    • Role: Inputs preset prompts (e.g., "Asian boy, white shirt, plain background").

  6. VAEDecode

    • Role: Renders final image at 768x1024 resolution.

4. Workflow Structure (Groups)

  • Preset Group:

    • Offers 4 prompt templates (e.g., school uniform, casual wear).

  • Face Crop Group:

    • Uses AutoCropFaces with params like scale 1.5, padding 0.45.

  • Generation Group:

    • Includes sampler (euler, 30 steps), VAE decode, and image save.

5. Inputs & Outputs

  • Inputs:

    • Child photo (.jpg/.png), preferably frontal face.

    • Optional prompt templates (e.g., Template 1: School uniform).

  • Output:

    • Standard ID photo (768x1024, white background) saved as .png.

6. Notes

  1. Dependencies:

    • Download pulid_flux_v0.9.1.safetensors and LoRA to model folders.

  2. Performance:

    • GPU ≥6GB VRAM recommended. Use euler for speed/quality balance.

  3. Troubleshooting:

    • Low face similarity? Increase weight in ApplyPulidFlux (0.6~1.0).

    • Dirty background? Ensure prompts include "plain white background".