Skip to content
Home » ReActor Faceswap in Animation with Stable Diffusion ComfyUI

ReActor Faceswap in Animation with Stable Diffusion ComfyUI

Today, we’re diving into an exciting tutorial that will walk you through the art of multiple character faceswaps in your animations using Stable Diffusion ComfyUI. And here’s the best part – it’s easier than you might think. With the ReActor Faceswap, the process gets even smoother compared to its use in Automatic 11 11. By the end of this guide, you’ll be equipped to create a versatile workflow in ComfyUI, allowing you to perform faceswaps for animation whenever you please.

 

Here’s your step-by-step guide

  1. Installing the ReActor Node for ComfyUI

First things first, ensure you have the ReActor Node for ComfyUI installed. You can do this by heading to the ComfyUI Manager and searching for “ReActor Node for ComfyUI.” Once found, hit the install button, and then give your ComfyUI a restart to make it effective.

  1. Building Upon Your Existing Workflow

Let’s build upon your existing workflow, the one for the AnimateDiff video-to-video process. If you haven’t created this workflow yet, it’s worth taking the time to set it up. It’ll be your animation backbone.

  1. Unchanged Line Art Model in ControlNet Group

In this workflow, the Line Art model within the ControlNet Group remains unchanged. It continues to play a vital role in your animation journey.

  1. The AnimateDiff Custom Nodes

You’ve got the AnimateDiff Custom Nodes in place for the generation of your animation video clip. These nodes are an integral part of your process.

  1. Introducing the ReActor Faceswap Node Group

Now, we reach the exciting part – the ReActor Faceswap node group. After the Latent Upscale and KSampler, it’s time to bring in the magic.

  1. The ReActor Faceswap Processor Node

The ReActor Faceswap Processor Node is your gateway to magic. To add this, you might need to type “ReActor” in the search bar as it might not appear in the right-click menu. Once you’ve spotted it, select it and place it in your workflow.

  1. Setting the Stage

Now, let’s set the stage for your faceswap extravaganza. Connect the Load Image node with your character’s face image. This image serves as the source for your faceswap.

  1. Integrating VAE Decode

Next up, connect the VAE Decode image to the ReActor Faceswap node’s input_image. This is where the magic of faceswapping takes place.

  1. Tweaking Source and Input Face Index

Now, set your source face index and input face index as per your requirements. In this example, we’ll face-swap only one character, so both source and input face index remain at 0.

  1. Connecting the Dots

Last but not least, connect the output image from the ReActor node to the Video Combine Images node. For this process, ensure your frame rate is set to 24 and the format is set to mp4, with the other settings unchanged from your previous tutorial.

  1. Queue Prompt and Watch the Magic Unfold

All set? Great! Hit “Queue Prompt” and wait for the magic to unfold. As your animation takes shape, you’ll notice the results are marked by a distinctive, rainbow-style, shiny color. It’s the unique style that comes from the IP Adapter, and the character’s face during the dance is now transformed using your faceswap source image.

You can easily preview each frame image in the Upscale image section, offering you a glimpse into all the frames from the video source and the preview images from ControlNet results.

Now, how about performing multiple character faceswaps in a single animation video clip? Let’s find out.

Creating a New Video Generation

Let’s set the stage for a new video-to-video animation, but this time, we’ve got a source video with two characters dancing. KSampler is hard at work.

Deconstructing the Workflow for Dual Faceswaps

As we create this masterpiece, you’ll notice two sets of ReActor Faceswap custom nodes connected in this workflow. The disconnected Video Combine node to the left was generated previously during testing, without ReActor Faceswap in play. It’s here to show you how the character faces look without the magic.

Dual Faceswaps

On the right side, the Video Combine node integrates the ReActor Faceswap node into the AI generation process. Here’s how it works:

  • The first ReActor Faceswap group tackles the left character. With a source face index and input face index set to 0, it’s dedicated to handling the character on the left.
  • On the other side, we’ve got the second ReActor Faceswap group to tackle the character on the right. With a source face index and input face index set to 1, it’s tasked with working its magic on the right-side character.

That’s the secret sauce behind handling two characters in one animation. If you have a single image featuring both characters, you can use a single ReActor Node connected to a single Load Image. Set the source face index and input face index as “0, 1.”

The Ultimate Workflow for Multiple Character Faceswaps

With this workflow in place, you’re equipped to create animation videos like a pro, with the added benefit of reusability. In stark contrast to Automatic 11 11, which doesn’t save your settings or workflows for future use, ComfyUI empowers you to preserve and reuse your workflows.

Should you need a step-by-step tutorial on ReActor Faceswaps in Automatic 11 11, don’t hesitate to explore our previous video. It delves into the fascinating world of faceswaps for one character or multiple characters.

Now, you’re all set to take your animation game to new heights with ComfyUI and ReActor. It’s your time to shine!

Stay tuned for more exciting tutorials and explore the endless possibilities of Stable Diffusion.

Until next time, happy animating!

 

Resources:

ReActor Face Swap with AnimateDiff Workflow : AnimateDiff_ControlNet_Ipadapter_ReActor.Zip

ComfyUI ReActor Nodes: https://github.com/Gourieff/comfyui-reactor-node