Swap faces in video with a model you can actually fine-tune
GHOST is a one-shot face-swap pipeline for images and video that includes the full training stack, pre-trained weights, and an unusually detailed ethics manifesto.

What it does GHOST (Generative High-fidelity One Shot Transfer) swaps a single source face onto target images or videos without per-subject retraining. The repository provides inference scripts, pre-trained generator and discriminator weights, and a complete training pipeline built on PyTorch. It handles both one-to-one swaps and multi-face replacements in a single video clip.
The interesting bit Most face-swap projects release a demo and call it a day; this one publishes an IEEE Access paper and still gives you tunable U-Net backbones, configurable AAD ResBlk blocks, and loss-coefficient knobs for fine-tuning. The README also devotes serious real estate to an ethics policy, explicitly banning non-consensual and malicious use—a rarity in a field where misuse dominates the headlines.
Key highlights
- One-shot transfer for both image-to-image and image-to-video domains.
- Supports swapping multiple distinct faces in a single target video.
- Full training code included, with pre-trained weights and architecture options (U-Net backbones, 1–3 AAD ResBlk blocks).
- Local and Google Colab inference notebooks provided.
- Explicit zero-tolerance ethics stance against illicit or non-consensual use.
Caveats
- Installation instructions still reference the old
sber-swaprepository name, suggesting the documentation has not fully kept pace with the rename. - The README offers no quantitative benchmarks or speed metrics, so comparing quality against other tools is left to eyeballing the example images.
- Training from scratch requires careful loss scheduling; the authors advise disabling eye-detection loss and schedulers in early epochs.
Verdict Computer-vision researchers and VFX tinkerers who want a reproducible, trainable face-swap baseline will find this valuable. If you are looking for a polished consumer app or guaranteed state-of-the-art results without reading a paper, look elsewhere.
Frequently asked
- What is ai-forever/ghost?
- GHOST is a one-shot face-swap pipeline for images and video that includes the full training stack, pre-trained weights, and an unusually detailed ethics manifesto.
- Is ghost open source?
- Yes — ai-forever/ghost is open source, released under the Apache-2.0 license.
- What language is ghost written in?
- ai-forever/ghost is primarily written in Python.
- How popular is ghost?
- ai-forever/ghost has 1.6k stars on GitHub.
- Where can I find ghost?
- ai-forever/ghost is on GitHub at https://github.com/ai-forever/ghost.