{"id":18298119,"url":"https://github.com/gourieff/comfyui-reactor-node","last_synced_at":"2025-05-16T13:03:31.918Z","repository":{"id":185610060,"uuid":"673696181","full_name":"Gourieff/comfyui-reactor-node","owner":"Gourieff","description":"Fast and Simple Face Swap Extension Node for ComfyUI","archived":false,"fork":false,"pushed_at":"2024-04-28T04:34:58.000Z","size":23409,"stargazers_count":883,"open_issues_count":54,"forks_count":84,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-04-28T05:11:40.550Z","etag":null,"topics":["comfyui","face-swapping","stable-diffusion","stable-diffusion-webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gourieff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-02T08:07:38.000Z","updated_at":"2024-04-29T05:27:23.100Z","dependencies_parsed_at":"2023-09-26T22:33:48.121Z","dependency_job_id":"9f80409a-1162-4df0-92c6-68e203e3bb33","html_url":"https://github.com/Gourieff/comfyui-reactor-node","commit_stats":null,"previous_names":["gourieff/comfyui-reactor-node"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gourieff%2Fcomfyui-reactor-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gourieff%2Fcomfyui-reactor-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gourieff%2Fcomfyui-reactor-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gourieff%2Fcomfyui-reactor-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gourieff","download_url":"https://codeload.github.com/Gourieff/comfyui-reactor-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246961952,"owners_count":20861181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","face-swapping","stable-diffusion","stable-diffusion-webui"],"created_at":"2024-11-05T15:05:16.582Z","updated_at":"2025-04-03T08:10:12.488Z","avatar_url":"https://github.com/Gourieff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_NEW_EN.png?raw=true\" alt=\"logo\" width=\"180px\"/\u003e\n\n  ![Version](https://img.shields.io/badge/node_version-0.5.2_beta1-green?style=for-the-badge\u0026labelColor=darkgreen)\n\n  \u003c!--\u003csup\u003e\n  \u003cfont color=brightred\u003e\n\n  ## !!! [Important Update](#latestupdate) !!!\u003cbr\u003eDon't forget to add the Node again in existing workflows\n  \n  \u003c/font\u003e\n  \u003c/sup\u003e--\u003e\n  \n  \u003ca href=\"https://boosty.to/artgourieff\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://lovemet.ru/img/boosty.jpg\" width=\"108\" alt=\"Support Me on Boosty\"/\u003e\n    \u003cbr\u003e\n    \u003csup\u003e\n      Support This Project\n    \u003c/sup\u003e\n  \u003c/a\u003e\n\n  \u003chr\u003e\n  \n  [![Commit activity](https://img.shields.io/github/commit-activity/t/Gourieff/comfyui-reactor-node/main?cacheSeconds=0)](https://github.com/Gourieff/comfyui-reactor-node/commits/main)\n  ![Last commit](https://img.shields.io/github/last-commit/Gourieff/comfyui-reactor-node/main?cacheSeconds=0)\n  [![Opened issues](https://img.shields.io/github/issues/Gourieff/comfyui-reactor-node?color=red)](https://github.com/Gourieff/comfyui-reactor-node/issues?cacheSeconds=0)\n  [![Closed issues](https://img.shields.io/github/issues-closed/Gourieff/comfyui-reactor-node?color=green\u0026cacheSeconds=0)](https://github.com/Gourieff/comfyui-reactor-node/issues?q=is%3Aissue+is%3Aclosed)\n  ![License](https://img.shields.io/github/license/Gourieff/comfyui-reactor-node)\n\n  English | [Русский](/README_RU.md)\n\n# ReActor Node for ComfyUI\n\n\u003c/div\u003e\n\n### The Fast and Simple Face Swap Extension Node for ComfyUI, based on [ReActor](https://github.com/Gourieff/sd-webui-reactor) SD-WebUI Face Swap Extension\n\n\u003e This Node goes without NSFW filter (uncensored, use it on your own [responsibility](#disclaimer)) \n\n\u003cdiv align=\"center\"\u003e\n\n---\n[**What's new**](#latestupdate) | [**Installation**](#installation) | [**Usage**](#usage) | [**Troubleshooting**](#troubleshooting) | [**Updating**](#updating) | [**Disclaimer**](#disclaimer) | [**Credits**](#credits) | [**Note!**](#note)\n\n---\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/uploads/demo.gif?raw=true\" alt=\"demo\" width=\"100%\"/\u003e\n\u003c/div\u003e\n\n\u003ca name=\"latestupdate\"\u003e\n\n## What's new in the latest update\n\n### 0.5.2 \u003csub\u003e\u003csup\u003eBETA1\u003c/sup\u003e\u003c/sub\u003e\n\n- ReSwapper models support. Although Inswapper still has the best similarity, but ReSwapper is evolving - thanks @somanchiu https://github.com/somanchiu/ReSwapper for the ReSwapper models and the ReSwapper project! This is a good step for the Community in the Inswapper's alternative creation!\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.2-whatsnew-03.jpg?raw=true\" alt=\"0.5.2-whatsnew-03\" width=\"100%\"/\u003e\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.2-whatsnew-04.jpg?raw=true\" alt=\"0.5.2-whatsnew-04\" width=\"100%\"/\u003e\n\nYou can download ReSwapper models here:\nhttps://huggingface.co/datasets/Gourieff/ReActor/tree/main/models\u003cbr\u003e\nJust put them into the \"models/reswapper\" directory.\n\n### 0.5.2 \u003csub\u003e\u003csup\u003eALPHA1\u003c/sup\u003e\u003c/sub\u003e\n\n- New node \"Unload ReActor Models\" - is useful for complex WFs when you need to free some VRAM utilized by ReActor\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.2-whatsnew-01.jpg?raw=true\" alt=\"0.5.2-whatsnew-01\" width=\"100%\"/\u003e\n\n- Support of ORT CoreML and ROCM EPs, just install onnxruntime version you need\n- Install script improvements to install latest versions of ORT-GPU\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.2-whatsnew-02.jpg?raw=true\" alt=\"0.5.2-whatsnew-02\" width=\"100%\"/\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e\u003ca\u003ePrevious versions\u003c/a\u003e\u003c/summary\u003e\n\n### 0.5.1\n\n- Support of GPEN 1024/2048 restoration models (available in the HF dataset https://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/facerestore_models)\n- ReActorFaceBoost Node - an attempt to improve the quality of swapped faces. The idea is to restore and scale the swapped face (according to the `face_size` parameter of the restoration model) BEFORE pasting it to the target image (via inswapper algorithms), more information is [here (PR#321)](https://github.com/Gourieff/comfyui-reactor-node/pull/321)\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.1-whatsnew-01.jpg?raw=true\" alt=\"0.5.1-whatsnew-01\" width=\"100%\"/\u003e\n\n[Full size demo preview](https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.1-whatsnew-02.png)\n\n- Sorting facemodels alphabetically\n- A lot of fixes and improvements\n\n### [0.5.0 \u003csub\u003e\u003csup\u003eBETA4\u003c/sup\u003e\u003c/sub\u003e](https://github.com/Gourieff/comfyui-reactor-node/releases/tag/v0.5.0)\n\n- Spandrel lib support for GFPGAN\n\n### 0.5.0 \u003csub\u003e\u003csup\u003eBETA3\u003c/sup\u003e\u003c/sub\u003e\n\n- Fixes: \"RAM issue\", \"No detection\" for MaskingHelper\n\n### 0.5.0 \u003csub\u003e\u003csup\u003eBETA2\u003c/sup\u003e\u003c/sub\u003e\n\n- You can now build a blended face model from a batch of face models you already have, just add the \"Make Face Model Batch\" node to your workflow and connect several models via \"Load Face Model\"\n- Huge performance boost of the image analyzer's module! 10x speed up! Working with videos is now a pleasure!\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.0-whatsnew-05.png?raw=true\" alt=\"0.5.0-whatsnew-05\" width=\"100%\"/\u003e\n\n### 0.5.0 \u003csub\u003e\u003csup\u003eBETA1\u003c/sup\u003e\u003c/sub\u003e\n\n- SWAPPED_FACE output for the Masking Helper Node\n- FIX: Empty A-channel for Masking Helper IMAGE output (causing errors with some nodes) was removed\n\n### 0.5.0 \u003csub\u003e\u003csup\u003eALPHA1\u003c/sup\u003e\u003c/sub\u003e\n\n- ReActorBuildFaceModel Node got \"face_model\" output to provide a blended face model directly to the main Node:\n\nBasic workflow [💾](https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/workflows/ReActor--Build-Blended-Face-Model--v2.json)\n\n- Face Masking feature is available now, just add the \"ReActorMaskHelper\" Node to the workflow and connect it as shown below:\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.0-whatsnew-01.jpg?raw=true\" alt=\"0.5.0-whatsnew-01\" width=\"100%\"/\u003e\n\nIf you don't have the \"face_yolov8m.pt\" Ultralytics model - you can download it from the [Assets](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/detection/bbox/face_yolov8m.pt) and put it into the \"ComfyUI\\models\\ultralytics\\bbox\" directory\n\u003cbr\u003e\nAs well as [\"sam_vit_b_01ec64.pth\"](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/sams/sam_vit_b_01ec64.pth) model - download (if you don't have it) and put it into the \"ComfyUI\\models\\sams\" directory;\n\nUse this Node to gain the best results of the face swapping process:\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.0-whatsnew-02.jpg?raw=true\" alt=\"0.5.0-whatsnew-02\" width=\"100%\"/\u003e\n\n- ReActorImageDublicator Node - rather useful for those who create videos, it helps to duplicate one image to several frames to use them with VAE Encoder (e.g. live avatars):\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.0-whatsnew-03.jpg?raw=true\" alt=\"0.5.0-whatsnew-03\" width=\"100%\"/\u003e\n\n- ReActorFaceSwapOpt (a simplified version of the Main Node) + ReActorOptions Nodes to set some additional options such as (new) \"input/source faces separate order\". Yes! You can now set the order of faces in the index in the way you want (\"large to small\" goes by default)!\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.5.0-whatsnew-04.jpg?raw=true\" alt=\"0.5.0-whatsnew-04\" width=\"100%\"/\u003e\n\n- Little speed boost when analyzing target images (unfortunately it is still quite slow in compare to swapping and restoring...)\n\n### [0.4.2](https://github.com/Gourieff/comfyui-reactor-node/releases/tag/v0.4.2)\n\n- GPEN-BFR-512 and RestoreFormer_Plus_Plus face restoration models support\n\nYou can download models here: https://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/facerestore_models\n\u003cbr\u003ePut them into the `ComfyUI\\models\\facerestore_models` folder\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.2-whatsnew-04.jpg?raw=true\" alt=\"0.4.2-whatsnew-04\" width=\"100%\"/\u003e\n\n- Due to popular demand - you can now blend several images with persons into one face model file and use it with \"Load Face Model\" Node or in SD WebUI as well;\n\nExperiment and create new faces or blend faces of one person to gain better accuracy and likeness!\n\nJust add the ImpactPack's \"Make Image Batch\" Node as the input to the ReActor's one and load images you want to blend into one model:\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.2-whatsnew-01.jpg?raw=true\" alt=\"0.4.2-whatsnew-01\" width=\"100%\"/\u003e\n\nResult example (the new face was created from 4 faces of different actresses):\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.2-whatsnew-02.jpg?raw=true\" alt=\"0.4.2-whatsnew-02\" width=\"75%\"/\u003e\n\nBasic workflow [💾](https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/workflows/ReActor--Build-Blended-Face-Model--v1.json)\n\n### [0.4.1](https://github.com/Gourieff/comfyui-reactor-node/releases/tag/v0.4.1)\n\n- CUDA 12 Support - don't forget to run (Windows) `install.bat` or (Linux/MacOS) `install.py` for ComfyUI's Python enclosure or try to install ORT-GPU for CU12 manually (https://onnxruntime.ai/docs/install/#install-onnx-runtime-gpu-cuda-12x)\n- Issue https://github.com/Gourieff/comfyui-reactor-node/issues/173 fix\n\n- Separate Node for the Face Restoration postprocessing (FR https://github.com/Gourieff/comfyui-reactor-node/issues/191), can be found inside ReActor's menu (RestoreFace Node)\n- (Windows) Installation can be done for Python from the System's PATH\n- Different fixes and improvements\n\n- Face Restore Visibility and CodeFormer Weight (Fidelity) options are now available! Don't forget to reload the Node in your existing workflow\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.1-whatsnew-01.jpg?raw=true\" alt=\"0.4.1-whatsnew-01\" width=\"100%\"/\u003e\n\n### [0.4.0](https://github.com/Gourieff/comfyui-reactor-node/releases/tag/v0.4.0)\n\n- Input \"input_image\" goes first now, it gives a correct bypass and also it is right to have the main input first;\n- You can now save face models as \"safetensors\" files (`ComfyUI\\models\\reactor\\faces`) and load them into ReActor implementing different scenarios and keeping super lightweight face models of the faces you use:\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.0-whatsnew-01.jpg?raw=true\" alt=\"0.4.0-whatsnew-01\" width=\"100%\"/\u003e\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.0-whatsnew-02.jpg?raw=true\" alt=\"0.4.0-whatsnew-02\" width=\"100%\"/\u003e\n\n- Ability to build and save face models directly from an image:\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/0.4.0-whatsnew-03.jpg?raw=true\" alt=\"0.4.0-whatsnew-03\" width=\"50%\"/\u003e\n\n- Both the inputs are optional, just connect one of them according to your workflow; if both is connected - `image` has a priority.\n- Different fixes making this extension better.\n\nThanks to everyone who finds bugs, suggests new features and supports this project!\n\n\u003c/details\u003e\n\n## Installation\n\n\u003cdetails\u003e\n\t\u003csummary\u003eSD WebUI: \u003ca href=\"https://github.com/AUTOMATIC1111/stable-diffusion-webui/\"\u003eAUTOMATIC1111\u003c/a\u003e or \u003ca href=\"https://github.com/vladmandic/automatic\"\u003eSD.Next\u003c/a\u003e\u003c/summary\u003e\n\n1. Close (stop) your SD-WebUI/Comfy Server if it's running\n2. (For Windows Users):\n   - Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (Community version - you need this step to build Insightface)\n   - OR only [VS C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) and select \"Desktop Development with C++\" under \"Workloads -\u003e Desktop \u0026 Mobile\"\n   - OR if you don't want to install VS or VS C++ BT - follow [this steps (sec. I)](#insightfacebuild)\n3. Go to the `extensions\\sd-webui-comfyui\\ComfyUI\\custom_nodes`\n4. Open Console or Terminal and run `git clone https://github.com/Gourieff/comfyui-reactor-node`\n5. Go to the SD WebUI root folder, open Console or Terminal and run (Windows users)`.\\venv\\Scripts\\activate` or (Linux/MacOS)`venv/bin/activate`\n6. `python -m pip install -U pip`\n7. `cd extensions\\sd-webui-comfyui\\ComfyUI\\custom_nodes\\comfyui-reactor-node`\n8. `python install.py`\n9.  Please, wait until the installation process will be finished\n10. (From the version 0.3.0) Download additional facerestorers models from the link below and put them into the `extensions\\sd-webui-comfyui\\ComfyUI\\models\\facerestore_models` directory:\u003cbr\u003e\nhttps://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/facerestore_models\n11. Run SD WebUI and check console for the message that ReActor Node is running:\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/uploads/console_status_running.jpg?raw=true\" alt=\"console_status_running\" width=\"759\"/\u003e\n\n12.  Go to the ComfyUI tab and find there ReActor Node inside the menu `ReActor` or by using a search:\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/uploads/webui-demo.png?raw=true\" alt=\"webui-demo\" width=\"100%\"/\u003e\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/uploads/search-demo.png?raw=true\" alt=\"webui-demo\" width=\"1043\"/\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eStandalone (Portable) \u003ca href=\"https://github.com/comfyanonymous/ComfyUI\"\u003eComfyUI\u003c/a\u003e for Windows\u003c/summary\u003e\n\n1. Do the following:\n   - Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (Community version - you need this step to build Insightface)\n   - OR only [VS C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) and select \"Desktop Development with C++\" under \"Workloads -\u003e Desktop \u0026 Mobile\"\n   - OR if you don't want to install VS or VS C++ BT - follow [this steps (sec. I)](#insightfacebuild)\n2. Choose between two options:\n   - (ComfyUI Manager) Open ComfyUI Manager, click \"Install Custom Nodes\", type \"ReActor\" in the \"Search\" field and then click \"Install\". After ComfyUI will complete the process - please restart the Server.\n   - (Manually) Go to `ComfyUI\\custom_nodes`, open Console and run `git clone https://github.com/Gourieff/comfyui-reactor-node`\n3. Go to `ComfyUI\\custom_nodes\\comfyui-reactor-node` and run `install.bat`\n4. If you don't have the \"face_yolov8m.pt\" Ultralytics model - you can download it from the [Assets](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/detection/bbox/face_yolov8m.pt) and put it into the \"ComfyUI\\models\\ultralytics\\bbox\" directory\n\u003cbr\u003eAs well as one or both of \"Sams\" models from [here](https://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/sams) - download (if you don't have them) and put into the \"ComfyUI\\models\\sams\" directory\n\n5. Run ComfyUI and find there ReActor Nodes inside the menu `ReActor` or by using a search\n\n\u003c/details\u003e\n\n## Usage\n\nYou can find ReActor Nodes inside the menu `ReActor` or by using a search (just type \"ReActor\" in the search field)\n\nList of Nodes:\n- ••• Main Nodes •••\n   - ReActorFaceSwap (Main Node)\n   - ReActorFaceSwapOpt (Main Node with the additional Options input)\n   - ReActorOptions (Options for ReActorFaceSwapOpt)\n   - ReActorFaceBoost (Face Booster Node)\n   - ReActorMaskHelper (Masking Helper)\n- ••• Operations with Face Models •••\n  - ReActorSaveFaceModel (Save Face Model)\n  - ReActorLoadFaceModel (Load Face Model)\n  - ReActorBuildFaceModel (Build Blended Face Model)\n  - ReActorMakeFaceModelBatch (Make Face Model Batch)\n- ••• Additional Nodes •••\n  - ReActorRestoreFace (Face Restoration)\n  - ReActorImageDublicator (Dublicate one Image to Images List)\n  - ImageRGBA2RGB (Convert RGBA to RGB)\n\nConnect all required slots and run the query.\n\n### Main Node Inputs\n\n- `input_image` - is an image to be processed (target image, analog of \"target image\" in the SD WebUI extension);\n  - Supported Nodes: \"Load Image\", \"Load Video\" or any other nodes providing images as an output;\n- `source_image` - is an image with a face or faces to swap in the `input_image` (source image, analog of \"source image\" in the SD WebUI extension);\n  - Supported Nodes: \"Load Image\" or any other nodes providing images as an output;\n- `face_model` - is the input for the \"Load Face Model\" Node or another ReActor node to provide a face model file (face embedding) you created earlier via the \"Save Face Model\" Node;\n  - Supported Nodes: \"Load Face Model\", \"Build Blended Face Model\";\n\n### Main Node Outputs\n\n- `IMAGE` - is an output with the resulted image;\n  - Supported Nodes: any nodes which have images as an input;\n- `FACE_MODEL` - is an output providing a source face's model being built during the swapping process;\n  - Supported Nodes: \"Save Face Model\", \"ReActor\", \"Make Face Model Batch\";\n\n### Face Restoration\n\nSince version 0.3.0 ReActor Node has a buil-in face restoration.\u003cbr\u003eJust download the models you want (see [Installation](#installation) instruction) and select one of them to restore the resulting face(s) during the faceswap. It will enhance face details and make your result more accurate.\n\n### Face Indexes\n\nBy default ReActor detects faces in images from \"large\" to \"small\".\u003cbr\u003eYou can change this option by adding ReActorFaceSwapOpt node with ReActorOptions.\n\nAnd if you need to specify faces, you can set indexes for source and input images.\n\nIndex of the first detected face is 0.\n\nYou can set indexes in the order you need.\u003cbr\u003e\nE.g.: 0,1,2 (for Source); 1,0,2 (for Input).\u003cbr\u003eThis means: the second Input face (index = 1) will be swapped by the first Source face (index = 0) and so on.\n\n### Genders\n\nYou can specify the gender to detect in images.\u003cbr\u003e\nReActor will swap a face only if it meets the given condition.\n\n### Face Models\n\nSince version 0.4.0 you can save face models as \"safetensors\" files (stored in `ComfyUI\\models\\reactor\\faces`) and load them into ReActor implementing different scenarios and keeping super lightweight face models of the faces you use.\n\nTo make new models appear in the list of the \"Load Face Model\" Node - just refresh the page of your ComfyUI web application.\u003cbr\u003e\n(I recommend you to use ComfyUI Manager - otherwise you workflow can be lost after you refresh the page if you didn't save it before that).\n\n## Troubleshooting\n\n\u003ca name=\"insightfacebuild\"\u003e\n\n### **I. (For Windows users) If you still cannot build Insightface for some reasons or just don't want to install Visual Studio or VS C++ Build Tools - do the following:**\n\n1. (ComfyUI Portable) From the root folder check the version of Python:\u003cbr\u003erun CMD and type `python_embeded\\python.exe -V`\n2. Download prebuilt Insightface package [for Python 3.10](https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp310-cp310-win_amd64.whl) or [for Python 3.11](https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp311-cp311-win_amd64.whl) (if in the previous step you see 3.11) or [for Python 3.12](https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp312-cp312-win_amd64.whl) (if in the previous step you see 3.12) and put into the stable-diffusion-webui (A1111 or SD.Next) root folder (where you have \"webui-user.bat\" file) or into ComfyUI root folder if you use ComfyUI Portable\n3. From the root folder run:\n   - (SD WebUI) CMD and `.\\venv\\Scripts\\activate`\n   - (ComfyUI Portable) run CMD\n4. Then update your PIP:\n   - (SD WebUI) `python -m pip install -U pip`\n   - (ComfyUI Portable) `python_embeded\\python.exe -m pip install -U pip`\n5. Then install Insightface:\n   - (SD WebUI) `pip install insightface-0.7.3-cp310-cp310-win_amd64.whl` (for 3.10) or `pip install insightface-0.7.3-cp311-cp311-win_amd64.whl` (for 3.11) or `pip install insightface-0.7.3-cp312-cp312-win_amd64.whl` (for 3.12)\n   - (ComfyUI Portable) `python_embeded\\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whl` (for 3.10) or `python_embeded\\python.exe -m pip install insightface-0.7.3-cp311-cp311-win_amd64.whl` (for 3.11) or `python_embeded\\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl` (for 3.12)\n6. Enjoy!\n\n### **II. \"AttributeError: 'NoneType' object has no attribute 'get'\"**\n\nThis error may occur if there's smth wrong with the model file `inswapper_128.onnx`\n\nTry to download it manually from [here](https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx)\nand put it to the `ComfyUI\\models\\insightface` replacing existing one\n\n### **III. \"reactor.execute() got an unexpected keyword argument 'reference_image'\"**\n\nThis means that input points have been changed with the latest update\u003cbr\u003e\nRemove the current ReActor Node from your workflow and add it again\n\n### **IV. ControlNet Aux Node IMPORT failed error when using with ReActor Node**\n\n1. Close ComfyUI if it runs\n2. Go to the ComfyUI root folder, open CMD there and run:\n   - `python_embeded\\python.exe -m pip uninstall -y opencv-python opencv-contrib-python opencv-python-headless`\n   - `python_embeded\\python.exe -m pip install opencv-python==4.7.0.72`\n3. That's it!\n\n\u003cimg src=\"https://github.com/Gourieff/Assets/blob/main/comfyui-reactor-node/uploads/reactor-w-controlnet.png?raw=true\" alt=\"reactor+controlnet\" /\u003e\n\n### **V. \"ModuleNotFoundError: No module named 'basicsr'\" or \"subprocess-exited-with-error\" during future-0.18.3 installation**\n\n- Download https://github.com/Gourieff/Assets/raw/main/comfyui-reactor-node/future-0.18.3-py3-none-any.whl\u003cbr\u003e\n- Put it to ComfyUI root And run:\n\n      python_embeded\\python.exe -m pip install future-0.18.3-py3-none-any.whl\n\n- Then:\n\n      python_embeded\\python.exe -m pip install basicsr\n\n### **VI. \"fatal: fetch-pack: invalid index-pack output\" when you try to `git clone` the repository\"**\n\nTry to clone with `--depth=1` (last commit only):\n\n     git clone --depth=1 https://github.com/Gourieff/comfyui-reactor-node\n\nThen retrieve the rest (if you need):\n\n     git fetch --unshallow\n\n## Updating\n\nJust put .bat or .sh script from this [Repo](https://github.com/Gourieff/sd-webui-extensions-updater) to the `ComfyUI\\custom_nodes` directory and run it when you need to check for updates\n\n### Disclaimer\n\nThis software is meant to be a productive contribution to the rapidly growing AI-generated media industry. It will help artists with tasks such as animating a custom character or using the character as a model for clothing etc.\n\nThe developers of this software are aware of its possible unethical applications and are committed to take preventative measures against them. We will continue to develop this project in the positive direction while adhering to law and ethics.\n\nUsers of this software are expected to use this software responsibly while abiding the local law. If face of a real person is being used, users are suggested to get consent from the concerned person and clearly mention that it is a deepfake when posting content online. **Developers and Contributors of this software are not responsible for actions of end-users.**\n\nBy using this extension you are agree not to create any content that:\n- violates any laws;\n- causes any harm to a person or persons;\n- propagates (spreads) any information (both public or personal) or images (both public or personal) which could be meant for harm;\n- spreads misinformation;\n- targets vulnerable groups of people.\n\nThis software utilizes the pre-trained models `buffalo_l` and `inswapper_128.onnx`, which are provided by [InsightFace](https://github.com/deepinsight/insightface/). These models are included under the following conditions:\n\n[From insighface license](https://github.com/deepinsight/insightface/tree/master/python-package): The InsightFace’s pre-trained models are available for non-commercial research purposes only. This includes both auto-downloading models and manually downloaded models.\n\nUsers of this software must strictly adhere to these conditions of use. The developers and maintainers of this software are not responsible for any misuse of InsightFace’s pre-trained models.\n\nPlease note that if you intend to use this software for any commercial purposes, you will need to train your own models or find models that can be used commercially.\n\n### Models Hashsum\n\n#### Safe-to-use models have the following hash:\n\ninswapper_128.onnx\n```\nMD5:a3a155b90354160350efd66fed6b3d80\nSHA256:e4a3f08c753cb72d04e10aa0f7dbe3deebbf39567d4ead6dce08e98aa49e16af\n```\n\n1k3d68.onnx\n\n```\nMD5:6fb94fcdb0055e3638bf9158e6a108f4\nSHA256:df5c06b8a0c12e422b2ed8947b8869faa4105387f199c477af038aa01f9a45cc\n```\n\n2d106det.onnx\n\n```\nMD5:a3613ef9eb3662b4ef88eb90db1fcf26\nSHA256:f001b856447c413801ef5c42091ed0cd516fcd21f2d6b79635b1e733a7109dbf\n```\n\ndet_10g.onnx\n\n```\nMD5:4c10eef5c9e168357a16fdd580fa8371\nSHA256:5838f7fe053675b1c7a08b633df49e7af5495cee0493c7dcf6697200b85b5b91\n```\n\ngenderage.onnx\n\n```\nMD5:81c77ba87ab38163b0dec6b26f8e2af2\nSHA256:4fde69b1c810857b88c64a335084f1c3fe8f01246c9a191b48c7bb756d6652fb\n```\n\nw600k_r50.onnx\n\n```\nMD5:80248d427976241cbd1343889ed132b3\nSHA256:4c06341c33c2ca1f86781dab0e829f88ad5b64be9fba56e56bc9ebdefc619e43\n```\n\n**Please check hashsums if you download these models from unverified (or untrusted) sources**\n\n\u003ca name=\"credits\"\u003e\n\n## Thanks and Credits\n\n\u003cdetails\u003e\n\t\u003csummary\u003e\u003ca\u003eClick to expand\u003c/a\u003e\u003c/summary\u003e\n\n\u003cbr\u003e\n\n|file|source|license|\n|----|------|-------|\n|[buffalo_l.zip](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/buffalo_l.zip) | [DeepInsight](https://github.com/deepinsight/insightface) | ![license](https://img.shields.io/badge/license-non_commercial-red) |\n| [codeformer-v0.1.0.pth](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/facerestore_models/codeformer-v0.1.0.pth) | [sczhou](https://github.com/sczhou/CodeFormer) | ![license](https://img.shields.io/badge/license-non_commercial-red) |\n| [GFPGANv1.3.pth](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/facerestore_models/GFPGANv1.3.pth) | [TencentARC](https://github.com/TencentARC/GFPGAN) | ![license](https://img.shields.io/badge/license-Apache_2.0-green.svg) |\n| [GFPGANv1.4.pth](https://huggingface.co/datasets/Gourieff/ReActor/blob/main/models/facerestore_models/GFPGANv1.4.pth) | [TencentARC](https://github.com/TencentARC/GFPGAN) | ![license](https://img.shields.io/badge/license-Apache_2.0-green.svg) |\n| [inswapper_128.onnx](https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx) | [DeepInsight](https://github.com/deepinsight/insightface) | ![license](https://img.shields.io/badge/license-non_commercial-red) |\n| [inswapper_128_fp16.onnx](https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128_fp16.onnx) | [Hillobar](https://github.com/Hillobar/Rope) | ![license](https://img.shields.io/badge/license-non_commercial-red) |\n\n[BasicSR](https://github.com/XPixelGroup/BasicSR) - [@XPixelGroup](https://github.com/XPixelGroup) \u003cbr\u003e\n[facexlib](https://github.com/xinntao/facexlib) - [@xinntao](https://github.com/xinntao) \u003cbr\u003e\n\n[@s0md3v](https://github.com/s0md3v), [@henryruhs](https://github.com/henryruhs) - the original Roop App \u003cbr\u003e\n[@ssitu](https://github.com/ssitu) - the first version of [ComfyUI_roop](https://github.com/ssitu/ComfyUI_roop) extension\n\n\u003c/details\u003e\n\n\u003ca name=\"note\"\u003e\n\n### Note!\n\n**If you encounter any errors when you use ReActor Node - don't rush to open an issue, first try to remove current ReActor node in your workflow and add it again**\n\n**ReActor Node gets updates from time to time, new functions appear and old node can work with errors or not work at all**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgourieff%2Fcomfyui-reactor-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgourieff%2Fcomfyui-reactor-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgourieff%2Fcomfyui-reactor-node/lists"}