# Introduction

> Industry leading face manipulation platform.

### Preview

<figure><img src="/files/4N1XcOqFeA7RnZ4orFC2" alt=""><figcaption></figcaption></figure>

### Installation

Be aware, the [installation](https://docs.facefusion.io/installation) needs technical skills and is not recommended for beginners. In case you are not comfortable using a terminal, our [Windows Installer](http://windows-installer.facefusion.io) and [macOS Installer](http://macos-installer.facefusion.io) get you started.

{% content-ref url="/pages/8FlJQJUFfhREv2LUOc1O" %}
[Installation](/installation)
{% endcontent-ref %}

### Usage

Run the command:

```
python facefusion.py [commands] [options]

options:
  -h, --help                                      show this help message and exit
  -v, --version                                   show program's version number and exit

commands:
    run                                           run the program
    headless-run                                  run the program in headless mode
    batch-run                                     run the program in batch mode
    force-download                                force automate downloads and exit
    benchmark                                     benchmark the program
    job-list                                      list jobs by status
    job-create                                    create a drafted job
    job-submit                                    submit a drafted job to become a queued job
    job-submit-all                                submit all drafted jobs to become a queued jobs
    job-delete                                    delete a drafted, queued, failed or completed job
    job-delete-all                                delete all drafted, queued, failed and completed jobs
    job-add-step                                  add a step to a drafted job
    job-remix-step                                remix a previous step from a drafted job
    job-insert-step                               insert a step to a drafted job
    job-remove-step                               remove a step from a drafted job
    job-run                                       run a queued job
    job-run-all                                   run all queued jobs
    job-retry                                     retry a failed job
    job-retry-all                                 retry all failed jobs
```


# Changelog

### 3.8.2

* Frame enhancer model now drives the output scale in the UI
* Fix incorrect frame enhancer output for in-memory processing
* Fix broken pipeline with FFmpeg 9 after `-vsync` removal

### 3.8.1

* Introduce `cuda@12` and `cuda@13` options for the installer
* Improve installer to remove previously installed onnxruntime packages
* Fix slow image to image under CoreML when using `fp16` models
* Fix VRAM leak in inference pool for latest onnxruntime

### 3.8.0

* High-performance video manager built entirely on FFmpeg
* Add `--workflow-strategy` argument to support both memory and disk processing
* Add `--workflow-mode` argument to align with upcoming releases
* Introduce AV1 support through FFmpeg decoding and encoding
* Unlock alpha channel support via the `--temp-pixel-format` argument
* Correct color handling for high dynamic range videos
* Fix CoreML cache broken by execution provider overrides
* Fix last frame handling in the UI
* Remove `--keep-temp` argument in favor of `--workflow-strategy`

### 3.7.1

* Adjust frame distribution to restore performance
* Fix image to image workflow when using 2 processors

### 3.7.0

* Bring in the face tracker to refill faces the face detector misses
* Boost `CoreML` performance for `fp16` models
* Architectural shift to multi frame aware processors
* Reduce overhead via processor driven model loading
* Introduce `auto` mode to the face selector to match source to target
* Improve video compatibility with QuickTime under macOS
* Make the installer take a positional argument rather than `--onnxruntime`
* Remove `--system-memory-limit` argument

### 3.6.1

* Add `--ssl-no-revoke` to curl since Norton and Avast break certificates
* Fix sanitizer for multiple `int` arguments

### 3.6.0

* Add `fran` model to the age modifier
* Add `corridor_key_1024` and `corridor_key_2048` models to the background remover
* Revamp conda environment to configure `PATH` and `LD_LIBRARY_PATH` on the startup
* Introduce `--background-remover-despill-color` argument
* Rename `--background-remover-color` to `--background-remover-fill-color`
* Fix incorrect model vendors and licenses

### 3.5.4

* Introduce experimental support for the `QNN` execution provider
* Prevent invalid execution cache after onnxruntime update
* Hide `ConnectionResetError` by asyncio under Windows
* Secure `--processors`, `--ui-layouts` and `--job-id` to prevent attacks
* Remove `--insecure` from curl to enforce secure connections

### 3.5.3

* Prevent conflicts with system-wide CUDA under Windows
* Fix extraction of 16-bit video footage like `ProRes`
* Fix webcam stripe artifacts caused by resolution mismatch

### 3.5.2

* Add retry for downloads to handle weak internet connections
* Introduce optional `--force-reinstall` argument to the installer
* Fix dependency resolution by single run installation

### 3.5.1

* Fix side by side preview on images with channel mismatch
* Fix inference crash when using `--execution-devices-ids` argument

### 3.5.0

* Introduce background remover processor
* Add `--face-detector-margin` to detect face beyond the frame
* Add frame processor models `face_dat_x4` and `tghq_face_x8`
* Extend `--output-pattern` for batch-run by source and target values
* Revamp architecture to modular processors and workflows
* Support for the `mpeg` and `mxf` video format

### 3.4.2

* Fix RAM explosion on 4K footage
* Fix broken bounding box

### 3.4.1

* Remove `DirectShow` camera backend on Windows
* Fix output processing with frame enhancer
* Fix side by side preview with frame enhancer

### 3.4.0

* Introduce single pass frame processing
* Process inference on multiple execution devices
* Add side by side preview modes along with preview resolutions
* Introduce `--expression-restorer-areas` argument
* Revamp webcam experience and performance
* Reintroduce the `yunet` face detector
* Add `--voice-extractor-model` argument
* Migrate ArcFace converter to CrossFace models&#x20;
* Balance source and target using the `--face-swapper-weight` argument
* Introduce `--benchmark-mode` to select between warm and cold caches
* Introduce many for the `--face-occluder-model` argument
* Replace output resolution with relative output scale
* Add `libx264rgb` to avoid color shifts due to RGB to YUV conversion
* Add support for  the `wmv` video format
* Experimental support for `MIGraphX` execution provider
* Log model information in debug mode
* Remove `--execution-queue-count` argument
* Remove score and classifier items from the face debugger
* Fix crash on headless-run when passing invalid output path
* Fix demographic filters for mutated faces

### 3.3.2

* Fix broken Gradio dependency
* Make `hyperswap_1a_256` the default face swapper model

### 3.3.1

* Fix the face store causing the second processor to fail

### 3.3.0

* Introduce `hyperswap` models by FaceFusion Labs
* Add more deep swapper models
* Add the `ultra_sharp_2_x4` frame enhancer model
* Boost performance for high resolution processing
* Run multiple NSFW models to prevent false detection
* Use the 68-point face landmarks to create face area masking
* Control lip movements using the  `--lip-syncer-weight` argument
* Enhance read and write reliability for corrupted videos
* Introduce fallback logic for unsupported audio and video encoders
* Fix the `UDP` webcam mode
* Fix bitrate range violation for `libopus`

### 3.2.0

* Introduce `gitee` and `hf-mirror` to bypass China's great firewall
* Enhance NSFW validation using a `YOLO` powered detector
* Reduce choices to installed audio encoders and video encoders
* Introduce `--halt-on-error` for several job commands
* Improve Gradio preview for unplayable videos larger than 512 MB in size
* Make the face selector more responsive to preview changes
* Add `--output-audio-quality` and `--output-audio-volume` arguments
* Use `flac` over `aac` for the `--output-audio-encoder` default
* Extend the face occluder by the `xseg_3` model
* Automatically select the most suitable execution provider
* Enable fast prediction and model caches for CoreML
* Remove `--skip-audio` argument as muted audio yield the same
* Normalize the range of the `--reference-face-distance` argument
* Eliminate broken file format verification in Gradio
* Restore frame colorizer support for CoreML
* Prevent deep swapper and face enhancer errors when offline
* Experimental multi GPU support for OpenVINO
* Fix model size detection of the deep swapper
* Fix inference pool sharing to avoid crash while switching models
* Fix audio restoring when `--output-video-fps` is modified
* Fix progress bar while extracting frames and merging videos
* Fix `webp` and `webm` support under Windows

### 3.1.2

* Fix broken `pydantic` dependency

### 3.1.1

* Restore `fp16` fallbacks for CoreML
* Fix CUDA for the Geforce 16 series

### 3.1.0

* Support for `DeepFaceLive` models
* Fallback aware download providers
* Introduce the `hififace_256` face swapper model
* Polish age modifier processor to reduce halo effect
* Introduce batch processing via the `batch-run` command
* Provide adjustable face occluder and face parser
* Release the popular frame enhancer models
* Add progress bar for extracting and merging of videos
* Modernize the UI to align with the Gradio 5 update
* Provide an option to select the webcam device id
* Introduce `--temp-path` argument to alter temporary resources
* Add video encoder `h264_qsv` and `hevc_qsv`
* Remove obsolete `--skip-download` argument
* Enforce `libvpx-vp9` codec for `webm` processing
* Gracefully close the webcam stream on exit
* Fix inconsistent preview updates
* Fix video length issues when restoring audio
* Fix OpenVINO issue by aliasing `GPU.0` to `GPU`

### 3.0.1

* Fix broken `python-multipart` dependency

### 3.0.0

* Revamp the architecture where everything is a job
* Introduce `pixel boost` to the face swappers
* Add multi angle processing to the face detectors
* Introduce age modifier processor
* Introduce Live Portrait powered expression restorer processor
* Introduce Live Portrait powered face editor processor
* Replace face parser with `bisenet_resnet_34` model
* Release the `GHOST` face swapper models
* Release frame enhancer `real_esrgan_x8` models
* Introduce ArcFace converter models for SimSwap and GHOST
* Introduce offline first assets based on local hash validation
* Replace `gender_age` with superior `fairface` model
* Transfer `order`, `age` and `gender` to the face selector
* Support CUDA 12.4, TensorRT 10.4, OpenVINO 2024.1 and ROCm 6.2
* Provide appropriate error codes in headless mode
* Migrate the CLI to commands along with related arguments
* Introduce custom made `peppa_wutz` face landmark model
* Introduce `--face-landmark-model` argument
* Introduce `--output-audio-encoder` argument
* Add video encoder `h264_videotoolbox` and `hevc_videotoolbox`
* Change the `--face-selector-order` default to large-small
* Replace globals with a context aware inference manager
* Use audio whenever defined via source
* Tweak the UI layout and visual appearance
* Update to latest Gradio 4
* Provide a multi range slider to trim video frames
* Introduce a log level aware terminal component to the UI
* Ensure significantly more accurate benchmark results
* Drop the face detector model `yunet` due low accuracy
* Fix flicker in the face swapper `uniface` model
* Fix threading and preview crashes for ROCm and DirectML
* Fix image quality for `webp` images
* Fix the termination of `ffmpeg` processing

### 2.6.1

* Fix broken `numpy` dependency

### 2.6.0

* Introduce a standalone one-click installer for Windows
* Add the frame enhancer `clear_reality_x4` and `ultra_sharp_x4` model
* Load different `ini` files via the `--config` argument
* Introduce `--open-browser` to open browser once the program is ready
* Introduce `--execution-device-id` to select processing device
* Support for Intel Arc using the OpenVINO execution provider
* Prevent Gradio from converting videos larger than 512 MB in size
* Fix path issues on Windows related to special characters
* Fix issues when finalizing images using temporary files

### 2.5.3

* Disable Gradio Analytics to prevent version alerts

### 2.5.2

* Introduce dynamic frame colorizer sizes
* Validate `facefusion.ini` overrides to prevent crashes
* Remove GPU architecture lookup to support outdated `nvidia-smi`
* Remove `hwaccel` which surprisingly improves the FFmpeg performance
* Fix threading and preview crashes for DirectML
* Fix `--output-video-resolution` from not being applied

### 2.5.1

* Add missing `deoldify` models to the frame colorizer
* Fix over-correction by voice extractor on background audio
* Fix excessive VRAM consumption of the voice extractor
* Fix exception in `conditional_download` while model removal
* Fix stuck processing when using FFmpeg 7

### 2.5.0

* Introduce the frame colorizer using the `ddcolor` and `deoldify` model
* Extract voice from the audio to enhance the lip-syncer quality
* Experimental 5 to 68 face landmark estimation
* Add the face enhancer `gpen_bfr_1024` and `gpen_bfr_2048` model
* Add the frame enhancer `real_esrgan_x2` and `real_hatgan_x4` model
* Introduce `--force-download` to download every model at once
* Migrate the documentation and installer from venv to conda
* Full compatibility with CUDA 12 due `inswapper_128_fp16` model fix
* Fix fps boosting and lowering during video merging
* Fix crashes when using `--skip-download` when models are absent
* Fix `h264_nvenc` and `hevc_nvenc` presets mapping

### 2.4.1

* Conditional download face analyser models
* Prevent download loop when remote is unreachable
* Dynamic `concurrency_count` for ideal Gradio performance
* Monkey patch Gradio for faster preview and stream rendering
* Fix preview for audio to image

### 2.4.0

* Run multiple face detectors simultaneously
* Prevent the 68 to 5 face landmark transformation on low confidence
* Add the high performance `scrfd` face detector model
* Gracefully start and stop processing
* Introduce ONNX powered frame enhancers
* Introduce `--face-landmarker-score` argument
* Render tabs when using multiple UI layouts
* Introduce `--output-image-resolution` argument
* Add more face debugger items and refine their color theme
* Print internal statistics when `--log-level debug` is enabled
* Keep lips over the whole video once lip syncer is enabled
* Restrict resolution upscaling and fps boosting for temporary resources
* Add support for `h264_amf` and `hevc_amf` video encoders
* Change the `--output-path` behaviour and normalization
* Remove `--temp-frame-quality` argument
* Fix green line when using a target with uneven pixels
* Fix preview of lip syncer when using `--trim-frame-start`
* Fix the blank output issue for Geforce GTX 16 series

### 2.3.0

* Introduce the lip-syncer processors using `wave2lip`
* Improve face alignment with 68 to 5 face landmark transformation
* Add face swapper model `uniface_256`
* Add `yoloface` as the default face detector model
* Clear temporary resources before processing
* Add `age` and `gender` to the face debugger items
* Update installer to version specific CUDA and ROCM entries
* Improve the description of the CLI arguments
* Enforce `--output-video-resolution` after upscaling
* Reduce terminal output noise while processing

### 2.2.1

* Replace `restoreformer` with the latest `restoreformer_plus_plus` model
* Fix error when the `facefusion.ini` file is missing a section
* Fix image to image when utilizing `--video-memory-strategy tolerant`

### 2.2.0

* Significant improve the CUDA performance
* Allow default overrides through the `facefusion.ini` file
* Enable faster `inswapper_128_fp16` model as default
* Add `--video-memory-strategy` to trade VRAM usage for speed
* Add `bmp` to the `--temp-frame-format` argument
* Add compatibility with Pinokio 1.0.0
* Display the processing time in the terminal on success
* Introduce `--output-video-preset` which defaults to `veryfast`
* Introduce `--output-video-fps` argument
* Introduce `--output-video-resolution` argument
* Block the preview and webcam until models are fully downloaded
* Rename `--max-memory` to `--system-memory-limit`
* Fix gender detection due incorrect matrix transformation
* Fix render issues when toggling face debugger items repeatedly

### 2.1.3

* Fix installer option for `directml` under Windows

### 2.1.2

* Add CUDA nightly to the installer
* Refresh reference faces on processor change
* Fix rounding issues of number based CLI arguments

### 2.1.1

* Remove falsy clear reference faces in preview

### 2.1.0

* Add face occlusion masking
* Add face region masking with selectable regions
* Average source face from multiple images
* Multi processing aware reference faces
* Only process the reference with face enhancer
* Introduce `debug`, `info`, `warn` and `error` log levels
* Restore face alignment offset from retinaface
* Enforce virtual environment via installer
* Reduce the installer options according to platform
* Add `onnxruntime-rocm` support to installer
* Fix preview updates on slider release
* Fix preview updates on face reference change
* Fix similarity transformation for the face alignment

### 2.0.0

* Add `blendswap_256`, `simswap_256` and `simswap_512_unofficial` to the face swapper
* Add `gpen_bfr_256` and `restoreformer` to the face enhancer
* High performance face detector using the `retinaface` or `yunet` models
* Add ROCm and OpenVINO support to the frame enhancers
* Add support for `webp` images and `webm` videos
* Add the `best-worst` and `worst-best` to `--face-analyser-order`
* Introduce the `face_debugger` to visualize the bounding box, key points and face mask
* Introduce the `facefusion-pinokio` repository to our GitHub organization
* Introduce `--face-mask-blur` and `--face-mask-padding` arguments
* Introduce `--face-detector-size` and `--face-detector-score` arguments
* Extend face selector by `one` mode
* Remove `insightface` dependency due handcrafted frame processing
* Remove `tensorflow` and `PIL` dependencies duo handcrafted frame analysing
* Simplify progress bar to reduce performance hits
* Improve reference face UI for large amount of people
* Webcam mode `udp` and `v4l2` now with solid 25fps at 1080p
* Seamless start and stop the webcam feed
* Rename `--face-recognition` to `--face-selector-mode`
* Rename `--face-analyser-direction` to `--face-analyser-order`
* Fix output validation after processing
* Apply fixed ranges to number based CLI arguments
* Normalize the `--reference-face-distance` calculation to a 0-1 range
* Normalize the `--output-path` even without specified `--source-path`
* Set a 10 seconds timeout for download lookups

### 1.3.1

* Refine `default` and `cpu` choices for the installer

### 1.3.0

* Add high performance `fp16` version to the face swapper
* Add ONNX powered `CodeFormer`, `GFPGAN` and `GPEN` to the face enhancer
* Add `RealESRGAN_x2plus` and `RealESRNet_x4plus` to the frame enhancer
* Implement blending for the face enhancer and frame enhancer
* Enable processors to have options and CLI arguments
* Refine the UI theme to a minimal and flat design
* Enhance the `--help` and documentation with arguments grouping
* Reduce the default image and video quality to 80 percent
* Introduce a new `--torch` argument to the installer
* Improve Apple Silicon performance using the latest `onnxruntime`
* Fix video quality to compression normalization
* Fix stuck downloads caused by the Windows firewall

### 1.2.1

* Perform VRAM clearance after each processing step
* Restrict TensorFlow memory consumption to 512 MB
* Verify the model files before frame processing
* Introduce `--skip-download` to skip automated downloads
* Upgrade to the most recent `onnxruntime` version

### 1.2.0

* Establish realtime webcam performance
* Optimize reruns by caching the face analyser results
* Optimize image read performance through caching
* Resume interrupted asset and model downloads
* Allow passing `--onnxruntime` to `install.py`
* Introduce official `facefusion-colab` repository
* Remove alignments from each UI components
* Introduce checkbox group for the settings
* Set webcam resolution and fps in the UI
* Disallow empty execution providers in the UI
* Fix frame range processing on videos with audio
* Fix `CUDA` and `ROCM` Dockerfile to utilize the GPU
* Fix sorting of temp frame paths

### 1.1.0

* Installer for common and acceleration dependencies
* Built-in webcam suite that supports `udp` and `v4l2` streaming
* Dedicated `--headless` mode
* Add Docker support for ROCM
* Allow adjustment of `--output-path` via the UI
* Enhance output path normalization
* Single warm-up before starting the benchmark suite
* Ability to select runs for the benchmark suite
* Enable benchmarking with partial updates
* Implement a fully event-driven UI for super responsiveness
* Add a max memory slider to select free RAM
* Implement conditional UI based on target media type
* Introduce `--output-image-quality` option for image output
* Fix `crf` range for `libvpx` video encoder
* Fix `detect_fps` to work with different encoding

### 1.0.0

* Dynamic UI based on Gradio
* Docker support for CPU and CUDA
* Replace `--many-faces` by `--face-recognition` that takes `reference` and `many` value
* Twin support: swap multiple faces by one face reference
* Introduce `--execution-queue-count` to adjust processing per thread
* Rename `--execution-threads` to `--execution-thread-count`
* Global options direction, age and gender for face analyser
* Blur preview and processing hold when NSFW content has been detected
* Flip the quality best to worse from 0-100 to 100-0
* Trim video via `trim-frame-start` and `trim-frame-end`
* Built-in benchmark suite
* Intensive codebase refactoring


# Disclaimer

We acknowledge the unethical potential of FaceFusion and are resolutely dedicated to establishing safeguards against such misuse. This software has been engineered to abstain from processing inappropriate content such as nudity, graphic content and sensitive material.

It is important to note that we maintain a strong stance against any type of pornographic nature and do not collaborate with any websites promoting the unauthorized use of our software.

Users who seek to engage in such activities will face consequences, including being banned from our community or reported to public authorities in case of legal violations.


# Licenses

FaceFusion is distributed under the OpenRAIL-AS license. It's important to note that the assets we provide are subject to their individual licenses.

## Models

### 2DFAN4

Vendor: breadbread1984

Converter: PINTO0309

License: <mark style="color:green;">MIT</mark>

Year: 2018

### ArcFace

Vendor: InsightFace

Converter: InsightFace

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2018

### CrossFace

Vendor: FaceFusion

Converter: FaceFusion

License: <mark style="color:green;">OpenRAIL-M</mark>

Year: 2025

### BiSeNet

Vendor: yakhyo

Converter: yakhyo

License: <mark style="color:green;">MIT</mark>

Year: 2024

### BlendSwap

Vendor: mapooon

Converter: netrunner.exe

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Clear Reality

Vendor: Kim2091

Converter: Kim2091

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### CoderFormer

Vendor: sczhou

Converter: FaceFusion

License: <mark style="color:red;">S-Lab 1.0</mark>

Year: 2022

### DDColor

Vendor: piddnad

Converter: instant-high

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2023

### DeOldify

Vendor: jantic

Converter: instant-high

License: <mark style="color:green;">MIT</mark>

Year: 2022

### EDTalk

Vendor: tanshuai0219

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2024

### FairFace

Vendor: dchen236

Converter: PINTO0309

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### FAN 68/5

Vendor: FaceFusion

Converter: FaceFusion

License: <mark style="color:green;">OpenRAIL-M</mark>

Year: 2024

### GFPGAN

Vendor: TencentARC

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### GHOST

Vendor: ai-forever

Converter: netrunner.exe

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### GPEN

Vendor: yangxy

Converter: FaceFusion

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### HifiFace

Vendor: GuijiAI

Converter: Unknown

License: Unknown

Year: 2021

### HyperSwap

Vendor: FaceFusion

Converter: FaceFusion

License: <mark style="color:red;">ResearchRAIL</mark>

Year: 2025

### INSwapper

Vendor: InsightFace

Converter: FaceFusion

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Kim Vocal

Vendor: KimberleyJensen

Converter: KimberleyJensen

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Live Portrait

Vendor: KwaiVGI

Converter: FaceFusion

License: <mark style="color:green;">MIT</mark>

Year: 2024

### LSDIR

Vendor: Phhofm

Converter: Phhofm

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### NSFW 1

Vendor: EraX

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2024

### NSFW 2&#x20;

Vendor: Marqo

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2024

### NSFW 3

Vendor: Freepik

Converter: FaceFusion

License: <mark style="color:green;">MIT</mark>

Year: 2025

### **Nomos8k SC**

Vendor: Phhofm

Converter: Phhofm

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Peppa Wutz

Vendor: Unknown

Converter: instant-high

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2023

### Real ESRGAN

Vendor: xinntao

Converter: instant-high

License: <mark style="color:green;">BSD 3-Clause</mark>

Year: 2021

### Real HATGAN

Vendor: XPixelGroup

Converter: Unknown

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2023

### Real Web Photo

Vendor: Helaman

Converter: Unknown

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2024

### Realistic Rescaler

Vendor: Mutin Choler

Converter: Unknown

License: <mark style="color:green;">WTFPL</mark>

Year: 2023

### Remacri

Vendor: FoolhardyVEVO

Converter: Unknown

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### RestoreFormer

Vendor: wzhouxiff

Converter: netruner.exe

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### RetinaFace

Vendor: InsightFace

Converter: InsightFace

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2020

### SCRFD

Vendor: InsightFace

Converter: InsightFace

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### Siax

Vendor: NMKD

Converter: Unknown

License: <mark style="color:green;">WTFPL</mark>

Year: 2021

### SimSwap

Vendor: neuralchen

Converter: netrunner.exe

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2020

### SPAN Kendata

Vendor: terrainer

Converter: terrainer

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2024

### StyleGANEX

Vendor: williamyang1991

Converter: FaceFusion

License: <mark style="color:red;">S-Lab 1.0</mark>

Year: 2023

### Swin2 SR

Vendor: mv-lab

Converter: Unknown

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### Ultra Sharp

Vendor: Kim2091

Converter: Kim2091

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### Ultra Sharp 2

Vendor: Kim2091

Converter: Kim2091

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2025

### UniFace

Vendor: xc-csc101

Converter: FaceFusion

License: <mark style="color:green;">None</mark>

Year: 2022

### UVR MDXNET

Vendor: Unknown

Converter: Unknown

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Wav2Lip

Vendor: Rudrabha

Converter: FaceFusion

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2020

### XSeg

Vendor: DeepFaceLab

Converter: FaceFusion

License: <mark style="color:green;">GPL-3.0</mark>

Year: 2021

### YOLO Face

Vendor: derronqi

Converter: tamoharu

License: <mark style="color:green;">GPL-3.0</mark>

Year: 2022

### YuNet

Vendor: OpenCV

Converter: OpenCV

License: <mark style="color:green;">MIT</mark>

Year: 2023

## Examples

### Source Audio

Vendor: ElevenLabs

License: <mark style="color:green;">None</mark>

### Source Image

Vendor: ThisPersonNotExist

License: <mark style="color:green;">None</mark>

### Target Video

Vendor: Pexels

License: <mark style="color:green;">None</mark>


# Installation

### 1. Prepare Your Platform

{% content-ref url="/pages/ptDjEJiQYmfMKwnxmnC4" %}
[Linux](/installation/platform/linux)
{% endcontent-ref %}

{% content-ref url="/pages/f5VPIJhtmtQI6rHI2jW6" %}
[macOS](/installation/platform/macos)
{% endcontent-ref %}

{% content-ref url="/pages/mM490Q5CntMz0QwbTjBC" %}
[Windows](/installation/platform/windows)
{% endcontent-ref %}

### 2. Prepare Your Environment

Initialize conda for your terminal:

```
conda init --all
```

Create the environment:

```
conda create --name facefusion python=3.12 pip=25.0
```

Activate the environment:

```
conda activate facefusion
```

### 3. Install Your Accelerator

{% content-ref url="/pages/WSUlX58OkGceZcsC8ImV" %}
[Linux](/installation/accelerator/linux)
{% endcontent-ref %}

{% content-ref url="/pages/0nysjox1RHxmvx1S1abS" %}
[Windows](/installation/accelerator/windows)
{% endcontent-ref %}

### 4. Download Your Copy

Clone the repository:

```
git clone https://github.com/facefusion/facefusion
```

Ensure to enter the directory:

```
cd facefusion
```

### 5. Install The Application

{% tabs fullWidth="false" %}
{% tab title="CPU" %}

```
python install.py default
```

{% endtab %}

{% tab title="CUDA" %}

```
python install.py cuda@12
```

{% endtab %}

{% tab title="CoreML" %}

```
python install.py default
```

{% endtab %}

{% tab title="DirectML" %}

```
python install.py directml
```

{% endtab %}

{% tab title="MIGraphX" %}

```
python install.py migraphx
```

{% endtab %}

{% tab title="OpenVINO" %}

```
python install.py openvino
```

{% endtab %}
{% endtabs %}

### 6. Reload Your Environment

```
conda deactivate
```

```
conda activate facefusion
```

### 7. Done

Finally, run the program:

```
python facefusion.py run --open-browser
```


# Platform


# Linux

### GIT

```
apt install git-all
```

### cURL

```
apt install curl
```

### Conda

```
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
```

```
bash Miniconda3-latest-Linux-x86_64.sh
```

### FFmpeg

```
apt install ffmpeg
```


# macOS

### GIT

```
brew install git
```

### Conda

```
brew install miniconda
```

### FFmpeg

```
brew install ffmpeg@7.0.2
```


# Windows

### GIT

```
winget install -e --id Git.Git
```

### Conda

```
winget install -e --id Anaconda.Miniconda3 --version py312_25.1.1-2 --override "/AddToPath=1"
```

### FFmpeg

```
winget install -e --id Gyan.FFmpeg --version 7.0.2
```


# Accelerator


# Linux

### CUDA

Compatible with NVIDIA graphic cards:

```
conda install nvidia/label/cuda-12.9.1::cuda-runtime nvidia/label/cudnn-9.10.0::cudnn
```

### TensorRT

Suitable for high performance NVIDIA graphic cards:

```
pip install tensorrt==10.12.0.36 --extra-index-url https://pypi.nvidia.com
```

### ROCm

Compatible with AMD graphic cards:

```
curl --output amdgpu-install-7.2.deb https://repo.radeon.com/amdgpu-install/7.2/ubuntu/jammy/amdgpu-install_7.2.70200-1_all.deb
```

```
dpkg --install amdgpu-install-7.2.deb
```

```
conda install conda-forge::gcc=15.2.0
```

### OpenVINO

Compatible with Intel graphic cards:

```
conda install conda-forge::openvino=2025.3.0
```


# Windows

### CUDA

Compatible with NVIDIA graphic cards:

```
conda install nvidia/label/cuda-12.9.1::cuda-runtime nvidia/label/cudnn-9.10.0::cudnn
```

### TensorRT

Suitable for high performance NVIDIA graphic cards:

```
pip install tensorrt==10.12.0.36 --extra-index-url https://pypi.nvidia.com
```

### OpenVINO

Suitable for Intel Arc graphic cards:

```
conda install conda-forge::openvino=2025.3.0
```


# Usage


# CLI Commands


# General

### Run

Run the program.

Command: `run`

Arguments:

* [Paths](broken://pages/7bFVXTxgvczcotMn4ptI)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Tracker](/usage/cli-arguments/face-tracker)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Voice Extractor](/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/usage/cli-arguments/frame-distribution)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* [UIs](/usage/cli-arguments/uis)
* [Benchmark](/usage/cli-arguments/benchmark)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

### Headless Run

Run the program in headless mode.

Command: `headless-run`

Arguments:

* [Paths](broken://pages/7bFVXTxgvczcotMn4ptI)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Tracker](/usage/cli-arguments/face-tracker)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Voice Extractor](/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/usage/cli-arguments/frame-distribution)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* [Execution](/usage/cli-arguments/execution)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Memory](/usage/cli-arguments/memory)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

### Batch Run

Run the program in batch mode.

Command: `batch-run`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Temp Path](broken://pages/7bFVXTxgvczcotMn4ptI#temp-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* [Patterns](/usage/cli-arguments/patterns)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Tracker](/usage/cli-arguments/face-tracker)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Voice Extractor](/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/usage/cli-arguments/frame-distribution)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

### Force Download

Force automate downloads and exit.

Command: `force-download`

Arguments:

* [Download](/usage/cli-arguments/download)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

### Benchmark

Benchmark the program.

Command: `benchmark`

Arguments:

* Paths
  * [Temp Path](broken://pages/7bFVXTxgvczcotMn4ptI#temp-path)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Tracker](/usage/cli-arguments/face-tracker)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Voice Extractor](/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/usage/cli-arguments/frame-distribution)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* [Benchmark](/usage/cli-arguments/benchmark)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)


# Job Manager

### Job List

List jobs by status.

Command: `job-list [job_status]`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-list drafted`

### Job Create

Create a drafted job.

Command: `job-create [job_id]`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-create example`

### Job Submit

Submit a drafted job to become a queued job.

Command: `job-submit [job_id]`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-submit example`

### Job Submit All

Submit all drafted jobs to become a queued jobs.

Command: `job-submit-all`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* [Misc](/usage/cli-arguments/misc)

Example: `job-submit-all`

### Job Delete

Delete a drafted, queued, failed or completed job.

Command: `job-delete [job_id]`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-delete example`

### Job Delete All

Delete all drafted, queued, failed and completed jobs.

Command: `job-delete-all`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* [Misc](/usage/cli-arguments/misc)

Example: `job-delete-all`

### Job Add Step

Add a step to a drafted job.

Command: `job-add-step [job_id]`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
  * [Source Path](broken://pages/7bFVXTxgvczcotMn4ptI#source-paths)
  * [Target Path](broken://pages/7bFVXTxgvczcotMn4ptI#target-path)
  * [Output Path](broken://pages/7bFVXTxgvczcotMn4ptI#output-path)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-add-step example`

### Job Remix Step

Remix a previous step from a drafted job.

Command: `job-remix-step [job_id] [step_index]`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
  * [Source Path](broken://pages/7bFVXTxgvczcotMn4ptI#source-paths)
  * [Output Path](broken://pages/7bFVXTxgvczcotMn4ptI#output-path)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-remix-step example 5`

### Job Insert Step

Insert a step to a drafted job.

Command: `job-insert-step [job_id] [step_index]`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
  * [Source Path](broken://pages/7bFVXTxgvczcotMn4ptI#source-paths)
  * [Target Path](broken://pages/7bFVXTxgvczcotMn4ptI#target-path)
  * [Output Path](broken://pages/7bFVXTxgvczcotMn4ptI#output-path)
* [Face Detector](/usage/cli-arguments/face-detector)
* [Face Landmarker](/usage/cli-arguments/face-landmarker)
* [Face Selector](/usage/cli-arguments/face-selector)
* [Face Masker](/usage/cli-arguments/face-masker)
* [Frame Extraction](/usage/cli-arguments/frame-extraction)
* [Output Creation](/usage/cli-arguments/output-creation)
* [Processors](/usage/cli-arguments/processors)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-insert-step example 5`

### Job Remove Step

Remove a step from a drafted job.

Command: `job-remove-step [job_id] [step_index]`

Arguments:

* Paths
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-remove-step example 5`


# Job Runner

### Job Run

Run a queued job.

Command: `job-run [job_id]`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Temp Path](broken://pages/7bFVXTxgvczcotMn4ptI#temp-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-run example`

### Job Run All

Run all queued jobs.

Command: `job-run-all`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Temp Path](broken://pages/7bFVXTxgvczcotMn4ptI#temp-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* [Misc](/usage/cli-arguments/misc)

Example: `job-run-all`

### Job Retry

Retry a failed job.

Command: `job-retry [job_id]`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Temp Path](broken://pages/7bFVXTxgvczcotMn4ptI#temp-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* Misc
  * [Log Level](/usage/cli-arguments/misc#log-level)

Example: `job-retry example`

### Job Retry All

Retry all failed jobs.

Command: `job-retry-all`

Arguments:

* Paths
  * [Config Path](broken://pages/7bFVXTxgvczcotMn4ptI#config-path)
  * [Temp Path](broken://pages/7bFVXTxgvczcotMn4ptI#temp-path)
  * [Jobs Path](broken://pages/7bFVXTxgvczcotMn4ptI#jobs-path)
* Download
  * [Download Providers](/usage/cli-arguments/download#download-providers)
* [Execution](/usage/cli-arguments/execution)
* [Memory](/usage/cli-arguments/memory)
* [Misc](/usage/cli-arguments/misc)

Example: `job-retry-all`


# CLI Arguments


# Patterns

## CLI Arguments

### Source Pattern

Choose the image or audio pattern.

Argument: `-s/--source-pattern`

Default: `None`

Example: `--source-pattern sources\*.jpg`

### Target Pattern

Choose the image or video pattern.

Argument: `-t/--target-pattern`

Default: `None`

Example: `--target-pattern targets\*.mp4`

### Output Pattern

Specify the image or video pattern.

Argument: `-o/--output-pattern`

Default: `None`

Replacements:

* `source_name`
* `target_name`
* `target_extension`
* `index`

Example: `--output-pattern outputs\{index}.{target_extension}`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[patterns]
source_pattern = sources\*.jpg
target_pattern = targets\*.mp4
output_pattern = outputs\{index}.{target_extension}
```


# Face Detector

## CLI Arguments

### Face Detector Model

Choose the model responsible for detecting the faces.

Argument: `--face-detector-model`

Default: `yoloface`

Choices:&#x20;

* `many`
* `retinaface`
* `scrfd`
* `yoloface`

Example: `--face-detector-model retinaface`

### Face Detector Size

Specify frame size provided to the face detector.

Argument: `--face-detector-size`

Default: `640x640`

Choices:

* `160x160`
* `320x320`
* `480x480`
* `512x512`
* `640x640`
* `768x768`
* `960x960`
* `1024x1024`

Example: `--face-detector-size 320x320`

### Face Detector Margin

Apply top, right, bottom and left margin to the frame.

Argument: `--face-detector-margin`

Default: `0 0 0 0`

Example: `--face-detector-margin 10 20`

### Face Detector Angles

Specify the angles to rotate the frame before detecting faces.

Argument: `--face-detector-angles`

Default: `0`

Choices:

* `0`
* `90`
* `180`
* `270`

Example: `--face-detector-angles 0 180`

### Face Detector Score

Filter the detected faces base on the confidence score.

Argument: `--face-detector-score`

Default: `0.5`

Range: `0` to `1` at `0.05`

Example: `--face-detector-score 0.7`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_detector]
face_detector_model = retinaface
face_detector_size = 320x320
face_detector_margin = 10 20
face_detector_angles = 0 180
face_detector_score = 0.7
```


# Face Landmarker

## CLI Arguments

### Face Landmarker Model

Choose the model responsible for detecting the face landmarks.

Argument: `--face-landmarker-model`

Default: `2dfan4`

Choices:&#x20;

* `many`
* `2dfan4`
* `peppa_wutz`

Example: `--face-landmarker-model peppa_wutz`

### Face Landmarker Score

Filter the detected face landmarks base on the confidence score.

Argument: `--face-landmarker-score`

Default: `0.5`

Range: `0` to `1` at `0.05`

Example: `--face-landmarker-score 0.7`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_landmarker]
face_landmarker_model = peppa_wutz
face_landmarker_score = 0.7
```


# Face Selector

## CLI Arguments

### Face Selector Mode

Use reference based tracking or simple matching.

Argument: `--face-selector-mode`

Default: `reference`

Choices:&#x20;

* `many`
* `one`
* `reference`

Example: `--face-selector-mode one`

### Face Selector Order

Specify the order of the detected faces.

Argument: `--face-selector-order`

Default: `large-small`

Choices:&#x20;

* `left-right`
* `right-left`
* `top-bottom`
* `bottom-top`
* `small-large`
* `large-small`
* `best-worst`
* `worst-best`

Example: `--face-selector-order left-right`

### Face Selector Age Start

Filter the detected faces based the starting age.

Argument: `--face-selector-age-start`

Default: `None`

Range: `0` to `100` at `1`

Example: `--trim-frame-start 20`

### Face Selector Age End

Filter the detected faces based the ending age.

Argument: `--face-selector-age-end`

Default: `None`

Range: `0` to `100` at `1`

Example: `--trim-frame-end 40`

### Face Selector Gender

Filter the detected faces based on their gender.

Argument: `--face-selector-gender`

Default: `None`

Choices:&#x20;

* `auto`
* `male`
* `female`

Example: `--face-selector-gender male`

### Face Selector Race

Filter the detected faces based on their race.

Argument: `--face-selector-race`

Default: `None`

Choices:

* `auto`
* `white`
* `black`
* `latino`
* `asian`
* `indian`
* `arabic`

Example: `--face-selector-gender white`

### Reference Face Position

Specify the position used to create the reference face.

Argument: `--reference-face-position`

Default: `0`

Example: `--reference-face-position 1`

### Reference Face Distance

Specify the similarity between the reference face and target face.

Argument: `--reference-face-distance`

Default: `0.3`

Range: `0` to `1` at `0.05`

Example: `--reference-face-distance 0.6`

### Reference Frame Number

Specify the frame used to create the reference face.

Argument: `--reference-frame-number`

Default: `0`

Example: `--reference-frame-number 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_selector]
face_selector_mode = one
face_selector_order = left-right
face_selector_age_start = 20
face_selector_age_end = 40
face_selector_gender = male
face_selector_race = white
reference_face_position = 1
reference_face_distance = 0.6
reference_frame_number = 100
```


# Face Tracker

### Face Tracker Score

Specify the overlap score used to match the tracked faces.

Argument: `--face-tracker-score`

Default: `0.0`

Range: `0` to `0.5` at `0.05`

Example: `--face-tracker-score 0.3`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_tracker]
face_tracker_score = 0.3
```


# Face Masker

## CLI Arguments

### Face Occluder Model

Choose the model responsible for the occlusion mask.

Argument: `--face-occluder-model`

Default: `xseg_1`

Choices:&#x20;

* `many`
* `xseg_1`
* `xseg_2`
* `xseg_3`

Example: `--face-occluder-model xseg_2`

### Face Parser Model

Choose the model responsible for the region mask.

Argument: `--face-parser-model`

Default: `bisenet_resnet_34`

Choices:&#x20;

* `bisenet_resnet_18`
* `bisenet_resnet_34`

Example: `--face-parser-model bisenet_resnet_18`

### Face Mask Types

Mix and match different face mask types.

Argument: `--face-mask-types`

Default: `box`

Choices:&#x20;

* `box`
* `occlusion`
* `area`
* `region`

Example: `--face-mask-types occlusion`

### Face Mask Areas

Choose the items used for the area mask.

Argument: `--face-mask-areas`

Default: `All`

Choices:

* `upper-face`
* `lower-face`
* `mouth`

Example: `--face-mask-areas mouth`

### Face Mask Regions

Choose the items used for the region mask.

Argument: `--face-mask-regions`

Default: `All`

Choices:

* `skin`
* `left-eyebrow`
* `right-eyebrow`
* `left-eye`
* `right-eye`
* `glasses`
* `nose`
* `mouth`
* `upper-lip`
* `lower-lip`

Example: `--face-mask-regions nose`

### Face Mask Blur

Specify the degree of blur applied to the box mask.

Argument: `--face-mask-blur`

Default: `0.3`

Range: `0` to `1` at `0.05`

Example: `--face-mask-blur 0.5`

### Face Mask Padding

Apply top, right, bottom and left padding to the box mask.

Argument: `--face-mask-padding`

Default: `0 0 0 0`

Example: `--face-mask-padding 10 20`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_masker]
face_occluder_model = xseg_2
face_parser_model = bisenet_resnet_18
face_mask_types = occlusion
face_mask_areas = mouth
face_mask_regions = nose
face_mask_blur = 0.5
face_mask_padding = 10 20
```


# Voice Extractor

## CLI Arguments

### Voice Extractor Model

Choose the model responsible for extracting the voices.

Argument: `--voice-extractor-model`

Default: `kim_vocal_2`

Choices:&#x20;

* `kim_vocal_1`
* `kim_vocal_2`
* `uvr_mdxnet`

Example: `--voice-extractor-model uvr_mdxnet`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[voice_extractor]
voice_extractor_model = uvr_mdxnet
```


# Frame Extraction

## CLI Arguments

### Trim Frame Start

Specify the starting frame of the target video.

Argument: `--trim-frame-start`

Default: `None`

Example: `--trim-frame-start 100`

### Trim Frame End

Specify the ending frame of the target video.

Argument: `--trim-frame-end`

Default: `None`

Example: `--trim-frame-end 200`

### Temp Frame Format

Specify the temporary frame format.

Argument: `--temp-frame-format`

Default: `png`

Choices:

* `bmp`
* `jpeg`
* `png`
* `tiff`

Example: `--temp-frame-format bmp`

### Temp Pixel Format

Specify the temporary pixel format.

Argument: `--temp-pixel-format`

Default: `bgr24`

Example: `--temp-pixel-format bgra`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[frame_extraction]
trim_frame_start = 100
trim_frame_end = 200
temp_frame_format = bmp
temp_pixel_format = bgra
```


# Frame Distribution

### Target Frame Amount

Specify the amount of target frames forwarded to the processor.

Argument: `--target-frame-amount`

Default: `2`

Range: `0` to `5` at `10`

Example: `--target-frame-amount 10`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[frame_distribution]
target_frame_amount = 10
```


# Output Creation

## CLI Arguments

### Output Image Quality

Specify the image quality which translates to the image compression.

Argument: `--output-image-quality`

Default: `80`

Range: `0` to `100` at `1`

Example: `--output-image-quality 100`

### Output Image Scale

Specify the image scale based on the target image.

Argument: `--output-image-scale`

Default: `1.0`

Range: `0.25` to `8.0` at `0.25`

Example: `--output-image-scale 0.5`

### Output Audio Encoder

Specify the encoder used for the audio.

Argument: `--output-audio-encoder`

Default: `aac`

Choices:&#x20;

* `aac`
* `libmp3lame`
* `libopus`
* `libvorbis`
* `flac`

Example: `--output-audio-encoder libvorbis`

### Output Audio Quality

Specify the audio quality which translates to the audio compression.

Argument: `--output-audio-quality`

Default: `80`

Range: `0` to `100` at `1`

Example: `--output-audio-quality 100`

### Output Video Volume

Specify the audio volume based on the target video.

Argument: `--output-audio-volume`

Default: `100`

Range: `0` to `100` at `1`

Example: `--output-audio-volume 80`

### Output Video Encoder

Specify the encoder used for the video.

Argument: `--output-video-encoder`

Default: `libx264`

Choices:

* `libx264`
* `libx264rgb`
* `libx265`
* `libvpx-vp9`
* `h264_nvenc`
* `hevc_nvenc`
* `h264_amf`
* `hevc_amf`
* `h264_qsv`
* `hevc_qsv`
* `h264_videotoolbox`
* `hevc_videotoolbox`

Example: `--output-video-encoder libx265`

### Output Video Preset

Balance fast video processing and video file size.

Argument: `--output-video-preset`

Default: `veryfast`

Choices:

* `ultrafast`
* `superfast`
* `veryfast`
* `faster`
* `fast`
* `medium`
* `slow`
* `slower`
* `veryslow`

Example: `--output-video-preset ultrafast`

### Output Video Quality

Specify the video quality which translates to the video compression.

Argument: `--output-video-quality`

Default: `80`

Range: `0` to `100` at `1`

Example: `--output-video-quality 100`

### Output Video Scale

Specify the video scale based on the target video.

Argument: `--output-video-scale`

Default: `1.0`

Range: `0.25` to `8.0` at `0.25`

Example: `--output-video-scale 0.5`

### Output Video Fps

Specify the video fps based on the target video.

Argument: `--output-video-fps`

Default: `None`

Range: `1` to `60` at `1`

Example: `--output-video-fps 30`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[output_creation]
output_image_quality = 100
output_image_scale = 0.5
output_audio_encoder = libvorbis
output_audio_quality = 100
output_audio_volume = 80
output_video_encoder = libx265
output_video_preset = ultrafast
output_video_quality = 100
output_video_scale = 0.5
output_video_fps = 30
```


# Workflow

## CLI Arguments

### Workflow Mode

Detect or enforce the workflow mode.

Argument: `--workflow-mode`

Default: `auto`

Choices:

* `auto`
* `image-to-image`
* `image-to-video`

Example: `--workflow-mode image-to-image`

### Workflow Strategy

Process the temporary frames in memory or on disk.

Argument: `--workflow-strategy`

Default: `memory`

Choices:

* `disk`
* `memory`

Example: `--workflow-strategy disk`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[workflow]
workflow_mode = image-to-image
workflow_strategy = disk
```


# Processors

## CLI Arguments

### Processors

Load a single or multiple processors.

Argument: `--processors`

Default: `face_swapper`

Choices:

* `age_modifier`
* `expression_restorer`
* `face_debugger`
* `face_enhancer`
* `face_editor`
* `face_swapper`
* `frame_colorizer`
* `frame_enhancer`
* `lip_syncer`

Example: `--processors face_swapper face_enhancer`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
processors = face_swapper face_enhancer
```


# Age Modifier

## CLI Arguments

### Age Modifier Model

Choose the model responsible for aging the face.

Argument: `--age-modifier-model`

Default: `fran`

Choices:&#x20;

* `fran`
* `styleganex_age`

Example: `--age-modifier-model styleganex_age`

### Age Modifier Direction

Specify the direction in which the age should be modified.

Argument: `--age-modifier-direction`

Default: `0`

Range: `-100` to `100` at `1`

Example: `--age-modifier-direction 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
age_modifier_model = styleganex_age
age_modifier_direction = 100
```


# Background Remover

## CLI Arguments

### Background Remover Model

Choose the model responsible for removing the background.

Argument: `--background-remover-model`

Default: `modnet`

Choices:&#x20;

* `ben_2`
* `birefnet_general`
* `birefnet_portrait`
* `corridor_key_1024`
* `corridor_key_2048`
* `isnet_general`
* `modnet`
* `rmbg_1.4`
* `rmbg_2.0`
* `silueta`
* `u2net_cloth`
* `u2net_general`
* `u2net_human`
* `u2net_portable`

Example: `--background-remover-model rmbg_2.0`

### Background Remover Fill Color

Apply red, green, blue and alpha values to the background.

Argument: `--background-remover-fill-color`

Default: `0 0 0 0`

Example: `--background-remover-fill-color 255 0 0 255`

### Background Remover Despill Color

Remove red, green, blue and alpha values from the foreground.

Argument: `--background-remover-despill-color`

Default: `0 0 0 0`

Example: `--background-remover-despill-color 0 255 0 255`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
background_remover_model = rmbg_2.0
background_remover_fill_color = 255 0 0 255
background_remover_despill_color = 0 255 0 255
```


# Deep Swapper

## CLI Arguments

### Deep Swapper Model

Choose the model responsible for swapping the face.

Argument: `--deep-swapper-model`

Default: `iperov/elon_musk_224`

Choices:

* `druuzil`
* `edel`
* `iperov`
* `jen`
* `mats`
* `rumateus`

Example: `--deep-swapper-model iperov/jackie_chan_224`

### Deep Swapper Morph

Morph between source face and target faces.

Argument: `--deep-swapper-morph`

Default: `80`

Range: `0` to `100` at `1`

Example: `--deep-swapper-morph 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
deep_swapper_model = iperov/jackie_chan_224
deep_swapper_morph = 100
```


# Expression Restorer

## CLI Arguments

### Expression Restorer Model

Choose the model responsible for restoring the expression.

Argument: `--expression-restorer-model`

Default: `live_portrait`

Choices:

* `live_portrait`

Example: `--expression-restorer-model live_portrait`

### Expression Restorer Factor

Restore factor of expression from the target face.

Argument: `--expression-restorer-factor`

Default: `80`

Range: `0` to `100` at `1`

Example: `--expression-restorer-factor 100`

### Expression Restorer Areas

Choose the items used for the expression areas.

Argument: `--expression-restorer-areas`

Default: `All`

Choices:

* `upper-face`
* `lower-face`

Example: `--expression-restorer-areas upper-face`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
expression_restorer_model = live_portrait
expression_restorer_factor = 100
expression_restorer_areas = upper-face
```


# Face Debugger

## CLI Arguments

### Face Debugger Items

Visualize face detector and face masker related items.

Argument: `--face-debugger-items`

Default: `face-landmark-5/68` `face-mask`

Choices:

* `bounding-box`
* `face-landmark-5`
* `face-landmark-5/68`
* `face-landmark-68`
* `face-landmark-68/5`
* `face-mask`

Example: `--face-debugger-items bounding-box`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_debugger_items = bounding-box
```


# Face Editor

## CLI Arguments

### Face Editor Model

Choose the model responsible for editing the face.

Argument: `--face-editor-model`

Default: `live_portrait`

Choices:

* &#x20;`live_portrait`

Example: `--face-editor-model live_portrait`

### Face Editor Eyebrow Direction

Specify the eyebrow direction.

Argument: `--face-editor-eyebrow-direction`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eyebrow-direction 0.5`

### Face Editor Eye Gaze Horizontal

Specify the horizontal eye gaze.

Argument: `--face-editor-eye-gaze-horizontal`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eye-gaze-horizontal 0.5`

### Face Editor Eye Gaze Vertical

Specify the vertical eye gaze.

Argument: `--face-editor-eye-gaze-vertical`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eye-gaze-vertical 0.5`

### Face Editor Eye Open Ratio

Specify the ratio of eye opening.

Argument: `--face-editor-eye-open-ratio`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eye-open-ration 0.5`

### Face Editor Lip Open Ratio

Specify the ratio of lip opening.

Argument: `--face-editor-lip-open-ratio`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-lip-open-ration 0.5`

### Face Editor Mouth Grim

Specify the mouth grim.

Argument: `--face-editor-mouth-grim`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-grim 0.5`

### Face Editor Mouth Pout

Specify the mouth pout.

Argument: `--face-editor-mouth-pout`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-pout 0.5`

### Face Editor Mouth Purse

Specify the mouth purse.

Argument: `--face-editor-mouth-purse`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-purse 0.5`

### Face Editor Mouth Smile

Specify the mouth smile.

Argument: `--face-editor-mouth-smile`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-smile 0.5`

### Face Editor Mouth Position Horizontal

Specify the horizontal mouth position.

Argument: `--face-editor-mouth-position-horizontal`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-position-horizontal 0.5`

### Face Editor Mouth Position Vertical

Specify the vertical mouth position.

Argument: `--face-editor-mouth-position-vertical`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-position-vertical 0.5`

### Face Editor Head Pitch

Specify the head pitch.

Argument: `--face-editor-head-pitch`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-head-pitch 0.5`

### Face Editor Head Yaw

Specify the head yaw.

Argument: `--face-editor-head-yaw`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-head-yaw 0.5`

### Face Editor Head Roll

Specify the head roll.

Argument: `--face-editor-head-roll`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-head-roll 0.5`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_editor_model = live_portrait
face_editor_eyebrow_direction = 0.5
face_editor_eye_gaze_horizontal = 0.5
face_editor_eye_gaze_vertical = 0.5
face_editor_eye_open_ratio = 0.5
face_editor_lip_open_ratio = 0.5
face_editor_mouth_grim = 0.5
face_editor_mouth_pout = 0.5
face_editor_mouth_purse = 0.5
face_editor_mouth_smile = 0.5
face_editor_mouth_position_horizontal = 0.5
face_editor_mouth_position_vertical = 0.5
face_editor_head_pitch = 0.5
face_editor_head_yaw = 0.5
face_editor_head_roll = 0.5
```


# Face Enhancer

## CLI Arguments

### Face Enhancer Model

Choose the model responsible for enhancing the face.

Argument: `--face-enhancer-model`

Default: `gfpgan_1.4`

Choices:

* `codeformer`
* `gfpgan_1.2`
* `gfpgan_1.3`
* `gfpgan_1.4`
* `gpen_bfr_256`
* `gpen_bfr_512`
* `gpen_bfr_1024`
* `gpen_bfr_2048`
* `restoreformer_plus_plus`

Example: `--face-enhancer-model codeformer`

### Face Enhancer Blend

Blend the enhanced into the previous face.

Argument: `--face-enhancer-blend`

Default: `80`

Range: `0` to `100` at `1`

Example: `--face-enhancer-blend 100`

### Face Enhancer Weight

Specify the degree of weight applied to the face.

Argument: `--face-enhancer-weight`

Default: `0.5`

Range: `0.0` to `1.0` at `0.05`

Example: `--face-enhancer-weight 1.0`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_enhancer_model = codeformer
face_enhancer_blend = 100
face_enhancer_weight = 1.0
```


# Face Swapper

## CLI Arguments

### Face Swapper Model

Choose the model responsible for swapping the face.

Argument: `--face-swapper-model`

Default: `inswapper_128_fp16`

Choices:

* `blendswap_256`
* `ghost_1_256`
* `ghost_2_256`
* `ghost_3_256`
* `hififace_unofficial_256`
* `hyperswap_1a_256`
* `hyperswap_1b_256`
* `hyperswap_1c_256`
* `inswapper_128`
* `inswapper_128_fp16`
* `simswap_256`
* `simswap_unofficial_512`
* `uniface_256`

Example: `--face-swapper-model hyperswap_1a_256`

### Face Swapper Pixel Boost

Choose the pixel boost resolution for the face swapper.

Argument: `--face-swapper-pixel-boost`

Default: `128x128`

Choices:

* `128x128`
* `256x256`
* `384x384`
* `512x512`
* `768x768`
* `1024x1024`

Example: `--face-swapper-pixel-boost 512x512`

### Face Swapper Weight

Specify the degree of weight applied to the face.

Argument: `--face-enhancer-weight`

Default: `0.5`

Range: `0.0` to `1.0` at `0.05`

Example: `--face-swapper-weight 1.0`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_swapper_model = hyperswap_1a_256
face_swapper_pixel_boost = 512x512
face_swapper_weight = 1.0
```


# Frame Colorizer

## CLI Arguments

### Frame Colorizer Model

Choose the model responsible for colorizing the frame.

Argument: `--frame-colorizer-model`

Default: `ddcolor`

Choices:

* `ddcolor`
* `ddcolor_artistic`
* `deoldify`
* `deoldify_artistic`
* `deoldify_stable`

Example: `--frame-colorizer-model deoldify`

### Frame Colorizer Size

Specify the frame size provided to the frame colorizer.

Argument: `--frame-colorizer-size`

Default: `256x256`

Choices:

* `256x256`
* `384x384`
* `512x512`

Example: `--frame-colorizer-size 512`

### Frame Colorizer Blend

Blend the colorized into the previous frame.

Argument: `--frame-colorizer-blend`

Default: `100`

Range: `0` to `100` at `1`

Example: `--frame-colorizer-blend 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

<pre class="language-ini"><code class="lang-ini">[processors]
frame_colorizer_model = deoldify
frame_colorizer_size = 512
<strong>frame_colorizer_blend = 100
</strong></code></pre>


# Frame Enhancer

## CLI Arguments

### Frame Enhancer Model

Choose the model responsible for enhancing the frame.

Argument: `--frame-enhancer-model`

Default: `span_kendata_x4`

Choices:

* `clear_reality_x4`
* `lsdir_x4`
* `nomos8k_sc_x4`
* `real_esrgan_x2`
* `real_esrgan_x2_fp16`
* `real_esrgan_x4`
* `real_esrgan_x4_fp16`
* `real_esrgan_x8`
* `real_esrgan_x8_fp16`
* `real_hatgan_x4`
* `real_web_photo_x4`
* `realistic_rescaler_x4`
* `remacri_x4`
* `siax_x4`
* `span_kendata_x4`
* `swin2_sr_x4`
* `ultra_sharp_x4`
* `ultra_sharp_2_x4`

Example: `--frame-enhancer-model real_hatgan_x4`

### Frame Enhancer Blend

Blend the enhanced into the previous frame.

Argument: `--frame-enhancer-blend`

Default: `80`

Range: `0` to `100` at `1`

Example: `--frame-enhancer-blend 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
frame_enhancer_model = real_hatgan_x4
frame_enhancer_blend = 100
```


# Lip Syncer

## CLI Arguments

### Lip Syncer Model

Choose the model responsible for syncing the lips.

Argument: `--lip-syncer-model`

Default: `wav2lip_gan_96`

Choices:

* `edtalk_256`
* `wav2lip_96`
* `wav2lip_gan_96`

Example: `--lip-syncer-model edtalk_256`

### Lip Syncer Weight

Specify the degree of weight applied to the lips.

Argument: `--lip-syncer-weight`

Default: `0.5`

Range: `0.0` to `1.0` at `0.05`

Example: `--lip-syncer-weight 1.0`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
lip_syncer_model = edtalk_256
lip_syncer_weight = 1.0
```


# UIs

## CLI Arguments

### Open Browser

Open the browser once the program is ready.

Argument: `--open-browser`

Default: `None`

Example: `--open-browser`

### UI Layouts

Launch a single or multiple UI layouts.

Argument: `--ui-layouts`

Default: `default`

Choices:

* `benchmark`
* `default`
* `jobs`
* `webcam`

Example: `--ui-layouts default jobs`

### UI Workflow

Choose the UI workflow.

Argument: `--ui-workflow`

Default: `instant_runner`

Choices:

* `instant_runner`
* `job_runner`
* `job_manager`

Example: `--ui-workflow job_manager`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[uis]
open_browser = True
ui_layouts = default jobs
ui_workflow = job_manager
```


# Download

## CLI Arguments

### Download Providers

Download using different providers.

Argument: `--download-providers`

Default: `github huggingface`

Choices:

* `github`
* `huggingface`

Example: `--download-providers huggingface`

### Download Scope

Specify the download scope.

Argument: `--download-scope`

Default: `lite`

Choices:

* `lite`
* `full`

Example: `--download-scope full`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[download]
download_providers = huggingface
download_scope = full
```


# Benchmark

## CLI Arguments

### Benchmark Mode

Choose the benchmark mode.

Argument: `--benchmark-mode`

Default: `warm`

Choices:

* `warm`
* `cold`

Example: `--benchmark-mode cold`

### Benchmark Resolutions

Choose the resolutions for the benchmarks.

Argument: `--benchmark-resolutions`

Default: `240p`

Choices:

* `240p`
* `360p`
* `540p`
* `720p`
* `1080p`
* `1440p`
* `2160p`

Example: `--benchmark-resolutions 240p 360p`

### Benchmark Cycle Count

Specify the amount of cycles per benchmark.

Argument: `--benchmark-cycle-count`

Default: `5`

Range: `1` to `10` at `1`

Example: `--benchmark-cycle-count 10`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[benchmark]
benchmark_mode = cold
benchmark_resolutions = 240p 360p
benchmark_cycle_count = 10
```


# Execution

## CLI Arguments

### Execution Device Ids

Specify the devices used for processing.

Argument: `--execution-device-ids`

Default: `0`

Example: `--execution-device-id 0 1`

### Execution Providers

Inference using different providers.

Argument: `--execution-providers`

Default: `Auto`

Choices:

* `cpu`
* `coreml`
* `cuda`
* `directml`
* `migraphx`
* `rocm`
* `tensorrt`

Example: `--execution-providers cuda`

### Execution Thread Count

Specify the amount of parallel threads while processing.

Argument `--execution-thread-count`

Default: `4`

Range: `1` to `32` at `1`

Example: `--execution-thread-count 16`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[execution]
execution_device_ids = 0 1
execution_providers = cuda
execution_thread_count = 16
```


# Memory

## CLI Arguments

### Video Memory Strategy

Balance fast frame processing and low VRAM usage.

Argument: `--video-memory-strategy`

Default: `strict`

Choices:

* `strict`
* `moderate`
* `tolerant`

Example: `--video-memory-strategy tolerant`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[memory]
video_memory_strategy = tolerant
```


# Misc

## CLI Arguments

### Log Level

Adjust the message severity displayed in the terminal.

Argument: `--log-level`

Default: `info`

Choices:

* `error`
* `warn`
* `info`
* `debug`

Example: `--log-level debug`

### Halt On Error

Halt the program once an error occurred.

Argument: `--halt-on-error`

Default: `None`

Example: `--halt-on-error`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[misc]
log_level = debug
halt_on_error = True
```


# Deepfake Webcam

### Usage

```
python facefusion.py run --ui-layouts webcam
```

### Modes

#### Inline

Render the webcam feed within the UI.&#x20;

#### UDP

A stream at `udp://localhost:27000` can be captured by OBS.

#### V4L2

A stream at `/dev/video*` can be captured by OBS.


# Platform Benchmark

### Preview

<figure><img src="/files/Sl69uEkDS1f4Wed1RXJF" alt=""><figcaption></figcaption></figure>

### Usage

```
python facefusion.py run --ui-layouts benchmark
```


# Run With Docker

### Installation

Clone the repository:

```
git clone https://github.com/facefusion/facefusion-docker.git
```

Run the `CPU` container:

```
docker compose -f docker-compose.cpu.yml up
```

Run the `CUDA` container:

```
docker compose -f docker-compose.cuda.yml up
```

Run the `TensorRT` container:

```
docker compose -f docker-compose.tensorrt.yml up
```

Run the `ROCm` container:

```
docker compose -f docker-compose.rocm.yml up
```

### Usage

Browse the `CPU` container:

```
http://localhost:7865
```

Browse the `CUDA` container:

```
http://localhost:7870
```

Browse the `TensorRT` container:

```
http://localhost:7875
```

Browse the `ROCm` container:

```
http://localhost:7880
```


# Troubleshooting

#### Bad dependencies resolutions

Make sure to run Python 3.12 and latest version of PIP to prevent dependencies conflicts.

#### No matching distribution found for 'xxx'

Make sure to run the latest version of your operating system.

#### No module named 'xxx'

A `ModuleNotFoundError` indicates that dependencies have not been correctly installed.

#### Module 'xxx' has no attribute 'xxx'

A `AttributeError` indicates that dependencies have not been correctly installed.

#### Protobuf parsing failed

Delete the broken model from the `.assets/models` directory to enforce its re-download.

#### Cannot allocate memory

Memory exceptions during processing are usually cause when the GPU runs out of VRAM.


# macOS

#### Illegal **hardware instruction**

Don't run Python through the Rosetta emulation.

#### **Error executing model**

RAM and SWAP appears to be heavily exhausted.


# Windows

#### Upgrading to Windows 11 caused a performance hit

Turn off real-time search in Windows Defender or exclude temporary resources.

#### DLL load failed while importing cv2

The absence of the Media Feature Pack can lead to issues with OpenCV.


# Workshop


# Processor

### 1. Create

Create a new example file:

```
facefusion/processors/modules/example.py
```

### 2. Implement

Define the inputs:

```python
ExampleInputs = TypedDict('ExampleInputs',
{
	'reference_vision_frame' : VisionFrame,
	'source_faces' : List[Face],
	'target_vision_frame' : VisionFrame
})
```

Implement the hooks of the processor:

```python
from argparse import ArgumentParser

from facefusion.processors.typing import ExampleInputs

from facefusion.typing import ApplyStateItem, Args, Face, InferencePool, ProcessMode, VisionFrame


def get_inference_pool() -> InferencePool:
	pass


def clear_inference_pool() -> None:
	pass


def register_args(program : ArgumentParser) -> None:
	pass


def apply_args(args : Args, apply_state_item : ApplyStateItem) -> None:
	pass


def pre_check() -> bool:
	return True


def pre_process(mode : ProcessMode) -> bool:
	pass


def post_process() -> None:
	pass


def process_frame(inputs : ExampleInputs) -> VisionFrame:
	pass

```

### 3. Done

Finally, run the program:

```
python run.py --processors example
```


# UI Layout

### 1. Create

Create a new example file:

```
facefusion/uis/layouts/example.py
```

### 2. Implement

Implement the hooks of the UI layout:

```python
import gradio

from facefusion.uis.components import example


def pre_check() -> bool:
	return True


def render() -> gradio.Blocks:
	with gradio.Blocks() as layout:
		example.render()
	return layout


def listen() -> None:
	example.listen()


def run(ui : gradio.Blocks) -> None:
	ui.launch()
```

### 3. Done

Finally, run the program:

```
python run.py --ui-layouts example
```


# UI Component

### 1. Create

Create a new example file:

```
facefusion/uis/components/example.py
```

### 2. Implement

Implement the basics of the UI component:

```python
from typing import Optional
import gradio

from facefusion.uis.typing import Update

EXAMPLE_IMAGE : Optional[gradio.Image] = None


def render() -> None:
	global EXAMPLE_IMAGE

	EXAMPLE_IMAGE = gradio.Image()


def listen() -> None:
	EXAMPLE_IMAGE.change(update, inputs = EXAMPLE_IMAGE, outputs = EXAMPLE_IMAGE)


def update() -> Update:
	return gradio.update()
```

### 3. Done

Finally, add the component:

```python
from facefusion.uis.components import example
```


# Knowledgebase


# Face Vocabulary

### Face Analyser

> Describes the part of the software that is responsible to detect and identify faces.

### Face Reference

> Describes the snapshot of a face being used for the face matching during processing frames.

### Face Matching

> Describes the process of comparing two faces against a given threshold, called face distance.

### Face Distance

> Describes how similar two faces are.

### Face Score

> Describes the confidence of the face detection.

### Face Bouncing

> Describes the flicker between persons during processing frames as of failing face recognition.

### Face Jittering

> Describes the moving facial features during processing frames as of unstable facial landmarks.


# Error Codes

| Error Code | Description      |
| ---------- | ---------------- |
| 0          | Graceful exit    |
| 1          | Fatal exit       |
| 2          | Check failed     |
| 3          | Content declined |
| 4          | Process stopped  |


# GPU Capabilities

The list is structured according to the relative performance of individual graphics cards, with their capabilities determined by key factors such as.

* Total amount of computing cores and virtual memory
* Averaged 16-bit and 32-bit floating-point operations

### NVIDIA

<table><thead><tr><th width="378">Model</th><th>Cores</th><th>VRAM</th><th>TFLOPS</th></tr></thead><tbody><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4090.c3889">GeForce RTX 4090</a></td><td>16384</td><td>24</td><td>82,58</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4090-d.c4189">GeForce RTX 4090 D</a></td><td>14592</td><td>24</td><td>73,54</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3090-ti.c3829">GeForce RTX 3090 Ti</a></td><td>10752</td><td>24</td><td>40</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3090.c3622">GeForce RTX 3090</a></td><td>10496</td><td>24</td><td>35,58</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4080-super.c4182">GeForce RTX 4080 SUPER</a></td><td>10240</td><td>16</td><td>52,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4080.c3888">GeForce RTX 4080</a></td><td>9728</td><td>16</td><td>48,74</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3080-ti-20-gb.c3831">GeForce RTX 3080 Ti 20 GB</a></td><td>10240</td><td>20</td><td>34,1</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4070-ti-super.c4187">GeForce RTX 4070 Ti SUPER</a></td><td>8448</td><td>16</td><td>44,1</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3080-ti.c3735">GeForce RTX 3080 Ti</a></td><td>10240</td><td>12</td><td>34,1</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/titan-v-ceo-edition.c3277">TITAN V CEO Edition</a></td><td>5120</td><td>32</td><td>22,35</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4070-ti.c3950">GeForce RTX 4070 Ti</a></td><td>7680</td><td>12</td><td>40,09</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3080-12-gb.c3834">GeForce RTX 3080 12 GB</a></td><td>8960</td><td>12</td><td>30,64</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4070-super.c4186">GeForce RTX 4070 SUPER</a></td><td>7168</td><td>12</td><td>35,48</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/titan-rtx.c3311">TITAN RTX</a></td><td>4608</td><td>24</td><td>24,47</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3080.c3621">GeForce RTX 3080</a></td><td>8704</td><td>10</td><td>29,77</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4070.c3924">GeForce RTX 4070</a></td><td>5888</td><td>12</td><td>29,15</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4060-ti-16-gb.c4155">GeForce RTX 4060 Ti 16 GB</a></td><td>4352</td><td>16</td><td>22,06</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/titan-v.c3051">TITAN V</a></td><td>5120</td><td>12</td><td>22,35</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3070-ti.c3675">GeForce RTX 3070 Ti</a></td><td>6144</td><td>8</td><td>21,75</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3070-ti-8-gb-ga102.c3936">GeForce RTX 3070 Ti 8 GB GA102</a></td><td>6144</td><td>8</td><td>21,75</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2080-ti.c3305">GeForce RTX 2080 Ti</a></td><td>4352</td><td>11</td><td>20,18</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3070.c3674">GeForce RTX 3070</a></td><td>5888</td><td>8</td><td>20,31</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3070-tim.c3951">GeForce RTX 3070 TiM</a></td><td>5888</td><td>8</td><td>16,6</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4060-ti-8-gb.c3890">GeForce RTX 4060 Ti 8 GB</a></td><td>4352</td><td>8</td><td>22,06</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-ti.c3681">GeForce RTX 3060 Ti</a></td><td>4864</td><td>8</td><td>16,2</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-ti-ga103.c3872">GeForce RTX 3060 Ti GA103</a></td><td>4864</td><td>8</td><td>16,2</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-ti-gddr6x.c3935">GeForce RTX 3060 Ti GDDR6X</a></td><td>4864</td><td>8</td><td>16,2</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4060-ad106.c3891">GeForce RTX 4060 AD106</a></td><td>3840</td><td>8</td><td>19,47</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-12-gb.c3682">GeForce RTX 3060 12 GB</a></td><td>3584</td><td>12</td><td>12,74</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-12-gb-ga104.c3832">GeForce RTX 3060 12 GB GA104</a></td><td>3584</td><td>12</td><td>12,74</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2080-super.c3439">GeForce RTX 2080 SUPER</a></td><td>3072</td><td>8</td><td>16,73</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4060.c4107">GeForce RTX 4060</a></td><td>3072</td><td>8</td><td>15,11</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-8-gb.c3937">GeForce RTX 3060 8 GB</a></td><td>3584</td><td>8</td><td>12,74</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-8-gb-ga104.c4132">GeForce RTX 3060 8 GB GA104</a></td><td>3584</td><td>8</td><td>12,74</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2080.c3224">GeForce RTX 2080</a></td><td>2944</td><td>8</td><td>15,11</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3060-3840sp.c4080">GeForce RTX 3060 3840SP</a></td><td>3840</td><td>6</td><td>14,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/titan-xp.c2948">TITAN Xp</a></td><td>3840</td><td>12</td><td>6,08</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2060-12-gb.c3836">GeForce RTX 2060 12 GB</a></td><td>2176</td><td>12</td><td>10,77</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2070-super.c3440">GeForce RTX 2070 SUPER</a></td><td>2560</td><td>8</td><td>13,59</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/titan-x-pascal.c2863">TITAN X Pascal</a></td><td>3584</td><td>12</td><td>5,49</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1080-ti.c2877">GeForce GTX 1080 Ti</a></td><td>3584</td><td>11</td><td>5,67</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2070.c3252">GeForce RTX 2070</a></td><td>2304</td><td>8</td><td>11,2</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-4050.c3892">GeForce RTX 4050</a></td><td>2560</td><td>6</td><td>13,52</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3050-8-gb.c3858">GeForce RTX 3050 8 GB</a></td><td>2560</td><td>8</td><td>9,1</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3050-8-gb-ga107.c3880">GeForce RTX 3050 8 GB GA107</a></td><td>2560</td><td>8</td><td>9,1</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2060-super.c3441">GeForce RTX 2060 SUPER</a></td><td>2176</td><td>8</td><td>10,77</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3050-oem.c3915">GeForce RTX 3050 OEM</a></td><td>2304</td><td>8</td><td>8,09</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2060.c3310">GeForce RTX 2060</a></td><td>1920</td><td>6</td><td>9,68</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-2060-tu104.c3495">GeForce RTX 2060 TU104</a></td><td>1920</td><td>6</td><td>9,68</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1080.c2839">GeForce GTX 1080</a></td><td>2560</td><td>8</td><td>4,51</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1080-11gbps.c2951">GeForce GTX 1080 11Gbps</a></td><td>2560</td><td>8</td><td>4,51</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1070-ti.c3010">GeForce GTX 1070 Ti</a></td><td>2432</td><td>8</td><td>4,16</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-rtx-3050-6-gb.c4188">GeForce RTX 3050 6 GB</a></td><td>2048</td><td>6</td><td>6,02</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1660-ti.c3364">GeForce GTX 1660 Ti</a></td><td>1536</td><td>6</td><td>8,15</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1660.c3365">GeForce GTX 1660</a></td><td>1408</td><td>6</td><td>7,54</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1660-super.c3458">GeForce GTX 1660 SUPER</a></td><td>1408</td><td>6</td><td>7,54</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1070.c2840">GeForce GTX 1070</a></td><td>1920</td><td>8</td><td>3,28</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1070-gddr5x.c3343">GeForce GTX 1070 GDDR5X</a></td><td>1920</td><td>8</td><td>3,28</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1650-super.c3411">GeForce GTX 1650 SUPER</a></td><td>1280</td><td>4</td><td>6,62</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-6-gb.c2862">GeForce GTX 1060 6 GB</a></td><td>1280</td><td>6</td><td>2,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-6-gb-9gbps.c2952">GeForce GTX 1060 6 GB 9Gbps</a></td><td>1280</td><td>6</td><td>2,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-6-gb-gddr5x.c3328">GeForce GTX 1060 6 GB GDDR5X</a></td><td>1280</td><td>6</td><td>2,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-6-gb-gp104.c3250">GeForce GTX 1060 6 GB GP104</a></td><td>1280</td><td>6</td><td>2,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-6-gb-rev-2.c3063">GeForce GTX 1060 6 GB Rev. 2</a></td><td>1280</td><td>6</td><td>2,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-5-gb.c3060">GeForce GTX 1060 5 GB</a></td><td>1280</td><td>5</td><td>2,22</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1650.c3366">GeForce GTX 1650</a></td><td>896</td><td>4</td><td>4,48</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1650-gddr6.c3541">GeForce GTX 1650 GDDR6</a></td><td>896</td><td>4</td><td>4,27</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1650-tu106.c3585">GeForce GTX 1650 TU106</a></td><td>896</td><td>4</td><td>4,27</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1650-tu116.c3586">GeForce GTX 1650 TU116</a></td><td>896</td><td>4</td><td>4,27</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-3-gb.c2867">GeForce GTX 1060 3 GB</a></td><td>1152</td><td>3</td><td>1,97</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1060-3-gb-gp104.c2926">GeForce GTX 1060 3 GB GP104</a></td><td>1152</td><td>3</td><td>1,97</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1630.c3916">GeForce GTX 1630</a></td><td>512</td><td>4</td><td>2,74</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1050-ti.c2885">GeForce GTX 1050 Ti</a></td><td>768</td><td>4</td><td>1,09</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1050-3-gb.c3257">GeForce GTX 1050 3 GB</a></td><td>768</td><td>3</td><td>1,18</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gtx-1050.c2875">GeForce GTX 1050</a></td><td>640</td><td>2</td><td>0,93</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gt-1030-gk107.c3454">GeForce GT 1030 GK107</a></td><td>384</td><td>2</td><td>0,41</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gt-1030.c2954">GeForce GT 1030</a></td><td>384</td><td>2</td><td>0,01</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gt-1030-ddr4.c3187">GeForce GT 1030 DDR4</a></td><td>384</td><td>2</td><td>0,01</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gt-1010.c3762">GeForce GT 1010</a></td><td>256</td><td>2</td><td>0,38</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/geforce-gt-1010-ddr4.c3874">GeForce GT 1010 DDR4</a></td><td>256</td><td>2</td><td>0,35</td></tr></tbody></table>

### AMD

<table><thead><tr><th width="378">Model</th><th>Cores</th><th>VRAM</th><th>TFLOPS</th></tr></thead><tbody><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7900-xtx.c3941">Radeon RX 7900 XTX</a></td><td>6144</td><td>24</td><td>92,11</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7900-xt.c3912">Radeon RX 7900 XT</a></td><td>5376</td><td>20</td><td>77,24</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7900-gre.c4166">Radeon RX 7900 GRE</a></td><td>5120</td><td>16</td><td>68,97</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7800-xt.c3839">Radeon RX 7800 XT</a></td><td>3840</td><td>16</td><td>55,99</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6950-xt.c3875">Radeon RX 6950 XT</a></td><td>5120</td><td>16</td><td>35,48</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6900-xt.c3481">Radeon RX 6900 XT</a></td><td>5120</td><td>16</td><td>34,56</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6800-xt.c3694">Radeon RX 6800 XT</a></td><td>4608</td><td>16</td><td>31,11</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7700-xt.c3911">Radeon RX 7700 XT</a></td><td>3456</td><td>12</td><td>52,76</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7700.c4159">Radeon RX 7700</a></td><td>3072</td><td>12</td><td>47,93</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6800.c3713">Radeon RX 6800</a></td><td>3840</td><td>16</td><td>24,25</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7600-xt.c4190">Radeon RX 7600 XT</a></td><td>2048</td><td>16</td><td>33,86</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6750-xt.c3879">Radeon RX 6750 XT</a></td><td>2560</td><td>12</td><td>19,97</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6700-xt.c3695">Radeon RX 6700 XT</a></td><td>2560</td><td>12</td><td>19,82</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7600.c4153">Radeon RX 7600</a></td><td>2048</td><td>8</td><td>32,63</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6700.c3716">Radeon RX 6700</a></td><td>2304</td><td>10</td><td>16,94</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5700-xt-50th-anniversary.c3438">Radeon RX 5700 XT 50th Anniversary</a></td><td>2560</td><td>8</td><td>15,21</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5700-xt.c3339">Radeon RX 5700 XT</a></td><td>2560</td><td>8</td><td>14,63</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6650-xt.c3898">Radeon RX 6650 XT</a></td><td>2048</td><td>8</td><td>16,19</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6600-xt.c3774">Radeon RX 6600 XT</a></td><td>2048</td><td>8</td><td>15,91</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5700.c3437">Radeon RX 5700</a></td><td>2304</td><td>8</td><td>11,92</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6600.c3696">Radeon RX 6600</a></td><td>1792</td><td>8</td><td>13,39</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5600-xt.c3474">Radeon RX 5600 XT</a></td><td>2304</td><td>6</td><td>10,78</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5600-oem.c3475">Radeon RX 5600 OEM</a></td><td>2048</td><td>6</td><td>9,59</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-7500-xt.c4116">Radeon RX 7500 XT</a></td><td>1024</td><td>6</td><td>14,13</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5500-xt.c3468">Radeon RX 5500 XT</a></td><td>1408</td><td>4</td><td>7,79</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5300-xt-oem.c3465">Radeon RX 5300 XT OEM</a></td><td>1408</td><td>4</td><td>7,79</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-5500-oem.c3459">Radeon RX 5500 OEM</a></td><td>1408</td><td>4</td><td>7,79</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6500-xt.c3850">Radeon RX 6500 XT</a></td><td>1024</td><td>4</td><td>8,65</td></tr><tr><td><a href="https://www.techpowerup.com/gpu-specs/radeon-rx-6400.c3813">Radeon RX 6400</a></td><td>768</td><td>4</td><td>5,35</td></tr></tbody></table>


# Donation

Every donation makes a world of difference in keeping this project alive and thriving.

***

<table><thead><tr><th width="200">Platform</th><th>URL</th></tr></thead><tbody><tr><td>buymeacoffee</td><td><a href="https://buymeacoffee.com/facefusion">https://buymeacoffee.com/facefusion</a></td></tr><tr><td>ko-fi</td><td><a href="https://ko-fi.com/facefusion">https://ko-fi.com/facefusion</a></td></tr></tbody></table>

<table><thead><tr><th width="100">Coin</th><th width="100">Network</th><th>Address</th></tr></thead><tbody><tr><td>BTC</td><td>BTC</td><td>1A21SGauBebPhcuT9QjNvKoCQqks4W1W7w</td></tr><tr><td>ETH</td><td>ETH</td><td>0x64470a4c7a17cd6b3d9daf61b2510ccb477f7a03</td></tr><tr><td>USDT</td><td>TRC20</td><td>TXnqxoyq9tLMx3DbgcE5qtPD73J49cn6NV</td></tr><tr><td>USDT</td><td>ERC20</td><td>0x64470a4c7a17cd6b3d9daf61b2510ccb477f7a03</td></tr></tbody></table>


# FAQ

#### Are there plans to implement a high resolution inswapper?

InsightFace opted against releasing those models due ethical considerations.

#### How to improve the quality of swapped faces?

We worked around the limitation of the models by introducing the pixel boost option.

#### What operating systems are supported?

We support latest versions of Linux, macOS and Windows.

#### How much VRAM should my GPU have?

We consider 8GB as the bare minimum, everything from 12GB should work fine.

#### Where can temporary resources be found?

Temporary resources are stored inside `.facefusion` located in the temporary directory of your operating system.

#### What causes the program to halt after 100% analysing?

We don't allow NSFW content due to ethical considerations.


# Introduction

> Industry leading face manipulation platform.

### Preview

<figure><img src="/files/CibibLQKmSlZMTN1xIYN" alt=""><figcaption></figcaption></figure>

### Installation

Be aware, the [installation](https://docs.facefusion.io/installation) needs technical skills and is not recommended for beginners. In case you are not comfortable using a terminal, our [Windows Installer](http://windows-installer.facefusion.io) and [macOS Installer](http://macos-installer.facefusion.io) get you started.

{% content-ref url="/pages/8FlJQJUFfhREv2LUOc1O" %}
[Installation](/3.7.1/installation)
{% endcontent-ref %}

### Usage

Run the command:

```
python facefusion.py [commands] [options]

options:
  -h, --help                                      show this help message and exit
  -v, --version                                   show program's version number and exit

commands:
    run                                           run the program
    headless-run                                  run the program in headless mode
    batch-run                                     run the program in batch mode
    force-download                                force automate downloads and exit
    benchmark                                     benchmark the program
    job-list                                      list jobs by status
    job-create                                    create a drafted job
    job-submit                                    submit a drafted job to become a queued job
    job-submit-all                                submit all drafted jobs to become a queued jobs
    job-delete                                    delete a drafted, queued, failed or completed job
    job-delete-all                                delete all drafted, queued, failed and completed jobs
    job-add-step                                  add a step to a drafted job
    job-remix-step                                remix a previous step from a drafted job
    job-insert-step                               insert a step to a drafted job
    job-remove-step                               remove a step from a drafted job
    job-run                                       run a queued job
    job-run-all                                   run all queued jobs
    job-retry                                     retry a failed job
    job-retry-all                                 retry all failed jobs
```


# Changelog

### 3.7.1

* Adjust frame distribution to restore performance
* Fix image to image workflow when using 2 processors

### 3.7.0

* Bring in the face tracker to refill faces the face detector misses
* Boost `CoreML` performance for `fp16` models
* Architectural shift to multi frame aware processors
* Reduce overhead via processor driven model loading
* Introduce `auto` mode to the face selector to match source to target
* Improve video compatibility with QuickTime under macOS
* Make the installer take a positional argument rather than `--onnxruntime`
* Remove `--system-memory-limit` argument

### 3.6.1

* Add `--ssl-no-revoke` to curl since Norton and Avast break certificates
* Fix sanitizer for multiple `int` arguments

### 3.6.0

* Add `fran` model to the age modifier
* Add `corridor_key_1024` and `corridor_key_2048` models to the background remover
* Revamp conda environment to configure `PATH` and `LD_LIBRARY_PATH` on the startup
* Introduce `--background-remover-despill-color` argument
* Rename `--background-remover-color` to `--background-remover-fill-color`
* Fix incorrect model vendors and licenses

### 3.5.4

* Introduce experimental support for the `QNN` execution provider
* Prevent invalid execution cache after onnxruntime update
* Hide `ConnectionResetError` by asyncio under Windows
* Secure `--processors`, `--ui-layouts` and `--job-id` to prevent attacks
* Remove `--insecure` from curl to enforce secure connections

### 3.5.3

* Prevent conflicts with system-wide CUDA under Windows
* Fix extraction of 16-bit video footage like `ProRes`
* Fix webcam stripe artifacts caused by resolution mismatch

### 3.5.2

* Add retry for downloads to handle weak internet connections
* Introduce optional `--force-reinstall` argument to the installer
* Fix dependency resolution by single run installation

### 3.5.1

* Fix side by side preview on images with channel mismatch
* Fix inference crash when using `--execution-devices-ids` argument

### 3.5.0

* Introduce background remover processor
* Add `--face-detector-margin` to detect face beyond the frame
* Add frame processor models `face_dat_x4` and `tghq_face_x8`
* Extend `--output-pattern` for batch-run by source and target values
* Revamp architecture to modular processors and workflows
* Support for the `mpeg` and `mxf` video format

### 3.4.2

* Fix RAM explosion on 4K footage
* Fix broken bounding box

### 3.4.1

* Remove `DirectShow` camera backend on Windows
* Fix output processing with frame enhancer
* Fix side by side preview with frame enhancer

### 3.4.0

* Introduce single pass frame processing
* Process inference on multiple execution devices
* Add side by side preview modes along with preview resolutions
* Introduce `--expression-restorer-areas` argument
* Revamp webcam experience and performance
* Reintroduce the `yunet` face detector
* Add `--voice-extractor-model` argument
* Migrate ArcFace converter to CrossFace models&#x20;
* Balance source and target using the `--face-swapper-weight` argument
* Introduce `--benchmark-mode` to select between warm and cold caches
* Introduce many for the `--face-occluder-model` argument
* Replace output resolution with relative output scale
* Add `libx264rgb` to avoid color shifts due to RGB to YUV conversion
* Add support for  the `wmv` video format
* Experimental support for `MIGraphX` execution provider
* Log model information in debug mode
* Remove `--execution-queue-count` argument
* Remove score and classifier items from the face debugger
* Fix crash on headless-run when passing invalid output path
* Fix demographic filters for mutated faces

### 3.3.2

* Fix broken Gradio dependency
* Make `hyperswap_1a_256` the default face swapper model

### 3.3.1

* Fix the face store causing the second processor to fail

### 3.3.0

* Introduce `hyperswap` models by FaceFusion Labs
* Add more deep swapper models
* Add the `ultra_sharp_2_x4` frame enhancer model
* Boost performance for high resolution processing
* Run multiple NSFW models to prevent false detection
* Use the 68-point face landmarks to create face area masking
* Control lip movements using the  `--lip-syncer-weight` argument
* Enhance read and write reliability for corrupted videos
* Introduce fallback logic for unsupported audio and video encoders
* Fix the `UDP` webcam mode
* Fix bitrate range violation for `libopus`

### 3.2.0

* Introduce `gitee` and `hf-mirror` to bypass China's great firewall
* Enhance NSFW validation using a `YOLO` powered detector
* Reduce choices to installed audio encoders and video encoders
* Introduce `--halt-on-error` for several job commands
* Improve Gradio preview for unplayable videos larger than 512 MB in size
* Make the face selector more responsive to preview changes
* Add `--output-audio-quality` and `--output-audio-volume` arguments
* Use `flac` over `aac` for the `--output-audio-encoder` default
* Extend the face occluder by the `xseg_3` model
* Automatically select the most suitable execution provider
* Enable fast prediction and model caches for CoreML
* Remove `--skip-audio` argument as muted audio yield the same
* Normalize the range of the `--reference-face-distance` argument
* Eliminate broken file format verification in Gradio
* Restore frame colorizer support for CoreML
* Prevent deep swapper and face enhancer errors when offline
* Experimental multi GPU support for OpenVINO
* Fix model size detection of the deep swapper
* Fix inference pool sharing to avoid crash while switching models
* Fix audio restoring when `--output-video-fps` is modified
* Fix progress bar while extracting frames and merging videos
* Fix `webp` and `webm` support under Windows

### 3.1.2

* Fix broken `pydantic` dependency

### 3.1.1

* Restore `fp16` fallbacks for CoreML
* Fix CUDA for the Geforce 16 series

### 3.1.0

* Support for `DeepFaceLive` models
* Fallback aware download providers
* Introduce the `hififace_256` face swapper model
* Polish age modifier processor to reduce halo effect
* Introduce batch processing via the `batch-run` command
* Provide adjustable face occluder and face parser
* Release the popular frame enhancer models
* Add progress bar for extracting and merging of videos
* Modernize the UI to align with the Gradio 5 update
* Provide an option to select the webcam device id
* Introduce `--temp-path` argument to alter temporary resources
* Add video encoder `h264_qsv` and `hevc_qsv`
* Remove obsolete `--skip-download` argument
* Enforce `libvpx-vp9` codec for `webm` processing
* Gracefully close the webcam stream on exit
* Fix inconsistent preview updates
* Fix video length issues when restoring audio
* Fix OpenVINO issue by aliasing `GPU.0` to `GPU`

### 3.0.1

* Fix broken `python-multipart` dependency

### 3.0.0

* Revamp the architecture where everything is a job
* Introduce `pixel boost` to the face swappers
* Add multi angle processing to the face detectors
* Introduce age modifier processor
* Introduce Live Portrait powered expression restorer processor
* Introduce Live Portrait powered face editor processor
* Replace face parser with `bisenet_resnet_34` model
* Release the `GHOST` face swapper models
* Release frame enhancer `real_esrgan_x8` models
* Introduce ArcFace converter models for SimSwap and GHOST
* Introduce offline first assets based on local hash validation
* Replace `gender_age` with superior `fairface` model
* Transfer `order`, `age` and `gender` to the face selector
* Support CUDA 12.4, TensorRT 10.4, OpenVINO 2024.1 and ROCm 6.2
* Provide appropriate error codes in headless mode
* Migrate the CLI to commands along with related arguments
* Introduce custom made `peppa_wutz` face landmark model
* Introduce `--face-landmark-model` argument
* Introduce `--output-audio-encoder` argument
* Add video encoder `h264_videotoolbox` and `hevc_videotoolbox`
* Change the `--face-selector-order` default to large-small
* Replace globals with a context aware inference manager
* Use audio whenever defined via source
* Tweak the UI layout and visual appearance
* Update to latest Gradio 4
* Provide a multi range slider to trim video frames
* Introduce a log level aware terminal component to the UI
* Ensure significantly more accurate benchmark results
* Drop the face detector model `yunet` due low accuracy
* Fix flicker in the face swapper `uniface` model
* Fix threading and preview crashes for ROCm and DirectML
* Fix image quality for `webp` images
* Fix the termination of `ffmpeg` processing

### 2.6.1

* Fix broken `numpy` dependency

### 2.6.0

* Introduce a standalone one-click installer for Windows
* Add the frame enhancer `clear_reality_x4` and `ultra_sharp_x4` model
* Load different `ini` files via the `--config` argument
* Introduce `--open-browser` to open browser once the program is ready
* Introduce `--execution-device-id` to select processing device
* Support for Intel Arc using the OpenVINO execution provider
* Prevent Gradio from converting videos larger than 512 MB in size
* Fix path issues on Windows related to special characters
* Fix issues when finalizing images using temporary files

### 2.5.3

* Disable Gradio Analytics to prevent version alerts

### 2.5.2

* Introduce dynamic frame colorizer sizes
* Validate `facefusion.ini` overrides to prevent crashes
* Remove GPU architecture lookup to support outdated `nvidia-smi`
* Remove `hwaccel` which surprisingly improves the FFmpeg performance
* Fix threading and preview crashes for DirectML
* Fix `--output-video-resolution` from not being applied

### 2.5.1

* Add missing `deoldify` models to the frame colorizer
* Fix over-correction by voice extractor on background audio
* Fix excessive VRAM consumption of the voice extractor
* Fix exception in `conditional_download` while model removal
* Fix stuck processing when using FFmpeg 7

### 2.5.0

* Introduce the frame colorizer using the `ddcolor` and `deoldify` model
* Extract voice from the audio to enhance the lip-syncer quality
* Experimental 5 to 68 face landmark estimation
* Add the face enhancer `gpen_bfr_1024` and `gpen_bfr_2048` model
* Add the frame enhancer `real_esrgan_x2` and `real_hatgan_x4` model
* Introduce `--force-download` to download every model at once
* Migrate the documentation and installer from venv to conda
* Full compatibility with CUDA 12 due `inswapper_128_fp16` model fix
* Fix fps boosting and lowering during video merging
* Fix crashes when using `--skip-download` when models are absent
* Fix `h264_nvenc` and `hevc_nvenc` presets mapping

### 2.4.1

* Conditional download face analyser models
* Prevent download loop when remote is unreachable
* Dynamic `concurrency_count` for ideal Gradio performance
* Monkey patch Gradio for faster preview and stream rendering
* Fix preview for audio to image

### 2.4.0

* Run multiple face detectors simultaneously
* Prevent the 68 to 5 face landmark transformation on low confidence
* Add the high performance `scrfd` face detector model
* Gracefully start and stop processing
* Introduce ONNX powered frame enhancers
* Introduce `--face-landmarker-score` argument
* Render tabs when using multiple UI layouts
* Introduce `--output-image-resolution` argument
* Add more face debugger items and refine their color theme
* Print internal statistics when `--log-level debug` is enabled
* Keep lips over the whole video once lip syncer is enabled
* Restrict resolution upscaling and fps boosting for temporary resources
* Add support for `h264_amf` and `hevc_amf` video encoders
* Change the `--output-path` behaviour and normalization
* Remove `--temp-frame-quality` argument
* Fix green line when using a target with uneven pixels
* Fix preview of lip syncer when using `--trim-frame-start`
* Fix the blank output issue for Geforce GTX 16 series

### 2.3.0

* Introduce the lip-syncer processors using `wave2lip`
* Improve face alignment with 68 to 5 face landmark transformation
* Add face swapper model `uniface_256`
* Add `yoloface` as the default face detector model
* Clear temporary resources before processing
* Add `age` and `gender` to the face debugger items
* Update installer to version specific CUDA and ROCM entries
* Improve the description of the CLI arguments
* Enforce `--output-video-resolution` after upscaling
* Reduce terminal output noise while processing

### 2.2.1

* Replace `restoreformer` with the latest `restoreformer_plus_plus` model
* Fix error when the `facefusion.ini` file is missing a section
* Fix image to image when utilizing `--video-memory-strategy tolerant`

### 2.2.0

* Significant improve the CUDA performance
* Allow default overrides through the `facefusion.ini` file
* Enable faster `inswapper_128_fp16` model as default
* Add `--video-memory-strategy` to trade VRAM usage for speed
* Add `bmp` to the `--temp-frame-format` argument
* Add compatibility with Pinokio 1.0.0
* Display the processing time in the terminal on success
* Introduce `--output-video-preset` which defaults to `veryfast`
* Introduce `--output-video-fps` argument
* Introduce `--output-video-resolution` argument
* Block the preview and webcam until models are fully downloaded
* Rename `--max-memory` to `--system-memory-limit`
* Fix gender detection due incorrect matrix transformation
* Fix render issues when toggling face debugger items repeatedly

### 2.1.3

* Fix installer option for `directml` under Windows

### 2.1.2

* Add CUDA nightly to the installer
* Refresh reference faces on processor change
* Fix rounding issues of number based CLI arguments

### 2.1.1

* Remove falsy clear reference faces in preview

### 2.1.0

* Add face occlusion masking
* Add face region masking with selectable regions
* Average source face from multiple images
* Multi processing aware reference faces
* Only process the reference with face enhancer
* Introduce `debug`, `info`, `warn` and `error` log levels
* Restore face alignment offset from retinaface
* Enforce virtual environment via installer
* Reduce the installer options according to platform
* Add `onnxruntime-rocm` support to installer
* Fix preview updates on slider release
* Fix preview updates on face reference change
* Fix similarity transformation for the face alignment

### 2.0.0

* Add `blendswap_256`, `simswap_256` and `simswap_512_unofficial` to the face swapper
* Add `gpen_bfr_256` and `restoreformer` to the face enhancer
* High performance face detector using the `retinaface` or `yunet` models
* Add ROCm and OpenVINO support to the frame enhancers
* Add support for `webp` images and `webm` videos
* Add the `best-worst` and `worst-best` to `--face-analyser-order`
* Introduce the `face_debugger` to visualize the bounding box, key points and face mask
* Introduce the `facefusion-pinokio` repository to our GitHub organization
* Introduce `--face-mask-blur` and `--face-mask-padding` arguments
* Introduce `--face-detector-size` and `--face-detector-score` arguments
* Extend face selector by `one` mode
* Remove `insightface` dependency due handcrafted frame processing
* Remove `tensorflow` and `PIL` dependencies duo handcrafted frame analysing
* Simplify progress bar to reduce performance hits
* Improve reference face UI for large amount of people
* Webcam mode `udp` and `v4l2` now with solid 25fps at 1080p
* Seamless start and stop the webcam feed
* Rename `--face-recognition` to `--face-selector-mode`
* Rename `--face-analyser-direction` to `--face-analyser-order`
* Fix output validation after processing
* Apply fixed ranges to number based CLI arguments
* Normalize the `--reference-face-distance` calculation to a 0-1 range
* Normalize the `--output-path` even without specified `--source-path`
* Set a 10 seconds timeout for download lookups

### 1.3.1

* Refine `default` and `cpu` choices for the installer

### 1.3.0

* Add high performance `fp16` version to the face swapper
* Add ONNX powered `CodeFormer`, `GFPGAN` and `GPEN` to the face enhancer
* Add `RealESRGAN_x2plus` and `RealESRNet_x4plus` to the frame enhancer
* Implement blending for the face enhancer and frame enhancer
* Enable processors to have options and CLI arguments
* Refine the UI theme to a minimal and flat design
* Enhance the `--help` and documentation with arguments grouping
* Reduce the default image and video quality to 80 percent
* Introduce a new `--torch` argument to the installer
* Improve Apple Silicon performance using the latest `onnxruntime`
* Fix video quality to compression normalization
* Fix stuck downloads caused by the Windows firewall

### 1.2.1

* Perform VRAM clearance after each processing step
* Restrict TensorFlow memory consumption to 512 MB
* Verify the model files before frame processing
* Introduce `--skip-download` to skip automated downloads
* Upgrade to the most recent `onnxruntime` version

### 1.2.0

* Establish realtime webcam performance
* Optimize reruns by caching the face analyser results
* Optimize image read performance through caching
* Resume interrupted asset and model downloads
* Allow passing `--onnxruntime` to `install.py`
* Introduce official `facefusion-colab` repository
* Remove alignments from each UI components
* Introduce checkbox group for the settings
* Set webcam resolution and fps in the UI
* Disallow empty execution providers in the UI
* Fix frame range processing on videos with audio
* Fix `CUDA` and `ROCM` Dockerfile to utilize the GPU
* Fix sorting of temp frame paths

### 1.1.0

* Installer for common and acceleration dependencies
* Built-in webcam suite that supports `udp` and `v4l2` streaming
* Dedicated `--headless` mode
* Add Docker support for ROCM
* Allow adjustment of `--output-path` via the UI
* Enhance output path normalization
* Single warm-up before starting the benchmark suite
* Ability to select runs for the benchmark suite
* Enable benchmarking with partial updates
* Implement a fully event-driven UI for super responsiveness
* Add a max memory slider to select free RAM
* Implement conditional UI based on target media type
* Introduce `--output-image-quality` option for image output
* Fix `crf` range for `libvpx` video encoder
* Fix `detect_fps` to work with different encoding

### 1.0.0

* Dynamic UI based on Gradio
* Docker support for CPU and CUDA
* Replace `--many-faces` by `--face-recognition` that takes `reference` and `many` value
* Twin support: swap multiple faces by one face reference
* Introduce `--execution-queue-count` to adjust processing per thread
* Rename `--execution-threads` to `--execution-thread-count`
* Global options direction, age and gender for face analyser
* Blur preview and processing hold when NSFW content has been detected
* Flip the quality best to worse from 0-100 to 100-0
* Trim video via `trim-frame-start` and `trim-frame-end`
* Built-in benchmark suite
* Intensive codebase refactoring


# Disclaimer

We acknowledge the unethical potential of FaceFusion and are resolutely dedicated to establishing safeguards against such misuse. This software has been engineered to abstain from processing inappropriate content such as nudity, graphic content and sensitive material.

It is important to note that we maintain a strong stance against any type of pornographic nature and do not collaborate with any websites promoting the unauthorized use of our software.

Users who seek to engage in such activities will face consequences, including being banned from our community or reported to public authorities in case of legal violations.


# Licenses

FaceFusion is distributed under the OpenRAIL-AS license. It's important to note that the assets we provide are subject to their individual licenses.

## Models

### 2DFAN4

Vendor: breadbread1984

Converter: PINTO0309

License: <mark style="color:green;">MIT</mark>

Year: 2018

### ArcFace

Vendor: InsightFace

Converter: InsightFace

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2018

### CrossFace

Vendor: FaceFusion

Converter: FaceFusion

License: <mark style="color:green;">OpenRAIL-M</mark>

Year: 2025

### BiSeNet

Vendor: yakhyo

Converter: yakhyo

License: <mark style="color:green;">MIT</mark>

Year: 2024

### BlendSwap

Vendor: mapooon

Converter: netrunner.exe

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Clear Reality

Vendor: Kim2091

Converter: Kim2091

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### CoderFormer

Vendor: sczhou

Converter: FaceFusion

License: <mark style="color:red;">S-Lab 1.0</mark>

Year: 2022

### DDColor

Vendor: piddnad

Converter: instant-high

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2023

### DeOldify

Vendor: jantic

Converter: instant-high

License: <mark style="color:green;">MIT</mark>

Year: 2022

### EDTalk

Vendor: tanshuai0219

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2024

### FairFace

Vendor: dchen236

Converter: PINTO0309

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### FAN 68/5

Vendor: FaceFusion

Converter: FaceFusion

License: <mark style="color:green;">OpenRAIL-M</mark>

Year: 2024

### GFPGAN

Vendor: TencentARC

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### GHOST

Vendor: ai-forever

Converter: netrunner.exe

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### GPEN

Vendor: yangxy

Converter: FaceFusion

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### HifiFace

Vendor: GuijiAI

Converter: Unknown

License: Unknown

Year: 2021

### HyperSwap

Vendor: FaceFusion

Converter: FaceFusion

License: <mark style="color:red;">ResearchRAIL</mark>

Year: 2025

### INSwapper

Vendor: InsightFace

Converter: FaceFusion

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Kim Vocal

Vendor: KimberleyJensen

Converter: KimberleyJensen

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Live Portrait

Vendor: KwaiVGI

Converter: FaceFusion

License: <mark style="color:green;">MIT</mark>

Year: 2024

### LSDIR

Vendor: Phhofm

Converter: Phhofm

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### NSFW 1

Vendor: EraX

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2024

### NSFW 2&#x20;

Vendor: Marqo

Converter: FaceFusion

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2024

### NSFW 3

Vendor: Freepik

Converter: FaceFusion

License: <mark style="color:green;">MIT</mark>

Year: 2025

### **Nomos8k SC**

Vendor: Phhofm

Converter: Phhofm

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Peppa Wutz

Vendor: Unknown

Converter: instant-high

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2023

### Real ESRGAN

Vendor: xinntao

Converter: instant-high

License: <mark style="color:green;">BSD 3-Clause</mark>

Year: 2021

### Real HATGAN

Vendor: XPixelGroup

Converter: Unknown

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2023

### Real Web Photo

Vendor: Helaman

Converter: Unknown

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2024

### Realistic Rescaler

Vendor: Mutin Choler

Converter: Unknown

License: <mark style="color:green;">WTFPL</mark>

Year: 2023

### Remacri

Vendor: FoolhardyVEVO

Converter: Unknown

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### RestoreFormer

Vendor: wzhouxiff

Converter: netruner.exe

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### RetinaFace

Vendor: InsightFace

Converter: InsightFace

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2020

### SCRFD

Vendor: InsightFace

Converter: InsightFace

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### Siax

Vendor: NMKD

Converter: Unknown

License: <mark style="color:green;">WTFPL</mark>

Year: 2021

### SimSwap

Vendor: neuralchen

Converter: netrunner.exe

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2020

### SPAN Kendata

Vendor: terrainer

Converter: terrainer

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2024

### StyleGANEX

Vendor: williamyang1991

Converter: FaceFusion

License: <mark style="color:red;">S-Lab 1.0</mark>

Year: 2023

### Swin2 SR

Vendor: mv-lab

Converter: Unknown

License: <mark style="color:green;">Apache 2.0</mark>

Year: 2022

### Ultra Sharp

Vendor: Kim2091

Converter: Kim2091

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2021

### Ultra Sharp 2

Vendor: Kim2091

Converter: Kim2091

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2025

### UniFace

Vendor: xc-csc101

Converter: FaceFusion

License: <mark style="color:green;">None</mark>

Year: 2022

### UVR MDXNET

Vendor: Unknown

Converter: Unknown

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2023

### Wav2Lip

Vendor: Rudrabha

Converter: FaceFusion

License: <mark style="color:red;">Non-Commercial</mark>

Year: 2020

### XSeg

Vendor: DeepFaceLab

Converter: FaceFusion

License: <mark style="color:green;">GPL-3.0</mark>

Year: 2021

### YOLO Face

Vendor: derronqi

Converter: tamoharu

License: <mark style="color:green;">GPL-3.0</mark>

Year: 2022

### YuNet

Vendor: OpenCV

Converter: OpenCV

License: <mark style="color:green;">MIT</mark>

Year: 2023

## Examples

### Source Audio

Vendor: ElevenLabs

License: <mark style="color:green;">None</mark>

### Source Image

Vendor: ThisPersonNotExist

License: <mark style="color:green;">None</mark>

### Target Video

Vendor: Pexels

License: <mark style="color:green;">None</mark>


# Installation

### 1. Prepare Your Platform

{% content-ref url="/pages/ptDjEJiQYmfMKwnxmnC4" %}
[Linux](/3.7.1/installation/platform/linux)
{% endcontent-ref %}

{% content-ref url="/pages/f5VPIJhtmtQI6rHI2jW6" %}
[macOS](/3.7.1/installation/platform/macos)
{% endcontent-ref %}

{% content-ref url="/pages/mM490Q5CntMz0QwbTjBC" %}
[Windows](/3.7.1/installation/platform/windows)
{% endcontent-ref %}

### 2. Prepare Your Environment

Initialize conda for your terminal:

```
conda init --all
```

Create the environment:

```
conda create --name facefusion python=3.12 pip=25.0
```

Activate the environment:

```
conda activate facefusion
```

### 3. Install Your Accelerator

{% content-ref url="/pages/WSUlX58OkGceZcsC8ImV" %}
[Linux](/3.7.1/installation/accelerator/linux)
{% endcontent-ref %}

{% content-ref url="/pages/0nysjox1RHxmvx1S1abS" %}
[Windows](/3.7.1/installation/accelerator/windows)
{% endcontent-ref %}

### 4. Download Your Copy

Clone the repository:

```
git clone https://github.com/facefusion/facefusion
```

Ensure to enter the directory:

```
cd facefusion
```

### 5. Install The Application

{% tabs fullWidth="false" %}
{% tab title="CPU" %}

```
python install.py default
```

{% endtab %}

{% tab title="CUDA" %}

```
python install.py cuda
```

{% endtab %}

{% tab title="CoreML" %}

```
python install.py default
```

{% endtab %}

{% tab title="DirectML" %}

```
python install.py directml
```

{% endtab %}

{% tab title="MIGraphX" %}

```
python install.py migraphx
```

{% endtab %}

{% tab title="OpenVINO" %}

```
python install.py openvino
```

{% endtab %}
{% endtabs %}

### 6. Reload Your Environment

```
conda deactivate
```

```
conda activate facefusion
```

### 7. Done

Finally, run the program:

```
python facefusion.py run --open-browser
```


# Platform


# Linux

### GIT

```
apt install git-all
```

### cURL

```
apt install curl
```

### Conda

```
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
```

```
bash Miniconda3-latest-Linux-x86_64.sh
```

### FFmpeg

```
apt install ffmpeg
```


# macOS

### GIT

```
brew install git
```

### Conda

```
brew install miniconda
```

### FFmpeg

```
brew install ffmpeg@7.0.2
```


# Windows

### GIT

```
winget install -e --id Git.Git
```

### Conda

```
winget install -e --id Anaconda.Miniconda3 --version py312_25.1.1-2 --override "/AddToPath=1"
```

### FFmpeg

```
winget install -e --id Gyan.FFmpeg --version 7.0.2
```


# Accelerator


# Linux

### CUDA

Compatible with NVIDIA graphic cards:

```
conda install nvidia/label/cuda-12.9.1::cuda-runtime nvidia/label/cudnn-9.10.0::cudnn
```

### TensorRT

Suitable for high performance NVIDIA graphic cards:

```
pip install tensorrt==10.12.0.36 --extra-index-url https://pypi.nvidia.com
```

### ROCm

Compatible with AMD graphic cards:

```
curl --output amdgpu-install-7.2.deb https://repo.radeon.com/amdgpu-install/7.2/ubuntu/jammy/amdgpu-install_7.2.70200-1_all.deb
```

```
dpkg --install amdgpu-install-7.2.deb
```

```
conda install conda-forge::gcc=15.2.0
```

### OpenVINO

Compatible with Intel graphic cards:

```
conda install conda-forge::openvino=2025.3.0
```


# Windows

### CUDA

Compatible with NVIDIA graphic cards:

```
conda install nvidia/label/cuda-12.9.1::cuda-runtime nvidia/label/cudnn-9.10.0::cudnn
```

### TensorRT

Suitable for high performance NVIDIA graphic cards:

```
pip install tensorrt==10.12.0.36 --extra-index-url https://pypi.nvidia.com
```

### OpenVINO

Suitable for Intel Arc graphic cards:

```
conda install conda-forge::openvino=2025.3.0
```


# Usage


# CLI Commands


# General

### Run

Run the program.

Command: `run`

Arguments:

* [Paths](/3.7.1/usage/cli-arguments/paths)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Tracker](/3.7.1/usage/cli-arguments/face-tracker)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Voice Extractor](/3.7.1/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/3.7.1/usage/cli-arguments/frame-distribution)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* [UIs](/3.7.1/usage/cli-arguments/uis)
* [Benchmark](/3.7.1/usage/cli-arguments/benchmark)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

### Headless Run

Run the program in headless mode.

Command: `headless-run`

Arguments:

* [Paths](/3.7.1/usage/cli-arguments/paths)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Tracker](/3.7.1/usage/cli-arguments/face-tracker)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Voice Extractor](/3.7.1/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/3.7.1/usage/cli-arguments/frame-distribution)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

### Batch Run

Run the program in batch mode.

Command: `batch-run`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Temp Path](/3.7.1/usage/cli-arguments/paths#temp-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* [Patterns](/3.7.1/usage/cli-arguments/patterns)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Tracker](/3.7.1/usage/cli-arguments/face-tracker)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Voice Extractor](/3.7.1/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/3.7.1/usage/cli-arguments/frame-distribution)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

### Force Download

Force automate downloads and exit.

Command: `force-download`

Arguments:

* [Download](/3.7.1/usage/cli-arguments/download)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

### Benchmark

Benchmark the program.

Command: `benchmark`

Arguments:

* Paths
  * [Temp Path](/3.7.1/usage/cli-arguments/paths#temp-path)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Tracker](/3.7.1/usage/cli-arguments/face-tracker)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Voice Extractor](/3.7.1/usage/cli-arguments/voice-extractor)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Frame Distribution](/3.7.1/usage/cli-arguments/frame-distribution)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* [Benchmark](/3.7.1/usage/cli-arguments/benchmark)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)


# Job Manager

### Job List

List jobs by status.

Command: `job-list [job_status]`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-list drafted`

### Job Create

Create a drafted job.

Command: `job-create [job_id]`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-create example`

### Job Submit

Submit a drafted job to become a queued job.

Command: `job-submit [job_id]`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-submit example`

### Job Submit All

Submit all drafted jobs to become a queued jobs.

Command: `job-submit-all`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* [Misc](/3.7.1/usage/cli-arguments/misc)

Example: `job-submit-all`

### Job Delete

Delete a drafted, queued, failed or completed job.

Command: `job-delete [job_id]`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-delete example`

### Job Delete All

Delete all drafted, queued, failed and completed jobs.

Command: `job-delete-all`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* [Misc](/3.7.1/usage/cli-arguments/misc)

Example: `job-delete-all`

### Job Add Step

Add a step to a drafted job.

Command: `job-add-step [job_id]`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
  * [Source Path](/3.7.1/usage/cli-arguments/paths#source-paths)
  * [Target Path](/3.7.1/usage/cli-arguments/paths#target-path)
  * [Output Path](/3.7.1/usage/cli-arguments/paths#output-path)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-add-step example`

### Job Remix Step

Remix a previous step from a drafted job.

Command: `job-remix-step [job_id] [step_index]`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
  * [Source Path](/3.7.1/usage/cli-arguments/paths#source-paths)
  * [Output Path](/3.7.1/usage/cli-arguments/paths#output-path)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-remix-step example 5`

### Job Insert Step

Insert a step to a drafted job.

Command: `job-insert-step [job_id] [step_index]`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
  * [Source Path](/3.7.1/usage/cli-arguments/paths#source-paths)
  * [Target Path](/3.7.1/usage/cli-arguments/paths#target-path)
  * [Output Path](/3.7.1/usage/cli-arguments/paths#output-path)
* [Face Detector](/3.7.1/usage/cli-arguments/face-detector)
* [Face Landmarker](/3.7.1/usage/cli-arguments/face-landmarker)
* [Face Selector](/3.7.1/usage/cli-arguments/face-selector)
* [Face Masker](/3.7.1/usage/cli-arguments/face-masker)
* [Frame Extraction](/3.7.1/usage/cli-arguments/frame-extraction)
* [Output Creation](/3.7.1/usage/cli-arguments/output-creation)
* [Processors](/3.7.1/usage/cli-arguments/processors)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-insert-step example 5`

### Job Remove Step

Remove a step from a drafted job.

Command: `job-remove-step [job_id] [step_index]`

Arguments:

* Paths
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-remove-step example 5`


# Job Runner

### Job Run

Run a queued job.

Command: `job-run [job_id]`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Temp Path](/3.7.1/usage/cli-arguments/paths#temp-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-run example`

### Job Run All

Run all queued jobs.

Command: `job-run-all`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Temp Path](/3.7.1/usage/cli-arguments/paths#temp-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* [Misc](/3.7.1/usage/cli-arguments/misc)

Example: `job-run-all`

### Job Retry

Retry a failed job.

Command: `job-retry [job_id]`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Temp Path](/3.7.1/usage/cli-arguments/paths#temp-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* Misc
  * [Log Level](/3.7.1/usage/cli-arguments/misc#log-level)

Example: `job-retry example`

### Job Retry All

Retry all failed jobs.

Command: `job-retry-all`

Arguments:

* Paths
  * [Config Path](/3.7.1/usage/cli-arguments/paths#config-path)
  * [Temp Path](/3.7.1/usage/cli-arguments/paths#temp-path)
  * [Jobs Path](/3.7.1/usage/cli-arguments/paths#jobs-path)
* Download
  * [Download Providers](/3.7.1/usage/cli-arguments/download#download-providers)
* [Execution](/3.7.1/usage/cli-arguments/execution)
* [Memory](/3.7.1/usage/cli-arguments/memory)
* [Misc](/3.7.1/usage/cli-arguments/misc)

Example: `job-retry-all`


# CLI Arguments


# Paths

## CLI Arguments

### Config Path

Choose the config file to override defaults.

Argument: `--config-path`

Default: `facefusion.ini`

Example: `--config-path facefusion.ini`

### Temp Path

Specify the directory for the temporary resources.

Argument: `--temp-path`

Default: `TemporaryDirectory`

Example: `--temp-path .temp`

### Jobs Path

Specify the directory to store jobs.

Argument: `--jobs-path`

Default: `.jobs`

Example: `--jobs-path .jobs`

### Source Paths

Choose the image or audio paths.

Argument: `-s/--source-paths`

Default: `None`

Example: `--source-paths source.jpg source.mp3`

### Target Path

Choose the image or video path.

Argument: `-t/--target-path`

Default: `None`

Example: `--target-path target.mp4`

### Output Path

Specify the image or video within a directory.

Argument: `-o/--output-path`

Default: `None`

Example: `--output-path output.mp4`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[paths]
temp_path = .temp
jobs_path = .jobs
source_paths = source.jpg source.mp3
target_path = target.mp4
output_path = output.mp4
```


# Patterns

## CLI Arguments

### Source Pattern

Choose the image or audio pattern.

Argument: `-s/--source-pattern`

Default: `None`

Example: `--source-pattern sources\*.jpg`

### Target Pattern

Choose the image or video pattern.

Argument: `-t/--target-pattern`

Default: `None`

Example: `--target-pattern targets\*.mp4`

### Output Pattern

Specify the image or video pattern.

Argument: `-o/--output-pattern`

Default: `None`

Replacements:

* `source_name`
* `target_name`
* `target_extension`
* `index`

Example: `--output-pattern outputs\{index}.{target_extension}`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[patterns]
source_pattern = sources\*.jpg
target_pattern = targets\*.mp4
output_pattern = outputs\{index}.{target_extension}
```


# Face Detector

## CLI Arguments

### Face Detector Model

Choose the model responsible for detecting the faces.

Argument: `--face-detector-model`

Default: `yoloface`

Choices:&#x20;

* `many`
* `retinaface`
* `scrfd`
* `yoloface`

Example: `--face-detector-model retinaface`

### Face Detector Size

Specify frame size provided to the face detector.

Argument: `--face-detector-size`

Default: `640x640`

Choices:

* `160x160`
* `320x320`
* `480x480`
* `512x512`
* `640x640`
* `768x768`
* `960x960`
* `1024x1024`

Example: `--face-detector-size 320x320`

### Face Detector Margin

Apply top, right, bottom and left margin to the frame.

Argument: `--face-detector-margin`

Default: `0 0 0 0`

Example: `--face-detector-margin 10 20`

### Face Detector Angles

Specify the angles to rotate the frame before detecting faces.

Argument: `--face-detector-angles`

Default: `0`

Choices:

* `0`
* `90`
* `180`
* `270`

Example: `--face-detector-angles 0 180`

### Face Detector Score

Filter the detected faces base on the confidence score.

Argument: `--face-detector-score`

Default: `0.5`

Range: `0` to `1` at `0.05`

Example: `--face-detector-score 0.7`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_detector]
face_detector_model = retinaface
face_detector_size = 320x320
face_detector_margin = 10 20
face_detector_angles = 0 180
face_detector_score = 0.7
```


# Face Landmarker

## CLI Arguments

### Face Landmarker Model

Choose the model responsible for detecting the face landmarks.

Argument: `--face-landmarker-model`

Default: `2dfan4`

Choices:&#x20;

* `many`
* `2dfan4`
* `peppa_wutz`

Example: `--face-landmarker-model peppa_wutz`

### Face Landmarker Score

Filter the detected face landmarks base on the confidence score.

Argument: `--face-landmarker-score`

Default: `0.5`

Range: `0` to `1` at `0.05`

Example: `--face-landmarker-score 0.7`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_landmarker]
face_landmarker_model = peppa_wutz
face_landmarker_score = 0.7
```


# Face Selector

## CLI Arguments

### Face Selector Mode

Use reference based tracking or simple matching.

Argument: `--face-selector-mode`

Default: `reference`

Choices:&#x20;

* `many`
* `one`
* `reference`

Example: `--face-selector-mode one`

### Face Selector Order

Specify the order of the detected faces.

Argument: `--face-selector-order`

Default: `large-small`

Choices:&#x20;

* `left-right`
* `right-left`
* `top-bottom`
* `bottom-top`
* `small-large`
* `large-small`
* `best-worst`
* `worst-best`

Example: `--face-selector-order left-right`

### Face Selector Age Start

Filter the detected faces based the starting age.

Argument: `--face-selector-age-start`

Default: `None`

Range: `0` to `100` at `1`

Example: `--trim-frame-start 20`

### Face Selector Age End

Filter the detected faces based the ending age.

Argument: `--face-selector-age-end`

Default: `None`

Range: `0` to `100` at `1`

Example: `--trim-frame-end 40`

### Face Selector Gender

Filter the detected faces based on their gender.

Argument: `--face-selector-gender`

Default: `None`

Choices:&#x20;

* `auto`
* `male`
* `female`

Example: `--face-selector-gender male`

### Face Selector Race

Filter the detected faces based on their race.

Argument: `--face-selector-race`

Default: `None`

Choices:

* `auto`
* `white`
* `black`
* `latino`
* `asian`
* `indian`
* `arabic`

Example: `--face-selector-gender white`

### Reference Face Position

Specify the position used to create the reference face.

Argument: `--reference-face-position`

Default: `0`

Example: `--reference-face-position 1`

### Reference Face Distance

Specify the similarity between the reference face and target face.

Argument: `--reference-face-distance`

Default: `0.3`

Range: `0` to `1` at `0.05`

Example: `--reference-face-distance 0.6`

### Reference Frame Number

Specify the frame used to create the reference face.

Argument: `--reference-frame-number`

Default: `0`

Example: `--reference-frame-number 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_selector]
face_selector_mode = one
face_selector_order = left-right
face_selector_age_start = 20
face_selector_age_end = 40
face_selector_gender = male
face_selector_race = white
reference_face_position = 1
reference_face_distance = 0.6
reference_frame_number = 100
```


# Face Tracker

### Face Tracker Score

Specify the overlap score used to match the tracked faces.

Argument: `--face-tracker-score`

Default: `0.0`

Range: `0` to `0.5` at `0.05`

Example: `--face-tracker-score 0.3`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_tracker]
face_tracker_score = 0.3
```


# Face Masker

## CLI Arguments

### Face Occluder Model

Choose the model responsible for the occlusion mask.

Argument: `--face-occluder-model`

Default: `xseg_1`

Choices:&#x20;

* `many`
* `xseg_1`
* `xseg_2`
* `xseg_3`

Example: `--face-occluder-model xseg_2`

### Face Parser Model

Choose the model responsible for the region mask.

Argument: `--face-parser-model`

Default: `bisenet_resnet_34`

Choices:&#x20;

* `bisenet_resnet_18`
* `bisenet_resnet_34`

Example: `--face-parser-model bisenet_resnet_18`

### Face Mask Types

Mix and match different face mask types.

Argument: `--face-mask-types`

Default: `box`

Choices:&#x20;

* `box`
* `occlusion`
* `area`
* `region`

Example: `--face-mask-types occlusion`

### Face Mask Areas

Choose the items used for the area mask.

Argument: `--face-mask-areas`

Default: `All`

Choices:

* `upper-face`
* `lower-face`
* `mouth`

Example: `--face-mask-areas mouth`

### Face Mask Regions

Choose the items used for the region mask.

Argument: `--face-mask-regions`

Default: `All`

Choices:

* `skin`
* `left-eyebrow`
* `right-eyebrow`
* `left-eye`
* `right-eye`
* `glasses`
* `nose`
* `mouth`
* `upper-lip`
* `lower-lip`

Example: `--face-mask-regions nose`

### Face Mask Blur

Specify the degree of blur applied to the box mask.

Argument: `--face-mask-blur`

Default: `0.3`

Range: `0` to `1` at `0.05`

Example: `--face-mask-blur 0.5`

### Face Mask Padding

Apply top, right, bottom and left padding to the box mask.

Argument: `--face-mask-padding`

Default: `0 0 0 0`

Example: `--face-mask-padding 10 20`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[face_masker]
face_occluder_model = xseg_2
face_parser_model = bisenet_resnet_18
face_mask_types = occlusion
face_mask_areas = mouth
face_mask_regions = nose
face_mask_blur = 0.5
face_mask_padding = 10 20
```


# Voice Extractor

## CLI Arguments

### Voice Extractor Model

Choose the model responsible for extracting the voices.

Argument: `--voice-extractor-model`

Default: `kim_vocal_2`

Choices:&#x20;

* `kim_vocal_1`
* `kim_vocal_2`
* `uvr_mdxnet`

Example: `--voice-extractor-model uvr_mdxnet`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[voice_extractor]
voice_extractor_model = uvr_mdxnet
```


# Frame Extraction

## CLI Arguments

### Trim Frame Start

Specify the starting frame of the target video.

Argument: `--trim-frame-start`

Default: `None`

Example: `--trim-frame-start 100`

### Trim Frame End

Specify the ending frame of the target video.

Argument: `--trim-frame-end`

Default: `None`

Example: `--trim-frame-end 200`

### Temp Frame Format

Specify the temporary resources format.

Argument: `--temp-frame-format`

Default: `png`

Choices:

* `bmp`
* `jpeg`
* `png`
* `tiff`

Example: `--temp-frame-format bmp`

### Keep Temp

Keep the temporary resources after processing.

Argument: `--keep-temp`

Default: `None`

Example: `--keep-temp`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[frame_extraction]
trim_frame_start = 100
trim_frame_end = 200
temp_frame_format = bmp
keep_temp = True
```


# Frame Distribution

### Target Frame Amount

Specify the amount of target frames forwarded to the processor.

Argument: `--target-frame-amount`

Default: `2`

Range: `0` to `5` at `10`

Example: `--target-frame-amount 10`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[frame_distribution]
target_frame_amount = 10
```


# Output Creation

## CLI Arguments

### Output Image Quality

Specify the image quality which translates to the image compression.

Argument: `--output-image-quality`

Default: `80`

Range: `0` to `100` at `1`

Example: `--output-image-quality 100`

### Output Image Scale

Specify the image scale based on the target image.

Argument: `--output-image-scale`

Default: `1.0`

Range: `0.25` to `8.0` at `0.25`

Example: `--output-image-scale 0.5`

### Output Audio Encoder

Specify the encoder used for the audio.

Argument: `--output-audio-encoder`

Default: `aac`

Choices:&#x20;

* `aac`
* `libmp3lame`
* `libopus`
* `libvorbis`
* `flac`

Example: `--output-audio-encoder libvorbis`

### Output Audio Quality

Specify the audio quality which translates to the audio compression.

Argument: `--output-audio-quality`

Default: `80`

Range: `0` to `100` at `1`

Example: `--output-audio-quality 100`

### Output Video Volume

Specify the audio volume based on the target video.

Argument: `--output-audio-volume`

Default: `100`

Range: `0` to `100` at `1`

Example: `--output-audio-volume 80`

### Output Video Encoder

Specify the encoder used for the video.

Argument: `--output-video-encoder`

Default: `libx264`

Choices:

* `libx264`
* `libx264rgb`
* `libx265`
* `libvpx-vp9`
* `h264_nvenc`
* `hevc_nvenc`
* `h264_amf`
* `hevc_amf`
* `h264_qsv`
* `hevc_qsv`
* `h264_videotoolbox`
* `hevc_videotoolbox`

Example: `--output-video-encoder libx265`

### Output Video Preset

Balance fast video processing and video file size.

Argument: `--output-video-preset`

Default: `veryfast`

Choices:

* `ultrafast`
* `superfast`
* `veryfast`
* `faster`
* `fast`
* `medium`
* `slow`
* `slower`
* `veryslow`

Example: `--output-video-preset ultrafast`

### Output Video Quality

Specify the video quality which translates to the video compression.

Argument: `--output-video-quality`

Default: `80`

Range: `0` to `100` at `1`

Example: `--output-video-quality 100`

### Output Video Scale

Specify the video scale based on the target video.

Argument: `--output-video-scale`

Default: `1.0`

Range: `0.25` to `8.0` at `0.25`

Example: `--output-video-scale 0.5`

### Output Video Fps

Specify the video fps based on the target video.

Argument: `--output-video-fps`

Default: `None`

Range: `1` to `60` at `1`

Example: `--output-video-fps 30`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[output_creation]
output_image_quality = 100
output_image_scale = 0.5
output_audio_encoder = libvorbis
output_audio_quality = 100
output_audio_volume = 80
output_video_encoder = libx265
output_video_preset = ultrafast
output_video_quality = 100
output_video_scale = 0.5
output_video_fps = 30
```


# Processors

## CLI Arguments

### Processors

Load a single or multiple processors.

Argument: `--processors`

Default: `face_swapper`

Choices:

* `age_modifier`
* `expression_restorer`
* `face_debugger`
* `face_enhancer`
* `face_editor`
* `face_swapper`
* `frame_colorizer`
* `frame_enhancer`
* `lip_syncer`

Example: `--processors face_swapper face_enhancer`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
processors = face_swapper face_enhancer
```


# Age Modifier

## CLI Arguments

### Age Modifier Model

Choose the model responsible for aging the face.

Argument: `--age-modifier-model`

Default: `fran`

Choices:&#x20;

* `fran`
* `styleganex_age`

Example: `--age-modifier-model styleganex_age`

### Age Modifier Direction

Specify the direction in which the age should be modified.

Argument: `--age-modifier-direction`

Default: `0`

Range: `-100` to `100` at `1`

Example: `--age-modifier-direction 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
age_modifier_model = styleganex_age
age_modifier_direction = 100
```


# Background Remover

## CLI Arguments

### Background Remover Model

Choose the model responsible for removing the background.

Argument: `--background-remover-model`

Default: `modnet`

Choices:&#x20;

* `ben_2`
* `birefnet_general`
* `birefnet_portrait`
* `corridor_key_1024`
* `corridor_key_2048`
* `isnet_general`
* `modnet`
* `rmbg_1.4`
* `rmbg_2.0`
* `silueta`
* `u2net_cloth`
* `u2net_general`
* `u2net_human`
* `u2net_portable`

Example: `--background-remover-model rmbg_2.0`

### Background Remover Fill Color

Apply red, green, blue and alpha values to the background.

Argument: `--background-remover-fill-color`

Default: `0 0 0 0`

Example: `--background-remover-fill-color 255 0 0 255`

### Background Remover Despill Color

Remove red, green, blue and alpha values from the foreground.

Argument: `--background-remover-despill-color`

Default: `0 0 0 0`

Example: `--background-remover-despill-color 0 255 0 255`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
background_remover_model = rmbg_2.0
background_remover_fill_color = 255 0 0 255
background_remover_despill_color = 0 255 0 255
```


# Deep Swapper

## CLI Arguments

### Deep Swapper Model

Choose the model responsible for swapping the face.

Argument: `--deep-swapper-model`

Default: `iperov/elon_musk_224`

Choices:

* `druuzil`
* `edel`
* `iperov`
* `jen`
* `mats`
* `rumateus`

Example: `--deep-swapper-model iperov/jackie_chan_224`

### Deep Swapper Morph

Morph between source face and target faces.

Argument: `--deep-swapper-morph`

Default: `80`

Range: `0` to `100` at `1`

Example: `--deep-swapper-morph 100`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
deep_swapper_model = iperov/jackie_chan_224
deep_swapper_morph = 100
```


# Expression Restorer

## CLI Arguments

### Expression Restorer Model

Choose the model responsible for restoring the expression.

Argument: `--expression-restorer-model`

Default: `live_portrait`

Choices:

* `live_portrait`

Example: `--expression-restorer-model live_portrait`

### Expression Restorer Factor

Restore factor of expression from the target face.

Argument: `--expression-restorer-factor`

Default: `80`

Range: `0` to `100` at `1`

Example: `--expression-restorer-factor 100`

### Expression Restorer Areas

Choose the items used for the expression areas.

Argument: `--expression-restorer-areas`

Default: `All`

Choices:

* `upper-face`
* `lower-face`

Example: `--expression-restorer-areas upper-face`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
expression_restorer_model = live_portrait
expression_restorer_factor = 100
expression_restorer_areas = upper-face
```


# Face Debugger

## CLI Arguments

### Face Debugger Items

Visualize face detector and face masker related items.

Argument: `--face-debugger-items`

Default: `face-landmark-5/68` `face-mask`

Choices:

* `bounding-box`
* `face-landmark-5`
* `face-landmark-5/68`
* `face-landmark-68`
* `face-landmark-68/5`
* `face-mask`

Example: `--face-debugger-items bounding-box`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_debugger_items = bounding-box
```


# Face Editor

## CLI Arguments

### Face Editor Model

Choose the model responsible for editing the face.

Argument: `--face-editor-model`

Default: `live_portrait`

Choices:

* &#x20;`live_portrait`

Example: `--face-editor-model live_portrait`

### Face Editor Eyebrow Direction

Specify the eyebrow direction.

Argument: `--face-editor-eyebrow-direction`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eyebrow-direction 0.5`

### Face Editor Eye Gaze Horizontal

Specify the horizontal eye gaze.

Argument: `--face-editor-eye-gaze-horizontal`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eye-gaze-horizontal 0.5`

### Face Editor Eye Gaze Vertical

Specify the vertical eye gaze.

Argument: `--face-editor-eye-gaze-vertical`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eye-gaze-vertical 0.5`

### Face Editor Eye Open Ratio

Specify the ratio of eye opening.

Argument: `--face-editor-eye-open-ratio`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-eye-open-ration 0.5`

### Face Editor Lip Open Ratio

Specify the ratio of lip opening.

Argument: `--face-editor-lip-open-ratio`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-lip-open-ration 0.5`

### Face Editor Mouth Grim

Specify the mouth grim.

Argument: `--face-editor-mouth-grim`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-grim 0.5`

### Face Editor Mouth Pout

Specify the mouth pout.

Argument: `--face-editor-mouth-pout`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-pout 0.5`

### Face Editor Mouth Purse

Specify the mouth purse.

Argument: `--face-editor-mouth-purse`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-purse 0.5`

### Face Editor Mouth Smile

Specify the mouth smile.

Argument: `--face-editor-mouth-smile`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-smile 0.5`

### Face Editor Mouth Position Horizontal

Specify the horizontal mouth position.

Argument: `--face-editor-mouth-position-horizontal`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-position-horizontal 0.5`

### Face Editor Mouth Position Vertical

Specify the vertical mouth position.

Argument: `--face-editor-mouth-position-vertical`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-mouth-position-vertical 0.5`

### Face Editor Head Pitch

Specify the head pitch.

Argument: `--face-editor-head-pitch`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-head-pitch 0.5`

### Face Editor Head Yaw

Specify the head yaw.

Argument: `--face-editor-head-yaw`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-head-yaw 0.5`

### Face Editor Head Roll

Specify the head roll.

Argument: `--face-editor-head-roll`

Default: `0`

Range: `-1.0` to `1.0` at `0.05`

Example: `--face-editor-head-roll 0.5`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_editor_model = live_portrait
face_editor_eyebrow_direction = 0.5
face_editor_eye_gaze_horizontal = 0.5
face_editor_eye_gaze_vertical = 0.5
face_editor_eye_open_ratio = 0.5
face_editor_lip_open_ratio = 0.5
face_editor_mouth_grim = 0.5
face_editor_mouth_pout = 0.5
face_editor_mouth_purse = 0.5
face_editor_mouth_smile = 0.5
face_editor_mouth_position_horizontal = 0.5
face_editor_mouth_position_vertical = 0.5
face_editor_head_pitch = 0.5
face_editor_head_yaw = 0.5
face_editor_head_roll = 0.5
```


# Face Enhancer

## CLI Arguments

### Face Enhancer Model

Choose the model responsible for enhancing the face.

Argument: `--face-enhancer-model`

Default: `gfpgan_1.4`

Choices:

* `codeformer`
* `gfpgan_1.2`
* `gfpgan_1.3`
* `gfpgan_1.4`
* `gpen_bfr_256`
* `gpen_bfr_512`
* `gpen_bfr_1024`
* `gpen_bfr_2048`
* `restoreformer_plus_plus`

Example: `--face-enhancer-model codeformer`

### Face Enhancer Blend

Blend the enhanced into the previous face.

Argument: `--face-enhancer-blend`

Default: `80`

Range: `0` to `100` at `1`

Example: `--face-enhancer-blend 100`

### Face Enhancer Weight

Specify the degree of weight applied to the face.

Argument: `--face-enhancer-weight`

Default: `0.5`

Range: `0.0` to `1.0` at `0.05`

Example: `--face-enhancer-weight 1.0`

## Default Overrides

Modify the `facefusion.ini` file to override the defaults.

```ini
[processors]
face_enhancer_model = codeformer
face_enhancer_blend = 100
face_enhancer_weight = 1.0
```




---

[Next Page](/llms-full.txt/1)

