Save Face Embeds
Cache your reference identity to disk
- face_embed
Save Face Embeds does one thing: takes an InstantID face embedding and writes it to disk so you never have to compute it again. Feed it the face_embed output of the pack's ApplyInstantID node, give it a name, and it drops a .pt file into ComfyUI/models/face_embeds/. Pair it with Load Face Embeds and you've got a proper "save once, reuse forever" loop for a reference identity.
This is from the comfyui_sunxAI_facetools pack by Sunx.ai, an InstantID-flavored face toolkit, and the rationale is simple economics. Generating an identity embedding from a reference photo costs an InsightFace analysis pass every single run. If you're producing fifty images of the same character, that's fifty identical computations you're paying for. Save once, and every run after is just a file read - faster and, because the tensor is byte-identical, more consistent than fresh analysis.
How it works. It's an output node with two inputs:
face_embed(FACE_EMBEDS) - the embedding, typically straight from ApplyInstantID.name(STRING, default"face_embed") - the filename it writes, minus the.pt. Whatever you type here is exactly what you'll type into Load Face Embeds later.
Under the hood it saves the cond and uncond tensors to the CPU along with a timestamp, then clears them from memory - the author's code is deliberately memory-frugal here. There are two genuinely useful edge cases baked in. If the embedding carries a "no face" marker, it saves that marker instead of the vectors, so a face-less reference doesn't turn into a garbage file. And if the file already exists, it skips the write - no overwrite, just a warning. That's a deliberate choice, and it's also the trap.
Where people get caught. Because it won't overwrite, saving the same name twice does nothing - the first version wins, forever, until you pick a new name. If you re-save after tweaking your reference image and the identity seems "stuck" on the old face, this is why: your second save silently no-op'd. The fix is to version your names (alice_v1, alice_v2, …). Also remember this is InstantID-specific - the file won't be readable by PuLID or IP-Adapter FaceID despite the shared InsightFace DNA, so don't treat your face_embeds/ folder as a universal identity library.
Install. Whole pack, as always: ComfyUI Manager → search comfyui_sunxAI_facetools, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/upseem/comfyui_sunxAI_facetools
then restart ComfyUI. Pack install is heavy - insightface, onnxruntime, ultralytics, mediapipe, transformers - with InsightFace the usual headache on Windows.
It's a boring node, and that's the compliment: it makes the expensive part of an InstantID workflow happen exactly once instead of on every run.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| face_embed | FACE_EMBEDS | — | |
| name | STRING | face_embed | — |
Outputs (0)
No outputs