Transform Your E-commerce Business with AI-Driven Glasses Design and Synthesis Workflow

CN
ComfyUI.org
2025-05-22 08:28:20

1. Workflow Overview

maz3wzzodfv7dfdb6ml6170fdad1957cf4c343dc58e40c7e2539f764c3aeacd4ee70fba63f7adfadeba.png

This workflow specializes in e-commerce glasses model generation with:

  • Multi-angle portrait synthesis from reference glasses image

  • Dual-ControlNet architecture for precise glasses positioning

  • Expression fine-tuning and HD refinement
    Core technologies:

    • AWPortrait FL_bf16: Professional portrait model

    • RealPortrait-Glasses_v1.0 LoRA: Glasses adaptation

    • DepthAnything+DWPreprocessor: Dual-ControlNet

2. Key Components

Component

Functionality

Installation

AWPortrait FL_bf16

HD portrait model (1536x1536)

Manual download from HuggingFace

Janus-Pro-1B

Auto-prompt generation

Install Janus-Pro via ComfyUI Manager

Dual-ControlNet

DepthAnything + DWPreprocessor dual constraints

Requires ControlNet-Union-Pro-InstantX model

3. Critical Nodes

  • Dual-ControlNet Setup:(Python)

    # ControlNet1 (Depth)
    "AIO_Preprocessor": "DepthAnythingPreprocessor"
    "ControlNetApplyAdvanced": [0.4, 0, 0.8]  # strength/start/end
    
    # ControlNet2 (Edge)
    "AIO_Preprocessor": "DWPreprocessor"
    "ControlNetApplyAdvanced": [0.8, 0, 0.8]
  • LoRA Configuration:(Python)

    "LoraLoader": ["RealPortrait-Glasses_v1.0", 0.6, 1]  # model/strength/CLIP_strength

4. Workflow Architecture

maz401dp2x4rx3j2z4wimage.png
graph TB
  A[Group1: Base Model Generation] --> B[Group2: Head Pose Adjustment]
  A --> C[Output Preview]
  • Group1 (Green):

    • Input: Glasses reference (04.png)

    • Process:

      1. JanusProDescribeImage auto-prompting

      2. Dual-ControlNet processing

      3. AWPortrait+LoRA rendering

    • Output: 1536x1536 base image

  • Group2 (Blue):

    • ExpressionEditor for head rotation:(Python)

      widgets_values = [0,-10.5,0,0,0,0,0,0,0,0,0,0,1,1,"OnlyExpression",1.7]
      # -10.5° Y-axis tilt

5. I/O Specifications

  • Required Inputs:

    • LoadImage: Glasses reference (PNG with transparency)

    • Text: Base prompt (e.g. "professional 8K photo")

  • Optional:

    • KSampler: seed=776058480007604, steps=30, cfg=1

    • ExpressionEditor: 23 facial parameters

  • Outputs:

    • Multi-angle portrait sequence (1536x1536 PNG)

    • Final composited preview

6. Critical Notes

  1. Hardware:

    • ≥12GB VRAM (1536x1536)

    • Launch with --medvram

  2. Model Setup:

    # ControlNet path:
    ComfyUI/models/controlnet/FLUX.1-dev-ControlNet-Union-Pro-InstantX.safetensors
  3. Troubleshooting:

    • Glasses misalignment: Adjust DWPreprocessor threshold

    • Face distortion: Reduce ControlNet strength (0.8→0.6)

    • VRAM overflow: Downscale to 1024x1024