Transform Portraits into 3D Cartoon Masterpieces with AI

CN
ComfyUI.org
2025-04-22 13:03:59

1. Workflow Overview

m9sinakx1vevls3gb9u49c593e3aec2cdc1906cc150af7ff60bfe090a699c2eb60057678e6d00568e2b.jpg

This workflow transforms real-life portraits into 3D cartoon-style images with:

  • Facial Feature Preservation: Via PulidFlux technology.

  • Style Transfer: Uses LoRA models (e.g., miluo_cute_3D_cartoon).

  • Upscaling: Optional SUPIR super-resolution (4K).

Core Models:

Model Name

Function

Source

miluo-flux-pro

Base model (auto-config)

LiblibAI Community

pulid_flux_v0.9.0

Facial feature retention

Custom Plugin

SUPIR-v0F

4K upscaling

GitHub


2. Key Nodes & Installation

Critical Nodes:

  1. PulidFluxModelLoader

    • Purpose: Loads facial feature model (pulid_flux).

    • Install: Install PulidFlux plugin via ComfyUI Manager; place models in models/pulid_flux.

  2. ApplyPulidFlux

    • Purpose: Merges input face features into generation.

    • Inputs: Source image + FACEANALYSIS data.

  3. SUPIR_Upscale

    • Purpose: 4K upscaling (disabled by default).

    • Install: Clone ComfyUI-SUPIR from GitHub.


3. Workflow Structure

Group 1: Base Model Zone

  • Inputs:

    • Base model: miluo-flux-pro.

    • LoRA: miluo_cute_3D_cartoon (strength 0.6).

  • Output: Cartoon-style model.

Group 2: IPA (Facial Processing)

  • Input: Upload portrait via LoadImage (clear face required).

  • Process:

    • PulidFluxInsightFaceLoader: Detects facial landmarks.

    • ImageResize+: Resizes to 1024x1024.

Group 3: Sampling Zone

  • Parameters:

    • Sampler: Euler (20 steps).

    • Prompt: pixar style, cute Chinese girl (customizable).

  • Output: Cartoon latent result.

Group 4: Output & Upscaling

  • Default Output: VAE-decoded image (768x1248).

  • Optional Upscale: Enable SUPIR_Upscale for 4K.


4. Inputs & Outputs

Input Parameters:(json

{
  "image": "Portrait (clear face required)",  
  "prompt": "pixar style, Asian little girl, flower background",  
  "negative_prompt": "low quality, blurry"  
}

Output:

  • Cartoon image: /ComfyUI/output/xxxx.png.

  • Upscaled image (optional): /ComfyUI/output/xxxx_upscaled.png.


5. Notes

  1. Model Dependencies:

    • Download miluo-flux-pro (~7GB) and pulid_flux plugin.

    • Missing files trigger Model not found.

  2. Optimization:

    • VRAM ≥12GB for base workflow; ≥16GB for upscaling.

    • Disable unused Groups (e.g., upscale) to save resources.

  3. Troubleshooting:

    • Distorted faces: Ensure input image has a clear, front-facing face.

    • Style mismatch: Adjust LoRA strength (0.3~0.7).