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
Get Started

Documentation

ComfyUI ReActor: Custom Nodes for Face Swapping

Overview

The ComfyUI ReActor repository provides a collection of custom nodes designed to enhance the capabilities of ComfyUI with advanced face-swapping features. This repository is intended to offer SFW-friendly face swap and restoration functionalities, enriching UI workflows by leveraging innovative models and tools while integrating safety features such as nudity detection to prevent misuse with inappropriate content.

Installation

Standalone (Portable) ComfyUI for Windows

To install these custom nodes for a Windows standalone version of ComfyUI, follow these steps:

  1. Visual Studio Installation:

  2. Node Installation via ComfyUI Manager:

    • Open ComfyUI Manager, navigate to "Install Custom Nodes," then search for "ReActor" and click "Install."
  3. Manual Installation:

    • Go to ComfyUI\custom_nodes, open the console, and run:
      git clone https://github.com/Gourieff/ComfyUI-ReActor
      
  4. Script Execution:

    • Navigate to ComfyUI\custom_nodes\ComfyUI-ReActor and run install.bat.
  5. Model Files:

    • Download required models (e.g., face_yolov8m.pt) from Assets and place them in the appropriate ComfyUI directories (models/ultralytics/bbox, models/sams).
  6. Run ComfyUI:

    • Start ComfyUI and access the ReActor nodes from the ReActor menu or by using the search function.

Repository Purpose

The primary purpose of this repository is to extend ComfyUI capabilities with specialized nodes for face swapping and restoration. These tools are engineered to handle complex tasks such as gender detection, face model building, and real-time face masking—transforming how users interact with and modify images.

Node Features and Capabilities

The ComfyUI ReActor repository provides the following nodes, each offering unique functionalities:

Special Features

  • Face Restoration: Built-in support for multiple face restoration models.
  • Face Model Management: Creation and management of lightweight, reusable face models.
  • NSFW Detection: Protects against inappropriate content through integrated nudity detection algorithms.
  • Enhanced Performance: Speed optimizations and efficient face detection operations, including gender-specific identification.

Usage in ComfyUI Workflows

By integrating these nodes into ComfyUI workflows, users can achieve advanced image manipulation tasks with greater precision and control. These capabilities include:

  • Creating deepfake videos and images ethically and responsibly.
  • Conducting detailed image analysis and face manipulation with ease.
  • Building complex workflows that incorporate face swapping, masking, restoration, and enhancement, all within the ComfyUI ecosystem.
  • Utilizing utility nodes like ImageRGBA2RGB and ReActorUnload to ensure compatibility and efficient resource management.

The ReActor nodes are essential tools for developers and artists looking to expand the potential of their visual media work while maintaining ethical standards.