FacefusionField Guide

Facefusion Field Guide

Face swapping,
tuned to your hardware.

A practical, source-grounded walkthrough of the Facefusion face-swapping engine. Pick a preset, preview the flags, then dig into the guide when you want to understand *why* each number matters. Everything here is tied back to the actual repository so you can verify it in your installed version.

Grounded in source

Models, flags, providers and choices on this site come from the Facefusion repository. Where a default or supported set has changed between releases it is marked version-dependent - confirm exact values for your build with ff-run --help or the linked source.

github.com/facefusion/facefusion

Presets

Start from a tuned combination, then adjust. Every flag below is real.

Fast & Clean

Most users, most clips, first render.

Provider
cuda· Switch to coreml/directml/openvino per your hardware
Swapper
inswapper_128
Enhancer
codeformer · blend 0.8 · weight 0.5
Detector
scrfd · 512x512 · score 0.5 · angles 0,90,180,270
Landmarker
2dfan4 · score 0.5
Mask
occlusion · blur 0.3
Encode
libx264 · CRF 18 · veryfast

Command

Fast & Cleanbash
ff-run --execution-providers cuda \
  --processors face_swapper,face_enhancer \
  --face-swapper-model inswapper_128 \
  --face-enhancer-model codeformer \
  --face-enhancer-blend 0.8 --face-enhancer-weight 0.5 \
  --face-mask-types occlusion --face-mask-blur 0.3 \
  --face-detector-model scrfd --face-detector-size 512x512 \
  --face-landmarker-model 2dfan4 \
  --output-video-codec libx264 --output-video-quality 18 \
  --output-video-preset veryfast \
  --source <source> --target <target> --output <out>

Not source defaults

These blends, sizes and scores are tuned starting points, not the program's defaults. The exact default for each flag (and even which choices it accepts) depends on your release and GPU, so treat the numbers as a launch pad and confirm with ff-run --help.

The pipeline, in four stages

Walk each stage, then see the flags that drive it.

Source & target alignment

Choose a clean source identity and pick which target faces to swap. Set recognizer threshold to restrict targets.

  • --source / --targetReference identity image(s) and the target clip to swap.
  • --face-selectorWhich target faces to work on (by order, age/gender, or a reference face).
  • --face-recognizer-thresholdCosine distance cutoff for matching a target face to the identity (default ~0.4).

A single clean, well-lit source face gives the strongest identity match.

Processors

Swap, enhance, lip-sync, restore

Model comparison

Swapper & enhancer cheat sheet

Parameter reference

Searchable flags by category