Enhancement Options

Enhancement Options

GFPGAN, CodeFormer, GPEN, and RestoreFormer++ face enhancement.

Face enhancement is an optional post-processing step that improves the quality of swapped faces. After the face swap model replaces the source identity onto the target, an enhancement model restores facial details, corrects artifacts, and improves overall sharpness. Recaster supports multiple enhancement models with different characteristics and quality levels.

How Enhancement Works

The enhancement step runs after the face swap and operates on the swapped face region only. The pipeline flow is:

Face Swap Result
Crop Face Region
Enhancer Model
Blend with Original
Enhanced Result

The enhancement result is blended with the swap result using configurable blend and weight controls. This lets you dial in exactly how much enhancement to apply — from subtle correction to full restoration.

Enabling Enhancement

Enhancement is disabled by default. To enable it:

  • In the Quick Recast settings panel, check the Enable Enhancement checkbox
  • Select an enhancement model from the dropdown
  • Adjust the blend and weight sliders to taste

When enhancement is enabled, models marked with a lock icon require a Studio license. Free tier users can use GFPGAN variants.

Free Tier Enhancers

GFPGAN (Generative Facial Prior GAN) is a GAN-based face restoration model developed by Tencent ARC Lab. It is available in three versions on the Free tier, each improving on the last.

NameTierVariantsQualityDescription
GFPGAN 1.2Free1.2GoodOriginal GAN-based face restoration. Balanced quality and speed for general use.
GFPGAN 1.3Free1.3GoodImproved version with better detail preservation. Recommended default for Free tier.
GFPGAN 1.4Free1.4Very GoodLatest GFPGAN with best quality among Free tier enhancers. Improved eye and mouth details.

GFPGAN Details

GFPGAN works by using a pre-trained StyleGAN2 generator as a facial prior. It takes the degraded (swapped) face as input and restores it to a high-quality version while preserving the identity from the swap. Key characteristics:

  • Speed: Fast inference, minimal overhead on top of face swap
  • Eye correction: Particularly good at restoring eye details and gaze direction
  • Version differences: v1.4 has the best overall quality with improved handling of skin texture, eye details, and mouth region

Recommended Free Enhancer

For most use cases, GFPGAN 1.4 is the recommended choice on the Free tier. It provides the best quality while maintaining fast processing speed. Start with GFPGAN 1.3 if you prefer a slightly more conservative enhancement.

Studio Tier Enhancers Studio

Studio tier users have access to three additional enhancement models that represent the state of the art in face restoration. These models offer significantly higher quality than GFPGAN, especially for challenging inputs.

NameTierVariantsQualityDescription
CodeFormerStudioExcellentTransformer-based enhancement with exceptional detail recovery. Best for heavily degraded faces.
GPENStudio256, 512, 1024, 2048ExcellentProgressive enhancement network. Multiple resolutions for different quality/speed tradeoffs.
RestoreFormer++Studio++ExcellentState-of-the-art restoration architecture. Best overall quality for face restoration.

CodeFormer Studio

CodeFormer uses a transformer-based architecture with a learned codebook of facial features. It excels at recovering fine details from heavily degraded or low-resolution faces. Key strengths:

  • Detail recovery: Exceptional at restoring texture, pores, and fine facial details
  • Artifact removal: Effectively removes common face swap artifacts like blur, color shifts, and edge seams
  • Identity preservation: Better at maintaining the source identity compared to pure GAN-based approaches

GPEN Studio

GPEN (GAN Prior Embedded Network) operates at multiple resolutions for different quality and speed tradeoffs. Available in four resolution variants:

VariantResolutionSpeedBest For
GPEN-256256x256FastestQuick previews and low-resolution targets
GPEN-512512x512FastStandard definition video, web content
GPEN-10241024x1024ModerateHD video, close-up shots
GPEN-20482048x2048Slowest4K content, maximum detail restoration

RestoreFormer++ Studio

RestoreFormer++ is the latest iteration of the RestoreFormer architecture. It combines a vector-quantized codebook with multi-head attention for state-of-the-art face restoration. Key advantages:

  • Best overall quality: Consistently produces the most natural-looking restorations in comparative tests
  • Robustness: Handles extreme degradation, heavy compression artifacts, and low resolution inputs
  • Natural skin: Particularly good at producing realistic skin texture without the "plastic" look that some enhancers produce

Choosing an Enhancer

For most Studio tier users, CodeFormer is recommended as the default enhancer due to its excellent balance of quality, speed, and identity preservation. Use RestoreFormer++ for maximum quality on important shots. Use GPEN when you need resolution-specific processing.

Blend Controls

Two sliders control how the enhancement result is mixed with the face swap result:

Enhancement Blend (0 – 1)

The blend slider controls the mix between the original face swap result and the enhanced version. A value of 0 means no enhancement (pure swap result), and 1 means full enhancement.

ValueEffectUse Case
0.0No enhancement appliedA/B comparison with raw swap
0.3 – 0.5Subtle enhancement, retains swap characterWhen swap quality is already good
0.7 – 0.8Strong enhancement, recommended defaultGeneral use, best balance
1.0Full enhancement, maximum restorationHeavily degraded or low-res faces

Enhancement Weight (0 – 1)

The weight slider controls the internal strength of the enhancement model itself. A value of 1.0 applies the model at full strength, while lower values reduce the model's effect before blending. This provides finer control than the blend slider alone.

Recommended Settings

Start with Blend: 0.8 and Weight: 1.0 for most scenarios. If the result looks over-processed or "plastic," reduce the blend to 0.5-0.6. If you want maximum natural appearance with subtle improvement, try Blend: 0.3 with Weight: 1.0.

Detection Quality

Detection quality affects how accurately faces are located before both the swap and enhancement steps. Higher detection quality finds more faces and provides tighter face crops, which improves enhancement quality at the cost of speed.

SettingResolutionSpeedEnhancement Impact
Fast320px2-3x fasterAdequate for close-up faces, may miss small faces
Balanced640pxStandardBetter face crop accuracy, improved enhancement alignment
Accurate1024pxSlowerBest face detection, tightest crop for enhancement

Detection vs Enhancement Quality

Detection quality and enhancement model quality are independent settings. You can use Fast (320px) detection with a high-quality enhancer like CodeFormer, or Accurate (1024px) detection with no enhancer. The detection quality mainly affects whether faces are found and how precisely they are cropped, while the enhancer model determines restoration quality.

Model Comparison Summary

Here is a quick reference comparing all enhancement models:

ModelTierArchitectureStrengthSpeed
GFPGAN 1.4FreeGANEye/mouth detailFast
CodeFormerStudioTransformerDetail recovery, identityModerate
GPENStudioGAN (progressive)Resolution flexibilityVaries by resolution
RestoreFormer++StudioTransformer + CodebookNatural skin, robustnessModerate

Performance Considerations

Adding enhancement increases processing time by approximately 30-50% per frame compared to swap only. Here are tips for managing performance:

  • Skip for previews: When testing different swap models, disable enhancement to iterate faster. Enable it only for the final render.
  • Match model to target: Use lower GPEN resolutions (256/512) for standard definition content. There is no benefit to running GPEN-2048 on a 480p video.
  • GPU memory: Enhancement models require additional GPU memory (~1-2 GB). If you encounter out-of-memory errors, try a lower resolution GPEN variant or use GFPGAN instead.
  • Remote processing: Studio tier cloud GPUs have ample memory (24 GB) and can run any combination of swap model and enhancer without memory constraints.

Model Download

All enhancement models are downloaded from Hugging Face on first use. Download sizes are typically 60-100 MB per model. After the initial download, models are cached locally and load instantly.

Model cache locations:

  • macOS: ~/Library/Application Support/Recaster/models/
  • Windows: %APPDATA%\Recaster\models\
  • Linux: ~/.config/Recaster/models/