Face Swap (mtb)
The old-school roop-style swap, and what it shares with everything else
- image
- reference
- faceanalysis_model
- faceswap_model
- IMAGE
This is MTB's one-node face swap, and it's one of the older options in ComfyUI - people were reaching for it back in 2023 when your choices were basically this, Roop, or ReActor. It takes a face from one image and stamps it onto the faces in another. No training, no LoRA, no embeddings to manage. Point it at a reference photo and go.
Here's the thing worth understanding before you pick a face-swap node, because it saves you a lot of tool-shopping: Face Swap, ReActor, Roop, and FaceFusion are all the same engine underneath. They all call InsightFace and its inswapper model to do the actual swap. As one much-upvoted thread put it, "aren't they all effectively the same since they use insightface on the backend?" - and the answer is basically yes. So switching between these packs changes the front end, not the result quality. Whatever ceiling MTB hits here, the others hit too.
How it works
InsightFace detects the face in your reference image, turns it into an ArcFace embedding (a vector encoding facial geometry, not appearance), then pastes that identity onto the detected face in your target at the model's fixed resolution. That resolution is the catch: the open inswapper model is frozen at 128x128 and officially unmaintained - the maintainers point higher-res users at their paid service. So the swapped face comes back soft and low-detail. That's not you doing it wrong; that's the model. The standard move is to follow the swap with a face restore (GFPGAN was the classic pairing with this exact node) or an upscale pass to rebuild detail.
The inputs and outputs that matter
image- the target you're pasting a face onto.reference- the source face you want.faces_index(default"0") - which face in the target to swap.0is the first detected face; comma-separate (0,1) to swap several.faceanalysis_model(FACE_ANALYSIS_MODEL) andfaceswap_model(FACESWAP_MODEL) - these come from MTB's loader nodes, not from disk paths. You wire a "Load Face Analysis Model" and "Load Face Swap Model" node into these two. If they readNone, that's your problem - the loaders aren't connected.
Optional preserve_alpha (default true) keeps a transparent background intact through the swap. Output is a single IMAGE you send to a face restorer, upscaler, or straight to preview.
How to install it
ComfyUI Manager is the sane path: search MTB Nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
then restart. But Face Swap is one of MTB's "optional" nodes - the base pack loads fine without it, and on startup you'll likely see "Some nodes could not be loaded... go to http://127.0.0.1:8188/mtb". That page is MTB's own installer for the extra dependencies and model files this node needs (InsightFace plus the swap model). Use it, or install InsightFace via Manager.
Common issues & troubleshooting
InsightFace won't install. This is the headache with any swap node, MTB included - for three years there was no matching PyPI wheel, so people ended up compiling from source with Visual Studio build tools on Windows. If you're setting up today, use InsightFace 1.0 or newer (May 2026), which dropped the C++ build requirement. Most old tutorials still send you to Visual Studio; you don't need it anymore.
The swapped face is blurry. Expected - it's 128x128. Add a GFPGAN face restore or an upscale after the swap. Don't go hunting for a "better" swap node for this; ReActor and Roop hit the same wall.
Wrong face got swapped. Bump faces_index. The node picks face 0 by default, which may not be the one you meant in a group shot.
Commercial use. The InsightFace weights are non-commercial, and that applies no matter which of these nodes wraps them. Fine for personal and portfolio work; a real problem if you're selling the output.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference | IMAGE | — | |
| faces_index | STRING | 0 | — |
| faceanalysis_model | FACE_ANALYSIS_MODEL | None | — |
| faceswap_model | FACESWAP_MODEL | None | — |
| preserve_alphaopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |