Updated: 4/24/2024
Hey AI animation lovers! We're setting off on a thrilling journey into the world of ComfyUI face swapping. Here, we present to you the ComfyUI Reactor workflow, enabling you to swap either a single face or multiple faces in a video!
We will cover:
I guess some of you had used the Roop extension in Automatic 1111 for these kinds of creative experiments, but the code for Roop is discontinued. Motion designers and animators are embracing the new champion of face swapping – ReActor in ComfyUI. This tool isn't just an upgrade from Roop; it's a complete revolution. ReActor has transformed face swapping into a seamless and exciting part of your creative toolkit.
So, why is ReActor the new go-to for face swapping? Here's the rundown:
Now, let's do more than just talk about it; let's dive into how to use Reactor in ComfyUI and how to set up the parameters in Reactor! With ReActor, your creative possibilities are endless.
ComfyUI Reactor is a fast and simple face swap extension node for ComfyUI. It leverages multiple models to facilitate face detection, face swapping, and face restoration, all while maintaining ease of use.
Alright, let's dive into the exciting process of crafting your workflow. With Reactor, you'll be able to add some incredible face swap effects to your animations.
First things first, you need to pick your 'source image' - think of this as the face donor. Then, choose your 'input image' – that's the lucky recipient of the new face.
We’ve already download inswapper_128.onnx Model, pre-trained models inswapper_128.onnx, which are provided by InsightFace.
Face Detection is like having a digital detective that spots faces in both your source and input images. We've got a variety of detectives - resnet50, mobile0.25, YOLOv5l, and YOLOv5n. But our go-to is the retinaface_resnet50. Its performance well.
Here, you can pick a model for face restoration. Some prefer GF PGN, but give Code Forer a try - it’s also great!
These settings are like tuning your guitar. The default settings are 1.00 for visibility and 0.75 for CodeFormer weight, but don't hesitate to play around and see what tunes you can create.
The 'detect genders' option decides if you want the model to figure out the gender in the images. ReActor will swap a face only if it meets the given condition. In my experience, setting it to 'no' gives great results. maybe It's like telling the model, "All eyes on the face, model babe!"
Face Index helps the system identify each face in your images. The faces are tagged from left to right and top to bottom in their respective images. This way, the system knows exactly who's who.
Got just one face to swap? Easy! Both the source face and the input face will have an index of 0.
Now, if you're feeling ambitious and want to swap multiple faces, here's how it's done:
Here's a handy tip - consider using a frame interpolator. Imagine it as a time machine for your video frames. It works wonders by reducing the number of frames you need to process initially and then brilliantly reconstructs them later. This is particularly useful if you've had to compromise on your video's quality for the sake of speedier processing. Think of this step as a magic wand that helps you recapture some of that lost clarity and detail.
You can also resize your video images before passing them to the interpolator. While it's difficult to achieve the quality of the original file, it's certainly better than nothing.
Author: RunComfy Editors
Our team of editors had been working with AI for more than 15 years, starting with NLP/Vision in the age of RNN/CNN. We had amassed tremendous amount of experiences on AI Chatbot/Art/Animation, such as BERT/GAN/Transformer, etc. Talk to us if you need help on AI art, animation and video.
© Copyright 2024 RunComfy. All Rights Reserved.