photogen1 / README.md
stateofw's picture
Fix face enhancement and update documentation
481cc13

A newer version of the Gradio SDK is available: 6.2.0

Upgrade
metadata
title: UGC Photo Generation
emoji: πŸ“Έ
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: apache-2.0

🎨 Unified UGC Platform - Photogen1

A unified ComfyUI-powered platform for ultra-realistic UGC photo generation with face enhancement capabilities.

πŸš€ Features

  • Authentic UGC Style: Generate photos that look like real smartphone photography
  • Face Enhancement: Improve facial details using GFPGAN
  • Multiple Workflows: Portrait, Full Body, Street Photography, and FLUX styles
  • Authenticity Stack: Carefully curated models and LoRAs for maximum realism
  • Real-time Generation: GPU-accelerated ComfyUI backend

🎯 The Authenticity Stack

This platform uses a carefully selected stack of models designed to produce images that look like genuine user-generated content:

Base Models

  • RealVisXL V4.0: Foundation checkpoint for exceptional photorealism
  • SDXL VAE: Standard VAE for accurate color and light rendering

LoRA Stack (Applied in sequence)

  1. epiCRealism - Natural photographic (0.6): Creates the "phone camera" aesthetic
  2. Detail Tweaker XL v2 (0.4): Adds realistic skin texture and fabric details
  3. Film Grain Helper SDXL (0.3): Introduces authentic camera sensor noise

Face Enhancement

  • GFPGANv1.4: For face restoration and enhancement

πŸ“ Project Structure

photogen1/
β”œβ”€β”€ app.py                          # Main application
β”œβ”€β”€ requirements.txt                # Python dependencies
β”œβ”€β”€ packages.txt                    # System packages for HF Spaces
β”œβ”€β”€ setup.sh                        # Setup script (clones repos & downloads models)
β”œβ”€β”€ README.md                       # This file
β”œβ”€β”€ workflows/
β”‚   β”œβ”€β”€ organic_portrait_ugc.json  # Main UGC workflow with Authenticity Stack
β”‚   β”œβ”€β”€ organic_portrait_workflow.json
β”‚   β”œβ”€β”€ face_enhancement_workflow.json
β”‚   β”œβ”€β”€ full_body_workflow.json
β”‚   β”œβ”€β”€ street_photo_workflow.json
β”‚   └── flux_workflow.json
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ checkpoints/               # Base models
β”‚   β”œβ”€β”€ loras/                     # LoRA models  
β”‚   └── vae/                       # VAE models
└── outputs/                       # Generated images

πŸ› οΈ Setup

The application automatically:

  1. Downloads all required models on first run
  2. Clones ComfyUI and necessary custom nodes
  3. Sets up the complete environment

No manual setup required!

🎨 Optimal Settings for UGC

Pre-configured for authentic results:

  • Sampler: DPM++ 2M SDE Karras (adds organic randomness)
  • CFG Scale: 5.0 (lower values = more natural, less "AI" look)
  • Steps: 25-30 (sufficient for quality without overprocessing)

πŸ’‘ Usage Tips

For Best UGC Results

  • Use prompts that describe real scenarios: "selfie in bedroom, iPhone photo, natural light"
  • Include imperfections: "slightly messy background", "casual outfit"
  • Avoid professional terms: Skip words like "professional", "studio", "perfect"

Example Prompts

Good: "woman taking mirror selfie in bathroom, smartphone photo, morning light, no makeup, oversized t-shirt"

Avoid: "professional portrait of beautiful model, studio lighting, high quality"

πŸš€ Performance

  • T4 GPU: ~30-45 seconds per image
  • A10G GPU: ~15-20 seconds per image
  • Face enhancement: +10-15 seconds

πŸ› Troubleshooting

  • Model download fails: Check internet connection, HF Space will retry
  • OOM errors: Reduce image dimensions or batch size
  • Slow generation: Normal on free tier, upgrade to faster GPU

πŸ“„ License

Apache 2.0