FaceFusion Updated to version 3.1.1. This update adds batch function, face change model, and a new UI interface, this time the batch is different from the last version of the job workflow form, the operation is more convenient and simple.
This article uses FaceFusion to explain a certain wrapped client, to get more wrapped client please move:FaceFusion: Video Face Swap Enhancement Tool | Voice Synchronized Video Mouth Moves , check out the end of the article.
Updates
new feature
- pass (a bill or inspection etc)
batch-run
Command to introduce batch function - Add adjustable face masker and face parser
- Updating the UI for Gradio version 5
- Add option to select webcam device in live face swap mode
New Models
- increase awareness of
DeepFaceLive
Model support - additional
hififace_256
face transplant model - Updated frame enhancement model
Optimization and problem fixing
- Optimize age modification processor to reduce halo effect
- rise
---temp-path
parameter to change the temporary resource path - Add video encoder
h264_qsv
cap (a poem)hevc_qsv
- Remove obsolete
--skip-download
parameters - Optimize issues when closing webcam streams
- compulsory use
libvpx-vp9
Codecs forwebm
deal with - Fix inconsistent preview updates
- Fix video length issue when restoring audio
- Fixing OpenVINO Issues
- Add progress bar for video extraction and merging
Additional Updates
I've made further optimizations and refinements to version 3.1.1
- Embedded batch processing system, now with the option to toggle the
normal mode
cap (a poem)batch mode
Two kinds. - Batch mode supports batch changing of pictures and videos.
batch mode
📢 Batch mode is an experimental feature, please also feedback if you encounter bugs! 📢
Two folders need to be prepared before using batch mode 📂
One for storing face pictures. (Picture resolution does not have to be consistent, note that formatting needs to be uniform!)
One to put the pictures/videos you need to change. (Pictures and videos are fine! I put the video here)
(!!!! Ensure that there are no special characters such as Chinese in the file path or file name !!!!)
(!!!! Ensure that there are no special characters such as Chinese in the file path or file name !!!!)
(!!!! Ensure that there are no special characters such as Chinese in the file path or file name !!!!)
Open FaceFusion and select Batch Mode.
Fill in the path to the face swap image here in the source file
Windows path example:D:\AI\DUDU\facefusion\test
MAC path example:/Users/ccua/Downloads/Dom-Lab/face/test
Choose the image format, you are prepared to choose jpg if jpg, png if png.(Note that the format has a case difference! JPG is not the same as jpg!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
Destination file here fill in the path where you want to change the video/picture.
Windows path example:D:\AI\DUDU\facefusion\target
MAC path example:/Users/ccua/Downloads/Dom-Lab/face/target
Select the target file format, keep the same format with the file format in the folder. (Note that the format is case sensitive! MP4 is not the same as mp4!!!)
Make sure all the above parameters are set and click Start. The batch will start executing in the background. You need to check the progress on the launcher.
Progress View.
The generated results are viewed in the output directory after execution.
deepfacelive model usage
Execution mode is selected heredeepfacelive
. Cancelface transplant
Options.
The bottom will appeardeep face transplant model
options (as in computer software settings)
There are a lot of star models in here by default, all of which are already trained.
for exampleelon_musk_224
It's Elon Musk.emilia_clarke_244
It's Emilia Clarke's (Dragon Mom).
after thattarget document
Upload the picture/video you want to change, you can see the preview has the corresponding effect.
However, in practice, some times the change of face can be very "mushy". This has to do with the choice ofdeepfacelive
model is relevant, and checking thefacial enhancement
cap (a poem)frame enhancement
Not valid for generated results.
The effect of the video
take note of
Because of the relatively large size of the model (almost 100G or so), I only have in the integration pack theiperov/
A Musk model at the beginning. If you need other models, you can download them at this address.
https://huggingface.co/facefusion
Downloaded models are saved to.assets\models\ suffixes
For examplefacefusion/deepfacelive-models-edel
The model here is downloaded to.assets\models\edel
Center.
Custom Models
How to use your own traineddeepfacelive
Models?
About trainingdeepfacelive
Due to space constraints, we will not expand in detail here, so you can search and learn on your own.
In the project root directory.assets\models\
Create acustom
file (paper)
Put your own trained model (.dfm file) into the.assets\models\custom
directory
Restart FaceFusion indeep face transplant model
The options are pulled down to the bottom to see the custom model files that were put in.
common problems
- Q: How much configuration is needed for batch mode? How is it different from normal mode?
- A: No difference! One is executed individually, one is executed in a batch queue! Prepare a larger hard disk can be (the execution of the need to slice video frames, the longer you prepare the video, the more frames will be sliced, taking up more hard disk!)
- Q: Difference between batch mode and job workflow
- A: Batch mode is based on job workflow, the freedom of job workflow can be scheduled high and difficult! Batch mode is simple and more suitable for whites!
- Q: Can I perform other operations while executing a batch?
- A: Do not switch to normal mode for face swap or preview!
- Q: Is it a problem to shut down the program halfway through execution?
- A: Closing the program while performing a face swap will cause the cache frame file of the current video to remain on the local hard disk. The solution is to delete the file in the root directory of the integration package.
\Cache\VideoCache
The contents of the folder are sufficient.
- Q: Why are there only three modes in batch mode
- A: Other modes will be supported later, still under development and testing.
- Q: Can I change multiple videos for one image in batch mode?
- A: You can have one-to-many and many-to-many.
An example:
Put in a picture and put in three videos. Finally it will generate three videos to change the face according to this picture.
Put in two pictures and put in a video. Finally it will generate two videos to change the face according to this picture.
Put in three pictures and put in three videos. At the end it will generate nine videos to change the face according to this picture.
Configuration Requirements
WIN
Windows N card requires 6G of video memory
Integration package comes with cuda environment, no need to install additional cuda
Attention 10-series graphics card users 👇🏻👇🏻
If the integration package is running with a cuda-related error, the execution method should be canceled.cuda
option, selectcpu (computer)
The
MAC
MAC Apple Silicon M1/M2/M3/M4 Chip
Recommended 8G RAM or more