Load Face Analysis Model (mtb)
Load InsightFace for the face tools
- FACE_ANALYSIS_MODEL
This loads the face analysis model that MTB's face tools depend on - the part that finds faces in an image and turns each one into a numeric identity embedding. It's not the swapper and it's not the enhancer; it's the detector-and-recognizer that the swapper needs in order to know where the faces are and who they belong to. Face swapping is a two-model job, and this loads the half that does the understanding.
Under the hood this is InsightFace, the face-analysis library sitting beneath nearly every identity tool in the ecosystem - ReActor, Roop, InstantID, IP-Adapter FaceID all reach for the same thing. Its job is narrow and it does it well: detect a face, align it, and produce an ArcFace embedding, a vector that encodes facial geometry rather than appearance. That embedding is what lets a swap or an identity tool preserve a likeness.
How it works
The node loads one of InsightFace's model "packs," each bundling a face detector, a recognizer, and alignment. It outputs that loaded pack for MTB's face swap node to use alongside a loaded swapper model.
The input and output
faceswap_model- despite the name, this picks the analysis pack, and the choices are the standard InsightFace ones:buffalo_l(the default),buffalo_m,buffalo_sc, andantelopev2.buffalo_lis the sensible default - it's the one InsightFace auto-downloads (~326MB) and it's what most workflows expect.antelopev2is more accurate but heavier, and it's the one that tends to cause install headaches (see below).
The single output is FACE_ANALYSIS_MODEL, which wires into the face swap apply node together with the loaded FACESWAP_MODEL.
How to install it
ComfyUI Manager: search MTB Nodes (comfy_mtb), install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/melMass/comfy_mtb, then restart. This needs InsightFace and onnxruntime installed - optional MTB dependencies, and historically the most painful install in ComfyUI. If the face nodes don't load, MTB points you at http://127.0.0.1:8188/mtb to install them. The good news: InsightFace 1.0 (May 2026) finally dropped the C++ build requirement that caused years of "won't compile" pain, so a clean install today is much smoother than the old guides suggest.
Common issues
buffalo_l auto-downloads; antelopev2 does not. This is the classic InsightFace trap: buffalo_l fetches itself on first use, but antelopev2 has to be downloaded by hand and unzipped under ~/.insightface/models/. If you picked antelopev2 and the node errors about a missing model, that manual step is why - grab it, unzip it in the right place, and restart before debugging anything else.
Two more things worth knowing. The install pain, if you hit it, is InsightFace itself, not MTB - and it's fixable (update to InsightFace 1.0+, or use MTB's /mtb dependency panel). And the licensing: InsightFace's model weights are non-commercial (the code is MIT, the models aren't), which applies to any face tool built on this pack. Fine for personal and research work; a real constraint if you're building something to sell.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| faceswap_model | COMBO | buffalo_l | 4 options: antelopev2, buffalo_l, buffalo_m, buffalo_sc |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FACE_ANALYSIS_MODEL | FACE_ANALYSIS_MODEL | — |