CodeFormer Image to Image
Input
Hint: Drag and drop image files from your computer, images from web pages, paste from clipboard (Ctrl/Cmd+V), or provide a URL. Accepted file types: jpg, jpeg, png, webp, gif, avif

Customize your input with more control.
Logs
CodeFormer Editor | [image-to-image]
CodeFormer restores degraded facial images through a transformer-based architecture that balances quality and identity preservation at $0.0021 per megapixel. Trading speed for fidelity control, you adjust the quality-identity tradeoff via a single parameter rather than accepting fixed restoration results. Built for production workflows where facial image quality directly impacts user experience, from profile photo cleanup to archival restoration.
Use Cases: Profile Photo Enhancement | Archival Photo Restoration | Low-Quality Facial Image Recovery
Performance
At $0.0021 per megapixel, CodeFormer delivers configurable facial restoration with 2x upscaling built in, approximately 476 restorations per dollar for standard 512x512 inputs on fal.
| Metric | Result | Context |
|---|---|---|
| Fidelity Control | 0.0-1.0 adjustable | Balance quality vs identity preservation per inference |
| Upscaling Factor | 2x default | Configurable up to higher resolutions with face_upscale parameter |
| Cost per Megapixel | $0.0021 | ~476 standard 512x512 restorations per $1.00 on fal |
| Face Detection | Center-only or multi-face | Optional only_center_face parameter for targeted restoration |
Configurable Quality-Identity Tradeoff
CodeFormer uses a transformer architecture with a controllable fidelity parameter; you're not locked into a single restoration approach. Standard restoration models force a fixed balance between enhancing quality and preserving facial identity. CodeFormer exposes this as an API parameter.
What this means for you:
-
Adjustable fidelity weight (0.0-1.0): Lower values prioritize photographic quality and detail enhancement, higher values preserve original facial features and identity markers, tune per use case rather than accepting model defaults
-
Selective face restoration: Process only the center face or all detected faces via the only_center_face parameter, reducing unnecessary computation when working with group photos or complex scenes
-
Built-in upscaling: 2x upscaling factor applies by default with optional face_upscale control, eliminating the need for separate upscaling steps in your pipeline
-
Alignment options: Toggle face alignment preprocessing via the aligned parameter to handle images where facial features aren't centered or standardized
Technical Specifications
| Spec | Details |
|---|---|
| Architecture | CodeFormer |
| Input Formats | JPEG, PNG, WebP via URL |
| Output Formats | PNG with preserved or enhanced resolution |
| Default Resolution | 2x input resolution (configurable via upscale_factor) |
| License | Check model page for current terms |
API Documentation | Quickstart Guide | Enterprise Pricing
How It Stacks Up
FASHN Virtual Try-On V1.5 – CodeFormer prioritizes facial restoration with configurable fidelity control for archival and profile photo workflows. FASHN specializes in garment try-on scenarios where clothing fit and appearance matter more than facial enhancement, serving e-commerce and fashion applications where product visualization drives conversion.