High-Performance C++ Implementation of FaceFusion
🚀 Faster, Lighter, and Production-Ready
FaceFusionCpp is a ground-up C++ rewrite of the popular open-source project facefusion. It aims to deliver the exact same state-of-the-art face manipulation capabilities, but with exponentially better performance, a fraction of the memory footprint, and straightforward deployment.
- 🚀 Extreme Performance: Engineered with a highly optimized C++ core and multi-threading architecture, achieving maximum throughput for both images and videos.
- 🧠 Native Hardware Acceleration: Deep, native integration with NVIDIA CUDA and TensorRT for lightning-fast AI inference without the overhead of Python wrappers.
- 📦 Zero Environment Hell: Say goodbye to complex Python virtual environments, dependency conflicts, and package version hell. Just download the pre-built binary and run.
- 💾 Lower Memory Footprint: Dramatically reduced RAM and VRAM consumption, allowing you to run larger batches or higher resolutions on modest hardware.
- 🌍 Cross-Platform: First-class support for both Windows x64 and Linux x64, with seamless setup capabilities.
- 🎭 Face Swapping: Interchange faces in images and videos with staggering fidelity and structural integrity.
- ✨ Face Enhancement: Restore, sharpen, and upscale facial details using advanced restoration models.
- 😊 Expression Restoration: Recover and blend original facial expressions for incredibly natural-looking results.
- 🔍 Super Resolution: Upscale low-resolution inputs without sacrificing quality or introducing artifacts.
- ⚡ Batch Processing: Efficiently handle mixed batches of images and videos simultaneously.
The easiest way to get started is to download the latest pre-built binaries from our Releases Page.
To guarantee optimal performance and seamless execution, ensure your system meets these standards:
| Component | Requirement | Tested Version | Notes |
|---|---|---|---|
| OS | Windows / Linux | Win10 / Ubuntu 24.04 | x64 architecture only |
| CUDA | ≥ 12 | 12.8.1 | Required for GPU acceleration |
| cuDNN | ≥ 9 | 9.19.0 | Required for GPU acceleration |
| TensorRT | ≥ 10 | 10.15.1 | Optional, for absolute max performance |
Extract the downloaded release archive, open a terminal in the folder, and run:
Method 1: Command Line Arguments
# Example CLI usage
./facefusion_cpp --source source.jpg --target target.mp4 --output result.mp4Method 2: Task Configuration File (Recommended for Complex Workflows)
# Example using a YAML task configuration
./facefusion_cpp --task_config config/task_config.yamlFor compilation instructions from source, please refer to the Setup Guide.
Explore our comprehensive documentation portal to unlock the full potential of FaceFusionCpp:
- Getting Started: Installation, system prerequisites, and your first run.
- User Guide: In-depth explanations of modules and workflows.
- CLI Reference: Exhaustive command-line argument handbook.
- Configuration Guide: Advanced tuning via
app_config.yamlandtask_config.yaml. - Hardware Guide: Hardware compatibility specifics and optimization strategies.
- FAQ: Solutions to common questions and troubleshooting.
- Developer Documentation: Architecture deep dives, processes, and contribution rules.
A massive thank you to the creators of the original Python facefusion project for their pioneering work in the open-source community. FaceFusionCpp builds upon their incredible foundation.
This software is strictly intended for educational and research purposes only. Users bear full responsibility for ensuring their usage complies with all applicable local, state, and federal laws and regulations. You must not use this software for illicit activities, deepfakes without consent, or to generate content that infringes upon the rights, privacy, or dignity of any individual.
The developers behind FaceFusionCpp unequivocally disclaim any liability or responsibility for the misuse of this tool.
This project is licensed under the GPLv3 License - see the LICENSE file for complete details.
Built with ❤️ by the FaceFusionCpp Team. For the Community.