Face-swapping in ComfyUI has become more versatile and accessible thanks to a range of dedicated nodes developed for different purposes. Whether you're aiming for realistic face replacements in images, video, or real-time applications, ComfyUI has a node for the task. In this comprehensive guide, we’ve compiled the 9 most essential ComfyUI face swap nodes, giving you a detailed overview of their features and capabilities. All you need to do is check out this blog to explore them.
Additionally, it's worth noting that MimicPC now offers ComfyUI online, eliminating the need for complex installations.
Overview of 9 Faceswap Nodes
Node Name | Author | Stars | Github Link |
comfyui-reactor-node | Gourieff | 1.6k | |
ComfyUI-DeepFuze | SamKhoze | 312 | |
comfyui-instantId-faceswap | nosiu | 198 | |
ComfyUI_FaceShaper | fssorc | 94 | |
CharacterFaceSwap | ArtBot2023 | 70 | |
ComfyUI-InstaSwap | abdozmantar | 50 | |
comfyui-faceless-node | jeffy5 | 36 | |
ComfyUI-FaceSwap | imb101 | 29 | |
ComfyUI_windows_portable_for_faceswap | seinfinity | 2 |
1. ComfyUI-Reactor-Node
- Author: Gourieff
- Stars: 1.6k
- GitHub Link: https://github.com/Gourieff/comfyui-reactor-node
Node Introduction
The comfyui-reactor-node is a fast and simple face swap extension node for ComfyUI, inspired by the ReActor SD-WebUI Face Swap Extension. It provides efficient, uncensored face-swapping with built-in support for GPEN 1024/2048 restoration models and other enhanced features for high-quality face-swap outputs.
Key Features
- Face restoration with GPEN models (1024/2048) for high-resolution faces
- ReActorFaceBoost improves the quality of swapped faces by scaling and restoring face before integration
- Multiple utility nodes, including masking, face model building, and face restoration
- Gender and face detection options allow selective swapping based on characteristics like size or gender.
How it Works
The main process involves selecting an input image, a source image with the face to be swapped, and any necessary face model data. The node processes these elements using GPEN and other algorithms to produce a realistic face swap. Additional nodes can fine-tune aspects of the face or enhance results.
Included Nodes/Models
- Main Nodes: ReActorFaceSwap, ReActorFaceSwapOpt, ReActorFaceBoost.
- Face Model Operations: ReActorSaveFaceModel, ReActorLoadFaceModel, ReActorBuildFaceModel, ReActorMakeFaceModelBatch
- Additional Nodes: ReActorRestoreFace, ReActorImageDuplicator, ImageRGBA2RGB.
2. ComfyUI-DeepFuze
- Author: SamKhoze
- Stars: 312
- GitHub Link: https://github.com/SamKhoze/ComfyUI-DeepFuze
Node Introduction
ComfyUI-DeepFuze is a comprehensive tool that integrates with ComfyUI to enable advanced facial transformations, including lipsyncing, face swapping, voice cloning, and video generation. It combines audio and video realistically, creating seamless synchronization for various multimedia projects, ideal for content creators, animators, and developers.
Key Features
- FaceSwap: High-quality face swap with face restoration
- Lipsyncing: AI-driven lipsyncing for videos or still images with audio
- Voice Cloning: Clone voices from short audio samples across 17 languages
- Enhanced Video Generation: Generate 4K videos with synchronized facial movements
- Language Model Integration: Use OpenAI’s LLM for voice cloning dialogues with API integration.
How it Works
Users load images, audio, or video files into nodes, choose desired transformation settings, and configure parameters for outputs like frame rate or audio quality. Custom nodes like DeepFuze_Lipsync and DeepFuze_FaceSwap provide specialized features (e.g., face enhancement, frame rate adjustments, voice cloning), producing outputs with high resolution and smooth facial transformations.
Included Nodes/Models
- DeepFuze FaceSwap Node: Enhances face swap results in images or videos.
- DeepFuze TTS Node (Voice Cloning): Supports cloning voices in 17 languages.
- DeepFuze Padding Node: Customizable padding for face masks during lipsyncing or face-swapping.
- DeepFuze OpenAI LLM Node: Integrates OpenAI for dialogue generation and text output.
- DeepFuze Save Audio Node: Saves and trims audio output, with playback functionality.
- Meta Batch Manager Node: Manages and loads batch numbers for processing.
3. ComfyUI-InstantId-FaceSwap
- Author: nosiu
- Stars: 198
- GitHub Link: https://github.com/nosiu/comfyui-instantId-faceswap
Node Introduction
The comfyui-instantId-faceswap node leverages InstantID and ControlNet to perform face swapping within ComfyUI, using SDXL checkpoints for accurate face conditioning and embedding. This node includes multiple custom nodes for face embedding, rotating images, and integrating face prompts to enable dynamic, high-quality face swapping with control over image rotation, padding, and alignment.
Key Features
- Face embedding with InstantID and ControlNet
- Custom nodes for face alignment, padding, and keypoint customization
- Workflows for inpainting, image-to-image, and text-to-image generation with InstantID
- Support for customized rotation angles and padding adjustments
- Multiple face references for complex face swaps and transformations.
How it Works
Through custom nodes like Load Insightface and Apply instantId adapter, users load models and apply InstantID adapters to create precise face embeddings. Keypoint customization and angle adjustments help align faces correctly, while ControlNet enhances accuracy. Various workflows allow blending, enhancing, and fine-tuning faces for specific image or video needs.
Included Nodes/Models
- Load Insightface: Loads face models
- Apply InstantId Adapter: Adds InstantID model to the face
- FaceEmbed Combine: Combines face embeddings
- Rotate Image: Adjusts image angles for alignment
- Preprocess Image for InstantId: Prepares control images for InstantID ControlNet integration.
4. ComfyUI_FaceShaper
- Author: fssorc
- Stars: 94
- GitHub Link: https://github.com/fssorc/ComfyUI_FaceShaper
Node Introduction
ComfyUI_FaceShaper is a pre-processing tool that adjusts the facial shape of an image to match the target face before face-swapping. It applies liquefying and stretching techniques to align the face shape, making it ideal for use with other face-swapping nodes to improve realism when original and target face shapes differ significantly.
Key Features
- Supports multiple face alignment types, including JawLine for large-to-small face shape adjustments
- V2 update introduces a 3-step process for cut-out, alignment, and re-integration
- Multiple face-recognition methods: Insightface, MediaPipe, or face-alignment for flexibility
- Customizable for both tilted and straight faces.
How it Works
Users cut out the face region, align it based on facial structure, and match the shapes before pasting it back to the original image. This workflow improves outcomes when combined with face-swapping nodes by ensuring that the face shape of the original aligns closely with the target, resulting in more natural swaps.
Included Nodes/Models
- Face Mask Node: Generates face masks from crop information
- AlignType JawLine: Aligns face shapes based on jawline
- Pre-processing Steps: Image cutout, alignment, and shape matching
- Integration with LivePortrait or DZ_FaceDetailer workflows for enhanced outputs.
5. CharacterFaceSwap
- Author: ArtBot2023
- Stars: 70
- GitHub Link: https://github.com/ArtBot2023/CharacterFaceSwap
Node Introduction
CharacterFaceSwap is a tool designed to facilitate face swapping in images, leveraging pre-trained deep-learning models. The node can automatically detect and swap faces, providing a seamless transition for character or portrait images. It is intended to be used within ComfyUI for easier workflow integration and to enhance creative applications like character customization or animation.
Key Features
- Face detection and alignment: Automatically detects faces and aligns them for accurate swapping.
- Portrait and animation compatibility: Suitable for both static portraits and animated character faces.
- Pre-trained deep learning models: Uses models trained on large datasets to ensure high-quality results.
- User-friendly integration: Easy to integrate into a larger ComfyUI workflow for fast face-swapping tasks.
How it Works
The node works by detecting faces from two input images (source and target) using a pre-trained model. After detecting and aligning the faces, it swaps the facial features of the source face with the target face, ensuring the most realistic output possible. The process is streamlined for users, with minimal input required for optimal results.
Included Nodes/Models
- Face Detection Model: Detects faces in the images.
- Face Alignment Models: Aligns the facial features to ensure smooth transitions between the swapped faces.
- Face-Swapping Model: Swaps the detected face of the source with the face of the target image.
6. ComfyUI-InstaSwap
- Author: abdozmantar
- Stars: 50
- GitHub Link: https://github.com/abdozmantar/ComfyUI-InstaSwap
Node Introduction
ComfyUI-InstaSwap is a simple yet effective face-swapping node that integrates seamlessly into the ComfyUI framework. It focuses on providing quick face swaps with minimal user input, aimed at improving the face-swapping experience for both beginners and professionals.
Key Features
- Fast face swapping: Easy to use and performs face swaps with minimal configuration.
- Supports multiple image types: Can be used for both static images and animated images.
- Lightweight: A simple, lightweight node that adds face-swapping functionality without overhead.
- Integration with ComfyUI: Works within the ComfyUI environment, allowing users to chain it with other nodes for extended workflows.
How it Works
The node operates by receiving two images: one with the source face and another as the target face. Users can select which faces to replace in the source image, and the node will swap them with the corresponding target face. The process is optimized for quick swapping, making it a perfect tool for efficient face-swapping tasks.
Included Nodes/Models
- Face Detection: Detects and aligns faces from both source and target images for accurate swapping.
- Face-Swapping Model: Uses a pre-trained deep learning model to swap the face from the source image onto the target face.
7. ComfyUI-Faceless-Node
- Author: jeffy5
- Stars: 36
- GitHub Link: https://github.com/jeffy5/comfyui-faceless-node
Node Introduction
The ComfyUI Faceless Node is a next-generation toolkit designed to handle more complex face manipulation tasks, such as face swapping, face restoration, and face recognition. The node integrates seamlessly into ComfyUI and supports high-end models for face alignment, detection, and enhancement.
Key Features
- Face restoration: Utilizes GFPGAN to restore faces to a higher quality.
- Advanced face swapping: Swaps faces in images using the Inswapper 128 model for high-quality results.
- Face recognition and alignment: Includes models like ArcFace and YOLOFace for accurate face recognition and alignment.
- Gender and age prediction: Capable of predicting gender and age based on facial features.
How it Works
The node detects faces in the source image and target image using advanced detection models. After identifying and aligning the faces, it can swap the faces or restore them for improved quality using models like GFPGAN. The node also performs face recognition to ensure the correct faces are aligned before swapping, enhancing the realism of the output.
Included Nodes/Models
- Face Detection Model (YOLOFace): Detects faces in the images.
- Face Landmarking (2DFAN4, FaceLandmarker): Identifies key points on the face for alignment and swapping.
- Face Swapping Model (Inswapper 128): Swaps the faces between images.
- Face Recognition (ArcFace): Ensures that the correct faces are aligned and swapped.
- Face Restoration (GFPGAN): Restores the quality of faces to enhance the swap.
8. ComfyUI-FaceSwap
- Author: imb101
- Stars: 29
- GitHub Link: https://github.com/imb101/ComfyUI-FaceSwap
Node Introduction
ComfyUI-FaceSwap is a basic face-swapping node for the ComfyUI framework, designed for simplicity and efficiency. It is a straightforward tool that allows users to swap faces in images with minimal configuration. The node is currently CPU-only, with GPU support to be added in future updates.
Key Features
- Simple face swapping: Enables face swapping with just a few configuration steps.
- CPU-based operation: Currently optimized for CPU usage. GPU support will be available in future releases.
- Basic face-swapping: Uses the 128x128 model from Insightface for face detection and swapping.
- Compatibility with ComfyUI workflows: Can be integrated into a larger ComfyUI workflow for more complex face manipulation tasks.
How it Works
The node allows users to input an image with a face to be swapped and a target image with a face to replace it. Users select the face from the source image to swap, and the node will replace it with the selected face from the target image. It uses Insightface’s 128x128 model for face recognition and swapping.
Included Nodes/Models
- Face Detection Model (Insightface 128x128): Detects faces and aligns them for swapping.
- Face-Swapping Model: Performs the actual face swap by replacing the source face with the target face.
9. ComfyUI_Windows_Portable_for_Faceswap
- Author: seinfinity
- Stars: 2
- GitHub Link: https://github.com/seinfinity/ComfyUI_windows_portable_for_faceswap
Node Introduction
This repository provides a portable version of the ComfyUI framework for Windows, specifically optimized for face-swapping in video formats. The node addresses errors encountered during video face-swapping tasks and integrates the VHS_VideoCombine function to handle video frame data processing.
Key Features
- Portable Windows version: A version of ComfyUI tailored for Windows environments, allowing face-swapping to be easily performed on Windows machines.
- Error resolution: Resolves issues encountered when using the VHS_VideoCombine function for video face-swapping tasks.
- Frame data handling: Handles both bytes and non-bytes frame data, ensuring smooth video processing.
- Video face-swapping: Supports swapping faces in video frames and integrating the results into a final video output.
How it Works
The node allows users to perform face-swapping on video frames. The frames are processed using FFmpeg, and the swapped faces are combined into a new video. The node handles frame data carefully to avoid errors and ensures that video metadata is correctly incorporated.
Included Nodes/Models
- VHS_VideoCombine Function: Handles video frame processing and combines them after face-swapping.
- FFmpeg Integration: For video encoding and frame handling during the face-swapping process.
- Frame Data Handling: Ensures that frame data is properly written and processed during the face-swapping operation.
In conclusion, this blog provides a comprehensive list of the top 8 face swap nodes for ComfyUI, helping you easily navigate the powerful tools available for face-swapping tasks. With these nodes, you can create customized face swap workflows to suit your needs. Plus, thanks to MimicPC’s online ComfyUI platform, you can start building and running your face swap projects directly without the hassle of installation.