facefusion&&人脸替换
源代码下载
https://github.com/facefusion/facefusion
准备环境
# 创建环境
conda create -n facefusion python=3.13
# 切换环境
conda activate facefusion
# 安装环境
python install.py --onnxruntime cuda
# 安装依赖
pip install -r requirements.txt
# 运行
python facefusion.py run
找不到 openvino.dll
set "OPENVINO_PATH=C:\Users\leo\.conda\envs\facefusion\Lib\site-packages\openvino\libs"
set "PATH=%OPENVINO_PATH%;%PATH%"
常用配置
首次运行最好什么配置也不加
3.5版 output_audio_encoder 默认设置没有声音
[paths]
output_path = C:\Users\leo\Videos\
[output_creation]
output_audio_encoder = aac
output_video_encoder = libx264
output_video_preset = veryfast
命令行参数说明
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