Face Swap Revolution: Mastering ReActor and RIFE for Pro Video Editing
🟢 1️⃣ Workflow Overview

Purpose and Function:
This workflow is designed for face swapping in videos while preserving the original background, motion, and audio. It integrates ReActor face swap, RIFE frame interpolation, and video composition tools to create high-quality, realistic face-swap videos.
Key Features:
Replaces the face of the subject in the video with a target face image.
Uses RIFE VFI (Frame Interpolation) to smoothen transitions and increase frame fluidity.
Combines audio and frames to generate the final face-swapped video.
Use Cases:
Short video creation with face swap effects.
Face replacement in video editing and enhancement.
AI face-swapping experiments and research.
🔥 2️⃣ Core Models
✅ ReActor FaceSwap Model
Model Name:
inswapper_128.onnx
Function:
ReActor is an ONNX-based face-swapping model that merges the target face onto the original video subject, preserving details such as hair and lighting.
Dependencies:
retinaface_resnet50
: Detects facial features.GPEN-BFR-512.onnx
: Enhances face details after swapping.
✅ RIFE Frame Interpolation Model
Model Name:
rife47.pth
Function:
RIFE is a video frame interpolation model that estimates and inserts intermediate frames, making the video smoother and more fluid.
⚙️ 3️⃣ Key Components
1️⃣ VHS_LoadVideo
Function:
Loads the source video and splits it into frames while extracting the audio.
Parameters:
force_rate
: Forces a frame rate (default: 25fps).custom_width/custom_height
: Custom resolution (default:720x1280
).frame_load_cap
: Maximum frame limit.select_every_nth
: Frame sampling rate (e.g., every 2nd frame).
Output:
Extracted frames and audio stream.
Installation:
This node is part of the ComfyUI-VideoHelperSuite plugin.
Installation:
git clone https://github.com/ltdrdata/ComfyUI-VideoHelperSuite.git
2️⃣ LoadImage
Function:
Loads the target face image for the face swap.
Output:
The target face image.
Usage:
Supported formats:
.png
,.jpg
.
3️⃣ ReActorFaceSwap
Function:
Performs face swapping by applying the target face to the video subject.
Parameters:
inswapper_128.onnx
: Face swap model.retinaface_resnet50
: Face detection model.GPEN-BFR-512.onnx
: Face enhancement model.face_boost
: Face refinement and repair.
Output:
Face-swapped video frames.
Installation:
This node is part of the ComfyUI-ReActor-Node plugin.
Installation:
git clone https://github.com/dustysys/ComfyUI-ReActor-Node.git
4️⃣ RIFE VFI (Frame Interpolation)
Function:
Performs frame interpolation on the face-swapped video to make the transitions smooth.
Parameters:
rife47.pth
: The RIFE model.Multiplication factor
: Frame rate multiplier (default:2x
).
Output:
Interpolated video frames.
Installation:
This node is part of the ComfyUI-Frame-Interpolation plugin.
Installation:
git clone https://github.com/mediapipe/ComfyUI-Frame-Interpolation.git
5️⃣ VHS_VideoCombine
Function:
Combines the interpolated frames and the original video’s audio stream into the final video.
Parameters:
frame_rate
: Frame rate of the output video (default:25fps
).format
: Output format (default:H.264 MP4
).crf
: Video compression quality (lower values = higher quality, default:19
).
Output:
The final face-swapped video.
Installation:
Part of the ComfyUI-VideoHelperSuite plugin.
🔨 4️⃣ Workflow Structure
The workflow consists of the following main groups:
🟡 Group 1: Video and Face Loading
Components:
VHS_LoadVideo
+LoadImage
Function:
Loads the source video and the target face image.
Output:
Video frames, audio, and the target face image.
🟢 Group 2: Face Swap Execution
Components:
ReActorFaceSwap
Function:
Applies the target face onto the subject’s face in the video.
Output:
Face-swapped video frames.
🔵 Group 3: Frame Interpolation
Components:
RIFE VFI
Function:
Smoothens the video by inserting intermediate frames.
Output:
Interpolated video frames.
🟣 Group 4: Video Composition
Components:
VHS_VideoCombine
Function:
Combines the frames with the original audio.
Output:
The final face-swapped video.
🔍 5️⃣ Inputs and Outputs
✅ Input Parameters:
Video file: The source video for face swapping.
Face image: The target face for replacement.
Resolution: Customizable output resolution (default:
720x1280
).Frame rate: Default
25fps
.
✅ Output Results:
Face-swapped video with synchronized audio.
Format:
MP4 (H.264)
⚠️ 6️⃣ Considerations
Hardware Requirements:
For smooth performance, use a GPU with at least 12GB of VRAM.
Generation Time:
The face swap and frame interpolation phases are time-consuming, depending on the video length and resolution.
Model Compatibility:
Ensure that the plugin and model versions are compatible to prevent loading issues.
Optimization Tips:
Adjust the frame cap to prevent performance bottlenecks on large videos.
Frame skipping reduces processing time while maintaining quality.
Use lower CRF values for higher-quality output.