FaceSwap
This face swap rents a GPU on Replicate — no local model needed
- image
- face
- image_bbox
- face_bbox
- IMAGE
- IMAGE
- IMAGE
Most face swapping in ComfyUI happens locally - Reactor plus InsightFace, or a generative identity stack like InstantID. This node is neither. FaceSwap takes your image and a face crop, sends them to okaris/omni-zero on Replicate, and pastes the cloud's answer back into your frame. You need zero VRAM, zero model files, and a Replicate API token.
The repo ships no README at all, so the source is the doc - and the source is refreshingly short and honest about what it does.
What it actually does
The node wants four things up front: image (the full frame), face (a crop of the identity you want to keep), plus image_bbox and face_bbox - two BBOX inputs from whatever detection node you're using (this pack's own SAM2/Florence nodes emit them). It takes the largest box from each list, crops the main image around image_bbox with a little slack baked in (the box widens ~7% and extends ~25% down), resizes it to 768px wide, and sends it off as the image, style, and composition references. Your face crop becomes the identity_image, and the model re-renders the scene with that identity while holding the composition.
The inputs you actually set:
prompt- what's in the scene.steps- 10 to 25, default 10.face_guidance- 1 to 5, default 3; maps straight to the API's guidance scale.
Everything else is fixed in the code: seed 42, identity_strength 1, image_strength 0.10, and a hardcoded negative prompt of "blurry, out of focus, realism, photography." You can't change the seed. Yes, that stings for iteration.
Three IMAGE outputs come back. [0] is the finished composite - the one you keep. [1] is the cropped region that was edited and [2] is the face crop you fed in; they're there so you can see exactly what went to the API.
When to use it (and when not to)
This is a generative swap, not a pixel-paste like Reactor - the surrounding scene gets re-rendered to match the new face, which can look far more coherent than pasting a face over the top. The catch list is real, though: it costs money per run, your image leaves your machine, the exact model version is pinned to a Replicate deployment that could be retired, and there's no seed control. If you want local and free, Reactor/insightface is the community standard and does the same job offline. Reach for this one when you don't have the GPU or don't want to babysit weights.
Install
In ComfyUI Manager, search comfyui-tensorops. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/un-seen/comfyui-tensorops
Restart ComfyUI; requirements including replicate install automatically. No model downloads - everything is remote. Then set your token, and here's the trap: the pack ships a config.py that unconditionally overwrites FAL_KEY and REPLICATE_API_TOKEN with empty strings whenever the pack loads, which silently wipes whatever you exported in your shell. Paste your Replicate token into config.py directly.
Troubleshooting: missing-token errors → that config.py issue, not Replicate. Slow runs are the remote queue, not your machine. If a swap looks off, your face_bbox crop is probably too loose - the model keys on that crop.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| face | IMAGE | — | |
| prompt | STRING | — | |
| image_bbox | BBOX | — | |
| face_bbox | BBOX | — | |
| steps | INT | 1010–25 | — |
| face_guidance | FLOAT | 3.001–5 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |