Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates high-quality face swaps using deep learning models for natural and realistic results.
The Face Swap (mtb) node is designed to facilitate the swapping of faces between images using advanced deep learning models from the deepinsight/insightface library. This node allows you to seamlessly replace the face in a target image with a face from a source image, leveraging sophisticated face analysis and swapping techniques. The primary benefit of this node is its ability to perform high-quality face swaps that maintain the natural appearance and expressions of the faces involved. This tool is particularly useful for AI artists looking to create realistic face swaps for artistic projects, digital content creation, or entertainment purposes.
This parameter represents the target image in which you want to swap the face. It should be provided as a tensor. The target image is the one that will receive the new face from the source image.
This parameter represents the source image containing the face you want to swap into the target image. It should be provided as a tensor and must have a batch size of 1. The source image provides the face that will be transferred to the target image.
This parameter is a string that specifies which faces to swap in the target image. It should be a comma-separated list of indices (e.g., "0,1,2"). The indices correspond to the detected faces in the target image, allowing you to select specific faces for swapping. The default value is "0".
This parameter specifies the face analysis model to be used for detecting and analyzing faces in the images. It should be one of the available face analysis models, such as "antelopev2", "buffalo_l", "buffalo_m", or "buffalo_sc". The face analysis model is crucial for accurately identifying and extracting facial features.
This parameter specifies the face swap model to be used for performing the face swap. It should be one of the available face swap models, which are typically pre-trained models in ONNX or PTH format. The face swap model is responsible for the actual face swapping process.
This optional parameter is a boolean that determines whether to preserve the alpha channel (transparency) of the target image. If set to True, the alpha channel will be preserved. The default value is True.
The output parameter is the resulting image with the face swapped. It is returned as a tensor. This image will have the face from the source image seamlessly integrated into the target image, maintaining the natural look and feel of the original images.
faces_index
parameter to specify which faces in the target image you want to swap, especially if there are multiple faces detected.preserve_alpha
to True to maintain the alpha channel in the output image.faceswap_model
parameter.<face_num>
faces_index
parameter to ensure that the indices match the detected faces in the target image. Adjust the indices as needed.© Copyright 2024 RunComfy. All Rights Reserved.