Nodes/comfyui-instantId-faceswap/FaceEmbed for instantId
ComfyUI Node

FaceEmbed for instantId

Turning a photo into a face identity vector

By nosiu·Created 3 years ago·Updated about a year ago· 264
FaceEmbed for instantId
  • insightface
  • face_image
  • face_embeds
  • face embeds

This is the node where your reference photo stops being pixels and becomes a face. You hand it an insightface app and a face_image, and it runs ArcFace recognition to extract an identity embedding - a vector that captures who that person is, geometrically, rather than what the photo looks like stylistically. That distinction is the whole reason InstantID exists as a separate thing from plain IP-Adapter: CLIP embeddings capture vibe and composition, ArcFace embeddings capture bone structure and facial geometry. Everything downstream in this pack - the adapter, the ControlNet - is built on top of what this node produces.

The inputs and outputs that matter

  • insightface - the loaded InsightFace app from LoadInsightface. Required, no defaults.
  • face_image - the photo of the face you want to inject. This should be a clean, mostly-frontal shot of just the identity you're going for, not your pose/composition image - that's a separate input further down the pipeline.
  • face_embeds (optional) - an existing FACE_EMBED to chain onto. Feed the output of one FaceEmbed node into the face_embeds input of another and they combine, which is how you either blend two different faces or strengthen one identity by giving it multiple reference angles of the same person.
  • Output: face embeds (FACE_EMBED), which goes into FaceEmbedCombine next.

Why you'd chain multiple

The README calls this out directly - "you can chain multiple face embeds" - and it's more useful than it sounds. A single photo locks you into whatever angle and lighting that photo happened to have; insightface can only extract what it can see. Feed in two or three shots of the same person from different angles and you get a more robust identity signal that holds up better across poses. You can also genuinely merge two different people's faces this way if that's the effect you're after - the pack doesn't distinguish "more of the same identity" from "blend of identities," it just stacks embeddings.

Install

Search comfyui-instantId-faceswap in ComfyUI Manager, or manually clone into custom_nodes/ and pip install -r requirements.txt. This node specifically needs LoadInsightface upstream (antelopev2 models downloaded and placed correctly) - see that node's article for the exact path. No separate model download of its own; it rides entirely on InsightFace's weights.

Common issues & troubleshooting

"No face detected" errors trace back here. If insightface can't find a face in face_image - because it's cropped too tight, angled too far off-axis, or just low quality - this node is where that failure surfaces, even though the actual error usually shows up later in the graph on PreprocessImage or AngleFromFace. Use a clear, reasonably frontal reference photo; this is not the node to feed a stylized illustration or a heavily obscured face into.

Weak or "off" likeness downstream. If your final result doesn't look much like the reference, the fix is almost never here - FaceEmbed faithfully extracts whatever insightface can see. Check your reference photo quality first, then look at adapter/ControlNet strength further down the graph before assuming this node did something wrong.

Don't confuse this with your pose image. A common beginner mixup: face_image here is the identity source, while the image you're editing (the one that gets masked and swapped) goes into PreprocessImage separately. Swap them and you'll get confusing, identity-less results.

CategoryInstantId Faceswap

Inputs (3)

NameTypeDefaultDescription
insightfaceINSIGHTFACE_APP
face_imageIMAGE
face_embedsoptFACE_EMBED

Outputs (1)

NameTypeDescription
face embedsFACE_EMBED