FaceFuison Python Lib
FaceFusion is a very nice face swapper and enhancer.
Requirements
python: >=3.9
Installation
CPU support:
pip install facefusionlib
GPU support:
First of all, you need to check if your system supports the onnxruntime-gpu.
Go to https://onnxruntime.ai and check the installation matrix.
If yes, just run:
pip install facefusionlib[gpu]
Usage
from facefusionlib import swapper
from facefusionlib.swapper import DeviceProvider
input_path = 'input.png'
target_path = 'target.png'
result = swapper.swap_face(
source_paths=[input_path],
target_path=target_path,
provider=DeviceProvider.CPU,
detector_score=0.65,
mask_blur=0.7,
skip_nsfw=True,
landmarker_score=0.5
)
print(result)
Metadata
Release files for facefusionlib 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| facefusionlib-1.1.3.tar.gz | 33.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| facefusionlib-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.1 kB
Release files / facefusionlib-1.1.3.tar.gz
| Download URL | facefusionlib-1.1.3.tar.gz |
|---|---|
| Size | 33.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51d4690a657f5aa80ac2c9e57f8d2a882bfcde894bc2fb66650796f2472f1d5f
|
|
BLAKE2b-256 checksum How to use checksums |
05a706de1c3939770d1c556f5fead95ed0f4be09211e49f12459091790511002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.6
|
Release files / facefusionlib-1.1.3-py3-none-any.whl
| Download URL | facefusionlib-1.1.3-py3-none-any.whl |
|---|---|
| Size | 45.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27c66fdec4627066fca9ff3ffc18e59b604a6637a8a70e49dfec4383add12800
|
|
BLAKE2b-256 checksum How to use checksums |
38c1c4ae721b34c49b31617f42c050acc443090c9c91c946469963d266cd9269
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.6
|