FF: Face Swap Applier
Swap a face you already detected, without re-running detection
- source_images
- target_face_data
- swapped_image
- face_data
Every other swap node in this pack takes a raw target image and does detection-plus-swap in one shot. This one doesn't - its required target input is target_face_data, of type FACE_DATA, which means something upstream has to detect and select the face first. That something is FaceDetectorNode. This node exists for the workflow the pack's own README sketches out directly: detect once, then apply the swap (and optionally visualize what was detected) as separate steps, rather than re-running detection every time you tweak a swap setting.
That split is genuinely useful once your graph gets past "one image, one swap." If you're feeding a batch through, or you want to preview the detected face before committing to a swap, or you want to swap the same detected face into several different outputs with different settings, doing detection once and reusing the FACE_DATA is both faster and more predictable than re-detecting each time.
How it works
FaceDetectorNode does the finding-and-choosing (which detector, which face, by position or by a reference photo) and hands you a compact FACE_DATA package. FaceSwapApplier takes that plus your source face image and actually performs the swap - running the swapper model, building the blending mask, and compositing the result. It then hands back both the swapped image and an updated face_data, so you can chain straight into FaceMaskVisualizer or another applier without detecting again.
Inputs and outputs that matter
source_images(IMAGE) /target_face_data(FACE_DATA) - the face you want, and the already-detected face(s) to put it on.face_swapper_model(defaulthyperswap_1c_256) - note this node only offers the threehyperswapvariants (1a/1b/1c), not the full 13-model roster the other swap nodes expose.face_occluder_model(defaultxseg_1) /face_parser_model(defaultbisenet_resnet_34) - these back the mask system: occluder handles things covering the face (hands, hair, objects), parser handles semantic face regions.face_mask_blur(default 0.3) - edge softness on the swap. Higher for smoother blending, lower if edges look too soft.face_index(default 0) - which detected face in yourface_datagets swapped, when the upstream detector found more than one.
Outputs: swapped_image (IMAGE) and face_data (FACE_DATA) - the latter is the pass-through that makes chaining possible.
Installing it
ComfyUI Manager: search Facefusion_comfyui. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/huygiatrng/Facefusion_comfyui.git
cd Facefusion_comfyui
pip install -r requirements.txt
Fully restart ComfyUI afterward. First use downloads whichever hyperswap variant and occluder/parser models you've selected into custom_nodes/Facefusion_comfyui/models/.
Common issues
Occlusion masking not doing what you expect. This came up directly in the pack's launch thread - someone asked about faces with something covering part of them (a hand, an object near the mouth), and the author's answer was straightforward: that's what face_occluder_model (the XSeg models) is for. If parts of the original image are bleeding through where they shouldn't, this is the field to check first.
face_index seems to point at nothing. It only has as many valid faces as your upstream FaceDetectorNode actually selected - if that node's face_selector_mode was set to one, there's only index 0 to work with. Set the detector to many if you need to address multiple faces by index here.
Fewer model choices than expected. This is by design, not a bug - this node's face_swapper_model list is deliberately narrower (hyperswap only) than AdvancedSwapFaceImage's. If you need one of the other swap families (ghost, inswapper, simswap, etc.), use that node instead.
Model download or ONNX load failures. Same as the rest of the pack: a partial or locked .onnx download is the usual cause, showing up as a Windows "system error." Delete the file under custom_nodes/Facefusion_comfyui/models/ and let it re-download.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| source_images | IMAGE | — | |
| target_face_data | FACE_DATA | — | |
| api_token | STRING | -1 | — |
| face_swapper_model | COMBO | hyperswap_1c_256 | 3 options: hyperswap_1a_256, hyperswap_1b_256, hyperswap_1c_256 |
| pixel_boost | COMBO | 512x512 | 4 options: 256x256, 512x512, 768x768, 1024x1024 |
| face_occluder_model | COMBO | xseg_1 | 4 options: none, xseg_1, xseg_2, xseg_3 |
| face_parser_model | COMBO | bisenet_resnet_34 | 3 options: none, bisenet_resnet_18, bisenet_resnet_34 |
| face_mask_blur | FLOAT | 0.300–1 | — |
| face_index | INT | 00–100 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| swapped_image | IMAGE | — |
| face_data | FACE_DATA | — |