A SwarmUI extension that adds parameters for the ReActor (with unsafe content filter) node to the generate tab.
11 October 2025
- Updated pinned ReActor version from 0.6.0 Alpha1 to latest version 0.6.2 Beta1. If you get errors when trying to use ReActor after updating the extension go to
Server->Backendsand set your ComfyUI backendUpdateManagedNodestoAlways Aggressively Update (Force-Update)this will allow the backend to overwrite any modifications that have been made to the ReActor node and perform the update. - Added
Face Restore Swapped Onlyparameter, if enabled it will only restore faces that were swapped - Added support for hyperswap face swap models, you can select them with advanced parameter
Face Swap Model, they will be automatically be downloaded toSwarmUI/dlbackend/comfy/ComfyUI/models/hyperswap
25 May 2025
Make sure you update SwarmUI to at least v0.9.6.1 before updating to this version of FaceTools as it uses new APIs
- Added automatic model downloading and corrupted model replacement for FaceRestore and FaceSwap models
Any FaceRestore and FaceSwap models that ReActor did not download (Or downloaded partially leaving corrupted) will be downloaded by FaceTools when a generation that requires them is started.
This includes the FaceSwap model inswapper_128 which previously needed to be manually downloaded and alternative FaceSwap models like reswapper_128 and reswapper_256 which now show in the dropdown, check the Server->Logs tab for download progress if you start a generation, and it's sitting for a long time. Models will be downloaded into all ComfyUISelfStart backends that are running.
-
Model checksum validation now works for all ComfyUISelfStart backends instead of only the built-in one
-
Fixed code calling internal T2IParamInput.ValuesInput field that will be removed in a future SwarmUI update
23 March 2025
-
Workflow generator now uses StableDynamicIDs to prevent breaking workflow caching (Being forced to regenerate the entire image) when FaceTools parameters are changed.
-
Pinned ReActor at version 0.6.0-a1, this prevents SwarmUI from automatically updating ReActor to a future version that might break compatibility with the extension until it has been manually checked as compatible.
9 February 2025
- Added checksum validation for all models that ReActor autodownloads to warn users of corruption that cause cryptic errors, if you have a corrupted model you will see an error like this instructing you what to do:
Technical details:
- The validation runs when you generate an image, if you have a corrupted model it will interrupt image generation and show the error shown above, it only validates the models currently being used by your workflow.
- The first time you generate an image the initial checksum generation will take a few seconds and it will log to the console as it's working:
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/facerestore_models/codeformer-v0.1.0.pth' 1009e537 (Took 1.7 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/insightface/inswapper_128.onnx' e4a3f08c (Took 2.4 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/insightface/models/buffalo_l/1k3d68.onnx' df5c06b8 (Took 0.6 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/insightface/models/buffalo_l/2d106det.onnx' f001b856 (Took 0.0 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/insightface/models/buffalo_l/det_10g.onnx' 5838f7fe (Took 0.1 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/insightface/models/buffalo_l/genderage.onnx' 4fde69b1 (Took 0.0 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/insightface/models/buffalo_l/w600k_r50.onnx' 4c06341c (Took 0.8 seconds)
[Info] [FaceTools] Generated hash for 'dlbackend/comfy/ComfyUI/models/nsfw_detector/vit-base-nsfw-detector/model.safetensors' 266efb8b (Took 1.5 seconds)
- Generated checksums are cached to
'SwarmUI/src/Extensions/SwarmUI-FaceTools/ModelHashCache.json'and are only recalculated if the file is modified. - Models are only validated if you are using the built in ComfyUI backend, if ComfyUI is not at
SwarmUI/dlbackend/comfy/ComfyUI/validation will be skipped for users with external ComfyUI installs.
24 January 2025
- [Notice] The old ReActor repository (https://github.com/Gourieff/comfyui-reactor-node) was removed from GitHub, an updated version with a filter for unsafe content that is compliant with GitHub rules has been made: https://github.com/Gourieff/ComfyUI-ReActor. If you have the old node installed (You installed prior to 17-01-2024) you will see the following message on SwarmUI startup as it removes the old node so you can install the new one:
[Init] [FaceTools] Moving deprecated ReActor repository to recycle bin 'SwarmUI/src/BuiltinExtensions/ComfyUIBackend/DLNodes/comfyui-reactor-node', click the 'Install ReActor' button in the parameter list to install its replacement
- Removed FaceRestoreCF support as it is no longer being maintained and ReActor can do face restoration with more options and models supported
4 November 2024
- ReActor install button will now not show up if you load the page before the backend has loaded
- Dropdown parameters are now prepopulated where possible so they will show up if you load the page before the backend has loaded
- Expanded the readme to give some possible solutions to common issues people have been running into and flesh out some things
- Parameters that are not relevant to the current ReActor workflow are now automatically removed from the image parameter list to keep the UI cleaner, for example you won't see parameters like 'Input Faces Order' filling up the list unless you changed it from the default, see the comparison below, to disable this behaviour you can disable the 'Remove Params If Default' param
13 October 2024
- Much better install process for dependencies with no need to use ComfyUI Manager, if dependencies aren't installed a button to install them will appear in the parameter group, see the new Installation steps for details
- Previously ReActor and FaceRestoreCF were 2 extension classes, they've been merged so it's simpler to manage in the extension tab
- Model dropdowns now read from ComfyUI model folder, no need to install models into both the SwarmUI model folder and the ComfyUI model folder anymore. Warning: Deleted models do not get removed from the list when refreshing, you'll need to restart SwarmUI for them to disappear
- In SwarmUI go to the
Server->Extensionstab - Find FaceTools in the list and click the 'Install' button
- Refresh the page and go back to the generate tab, if you see the parameters then the required ComfyUI dependencies are installed and you can start using the extension, otherwise continue below.
- If dependencies are not installed buttons will be shown in the parameter group to install them. Install IP Adapter first and once the backend has restarted install ReActor.
- After ReActor installs it automatically starts downloading some of the models, you can monitor the progress by going to the
Server->Logstab and setting the view toDebug. - You should be good to go, check the Usage section for tips
- If you run into issues (Such as not being able to see the parameter group) check the Troubleshooting section
- Shutdown SwarmUI
- Open a cmd/terminal window in
SwarmUI\src\Extensions - Run
git clone https://github.com/Quaggles/SwarmUI-FaceTools.git - Run
SwarmUI\update-windows.batto recompile SwarmUI - Launch SwarmUI and follow on from Step 4 of Installation (Simple)
- Update SwarmUI first, updates to this extension might require the latest version of SwarmUI to function
- In SwarmUI go to the Server/Extensions tab
- Click the update button for 'FaceToolsExtension'
These parameters inject different nodes to the workflow based on the options selected.
If Face Image is provided then face swap will be performed after image generation using the face/s in this image.
If Face Model is set a saved Face Model is used to perform the face swap. Face Models can be created in the Comfy Workflow tab using the 'Save Face Model' node. Face Image takes priority over Face Model if both are set.
If Face Restore Model is set then face restoration will be run after the face swap, if Face Image or Face Model were not provided it runs directly on the generated image. If this option is 'None' then face restoration is skipped.
If Second Face Restore Model (Advanced option) is set then a second face restore model will be run after the first. I found good results with codeformer-v0.1.0 first to fix distortions then GPEN-BFR-1024 as the second model to sharpen the result.
If Face Mask Model is set the face swap and face restore will be masked so it doesn't effect overlapping features like hair. If the dropdown is empty download models from here: YOLOv8 Segmentation models and put them in {SwarmUIModelRoot}/yolov8
If Face Boost is set it restores the face after the face swap but before transplanting on the generated image, can increase quality but results may vary. A side effect of enabling this with Restore After Main disabled with is that only one face in the image will be restored or swapped
Many more parameters are available if you enable 'Advanced Options' at the bottom of the panel. All parameters have tooltips or read through the ReActor readme for more info, you can also use 'Comfy Workflow/Import From Generate Tab' feature to see what the parameters are doing in the ComfyUI workflow.
The ReActor custom nodes do not follow the 'ComfyUI extra paths' config to allow them to exist in the SwarmUI ModelRoot folder.
Face Swapmodels can be downloaded from here and must be installed in:
"SwarmUI/dlbackend/comfy/ComfyUI/models/insightface"
Face Restore Modelmodels can be downloaded from here and must be installed in:
"SwarmUI/dlbackend/comfy/ComfyUI/models/facerestore_models"
- Saved
Face Modelmodels must be installed in:
"SwarmUI/dlbackend/comfy/ComfyUI/models/reactor/faces"
After installing a model make sure to click the model refresh button in SwarmUI so the extension can scan again.
If you need to update the node manually or do manual troubleshooting steps it can be found in this folder SwarmUI\src\BuiltinExtensions\ComfyUIBackend\DLNodes\ComfyUI-ReActor.
This is not a bug, ReActor returns a black image when the NSFW detector detects unsafe content in the source image to comply with GitHub rules.
The ReActor parameter group appears when SwarmUI is started and then disappears when the backend loads
This occurs when ReActor fails to import in the ComfyUI backend, go to Server->Logs and set the view to Debug to see the error, if you can't solve it yourself check the SwarmUI Discord (Look in the Extensions->FaceTools thread) or the ReActor Github.
SwarmUI should install a precompiled insightface wheel when you click the 'Install IP Adapter' button but if that didn't work you can compile it manually with the following steps:
- Install Visual Studio 2022 Community version OR only VS C++ Build Tools and select "Desktop Development with C++" under "Workloads -> Desktop & Mobile"
- Find the python version of your ComfyUI backend by looking at the file properties of
SwarmUI\dlbackend\comfy\python_embeded\python.exe, for this example I have Python 3.12.7 - Install the exact same python version from https://www.python.org/downloads/ and manually copy over the
includeandlibsfolders fromC:\Users\<User>\AppData\Local\Programs\Python\Python312toSwarmUI\dlbackend\comfy\python_embeded - Start a terminal/cmd in
SwarmUI/dlbackend/comfy/python_embeded - Run the command
python.exe -m pip install insightface, if using Powershell you might need to prepend commands with./to ensure it doesn't find your global python install on PATH - If all goes well this should compile insightface successfully and you can continue
Read through the ReActor Troubleshooting Guide and see if any match your error.
I had this happen even when CUDA_PATH pointed to a valid CUDA toolkit installation, try going to 'System Properties/Environment Variables' and removing CUDA_PATH to see if it fixes your problem, this may effect other software finding CUDA.
Ask for help on the SwarmUI discord



