Image Restoration
Restores blurry, low-resolution photos: CodeFormer rebuilds the face nearest the center, and Real-ESRGAN doubles the whole frame before it is scaled to the upscale factor you set, up to 10.
Overview
Image Restoration is a Wiro app built on CodeFormer, the face restoration model from S-Lab at Nanyang Technological University (NeurIPS 2022). The app finds the face nearest the center of your photo, rebuilds it with CodeFormer and pastes it back into a copy of the full frame enlarged by Real-ESRGAN. Photos without a face still get enlarged.
What you can build
- A cleanup step for small or heavily compressed profile pictures.
- Sharper scans of single-person portraits and of low-resolution frames from old films.
- Bigger copies of small images, for print or as input to another model.
Inputs
- One photo, uploaded or given as a public URL. JPG, PNG and WebP files work.
- Fidelity weight, 0 to 1 (default 0.5). The CodeFormer authors say lower values tend to give a higher-quality face and higher values stay closer to the input.
- Upscale, a whole number up to 10 (default 2). It sets how many times wider and taller the result is. A photo whose shorter side is under 512 pixels is first scaled up so that side is 512, and the factor applies to that larger size.
Outputs
A single PNG. At the default factor of 2, one sample turns a blurred 942 by 622 street scene into a 1884 by 1244 image with crisp window shutters and cobblestones. Another sample, a soft, blocky 400 by 225 film still, comes back at 1820 by 1024 because of the 512-pixel step, with sharp eyes and separate strands of hair.
Recommended settings
Start at 0.5. If the restored face stops looking like the person, raise the weight; the authors' own whole-photo example uses 0.7. If a very small face still looks soft, lower it.
Limitations
- Only the face closest to the center goes through CodeFormer. Other people in a group photo are only enlarged and stay softer.
- The authors note that blending a restored face back into the full image can damage hair texture along the edge.
- Blurred lettering is not recovered. In the street sample, the shop sign turns into shapes that only resemble letters.
- Black-and-white photos stay black and white.
Safety & compliance
CodeFormer is released under the S-Lab License 1.0, which allows non-commercial use and asks anyone who needs commercial use to contact the authors. Get the consent of the people in a photo before restoring their faces.
API quick start
Run image-restoration with a single API call.
{
"inputImage": "https://your-cdn.com/input.png",
"weight": 0.5,
"upscale": 2
}curl -X POST "https://api.wiro.ai/v1/Run/wiro/image-restoration" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_WIRO_API_KEY" \
--data-binary @- <<'JSON'
{
"inputImage": "https://your-cdn.com/input.png",
"weight": 0.5,
"upscale": 2
}
JSONOther models you might like
Explore similar image generation models.


