ComfyUI-ReActor
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
ReActorFaceSwapOpt
ReActorFaceSwapOpt Node Documentation
Overview
The ReActorFaceSwapOpt node is a specialized component within the ComfyUI framework designed for rapid and efficient face swapping. This node is part of the ComfyUI-ReActor extension, which provides a collection of nodes facilitating seamless face swap operations. The ReActorFaceSwapOpt node specifically offers additional input options, granting users greater control over the face swap process.
What This Node Does
The ReActorFaceSwapOpt node performs face swapping on input images using state-of-the-art techniques. It allows for swapping faces between a source image and a target image, with options to detect specific face genders, set face indexes, and manage face ordering. This node is particularly useful in workflows where precise control and customization are required.
Inputs Accepted
The ReActorFaceSwapOpt node accepts the following inputs:
- enabled: A boolean input to turn the node on or off, allowing users to bypass the node if necessary.
- input_image: Target image which contains the face(s) to be replaced.
- swap_model: The face swap model to be used for the operation; various models are available.
- facedetection: The face detection method to be used; options include various retinaface and YOLO versions.
- face_restore_model: Model used for face restoration post-swap to enhance detail and likeness.
- face_restore_visibility: A float value determines the visibility of the restored faces.
- codeformer_weight: Float value controlling the weight of the CodeFormer model in the restoration process.
- source_image (optional): Source image with the face(s) to be swapped into the target image.
- face_model (optional): A pre-trained face model to be used in place of a source image.
- options: An optional input that allows for defining additional face swap options through the ReActorOptions node.
- face_boost (optional): Input to connect the ReActorFaceBoost node to enhance face swap quality.
Outputs Produced
The ReActorFaceSwapOpt node generates the following outputs:
- SWAPPED_IMAGE: The main output, an image of the target with swapped faces.
- FACE_MODEL: A face model generated during the swap process, useful for subsequent operations or saving.
- ORIGINAL_IMAGE: The original input image, providing an unaltered bypass variant.
Usage in ComfyUI Workflows
The ReActorFaceSwapOpt node is designed to be used in comprehensive ComfyUI workflows requiring face manipulation. It is typically connected to image input nodes, like Load Image, and can leverage optional nodes like ReActorOptions for fine-tuning. The node effectively manages complex operations, ensuring the face swap is both swift and accurate.
Users can connect downstream nodes to the SWAPPED_IMAGE output to apply further processing or visualization steps. Meanwhile, the output FACE_MODEL can be used to store face models for future use or additional operations in the workflow.
Special Features and Considerations
- Advanced Options: Through connections to nodes like ReActorOptions, users enjoy detailed control over the face swap process, such as face ordering, indexing, and gender-specific detection.
- Face Restoration: Built-in capability to restore and enhance swapped faces using various restoration models, including CodeFormer and GFPGAN.
- Model Flexibility: The node supports multiple model inputs, allowing for experimentation and optimization based on desired outcomes.
- Face Boosting: Integration with ReActorFaceBoost for improved face swap quality via additional pre-swap enhancements.
- SFW Ensured with NSFW Detector: By default, the node includes a check for content that might breach sensitivity guidelines, ensuring compliance with ethical use standards.
Using the ReActorFaceSwapOpt node, users can create dynamic and adaptive face swapping workflows, utilize advanced face detection and restoration options, and result in high-quality outputs suitable for a wide range of applications from animations to custom characters.