| --- |
| 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 |