Nodes/SpicyAPI/Video Face Swap · Video Edit
ComfyUI Node

Video Face Swap · Video Edit

Keeping one face on the same head for 30 seconds

By spicyapi-ai·Created 21 days ago·Updated 2 days ago· 2
Video Face Swap · Video Edit
  • video_url
  • reference_image_url
  • video
  • task id
◄face_mapping►
◄face_enhancefalse►
◄styleRealistic►
◄seed0►

Faces in motion are a different problem

An image swap only has to be right once. A video swap has to be right in every frame, and - much harder - consistently: the same face, jittering as little as possible, through every turn of the head and change of expression, in a clip that already has its own lighting, compression and motion blur. That's where local swappers historically fall apart, and it's why video identity work has usually meant per-frame post-process hacks with temporal smoothing bolted on top.

This node is the one-call version: a video and a reference photo in, the facial features carried through every frame, with hair, movement, framing and background left as shot. $0.026 per second, so a 10-second clip is about 26 cents.

How it works

The pack uploads the video (90 MiB ceiling) and your reference image, calls spicyapi/face-swap-video-v1/video-edit, and returns the processed MP4 as a ComfyUI VIDEO. There's no analysis pass to run first - unlike the character- and head-swap models, this one does its own detection inside the single call, which is a real convenience and the reason it's the cheapest per-second video swap of the four.

Mechanically it's the ArcFace-embedding family again, the same recognition backbone under IP-Adapter FaceID, InstantID, PuLID and ReActor - hosted instead of installed. If you've fought InsightFace's build requirements locally, the appeal is obvious.

Inputs

video_url (VIDEO) - the target clip. The face of the person in it gets replaced. Load it with the core Load Video node.

reference_image_url (IMAGE) - the reference face, carried onto the person in the video. One clean frontal shot beats a folder of angles.

style - realistic (default), beautify, lossless. Same three finishes as the image swaps: realistic keeps natural skin tone and texture, beautify smooths and brightens, lossless holds the most facial detail. For video, realistic is the safe default - beautify on compressed footage tends to look waxy, and lossless amplifies whatever grain the source already had.

face_mapping (JSON) - multi-person mapping, a list of objects with "reference_face_index" and "target_face_index", 0-based in detection order. Leave it empty for the single-face case.

face_enhance (default off) - an enhancement pass on the swapped face. On video this is the higher-risk switch: a per-frame generative touch-up can flicker. Try it on a short trim before you commit to a long clip.

Outputs: video (VIDEO, to Save Video), task id (STRING). There's no seed field on this node, so runs aren't reproducible - budget accordingly.

Install

Manager → search SpicyAPI, or:

cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi

Restart. No dependencies, no local model - the pack's dependency list is empty and all inference is server-side, so this works on a CPU-only box. Python 3.10+, a ComfyUI with the V3 node API, a key in Settings > SpicyAPI (or SPICY_API_KEY), then one restart so the node list builds from your account.

Traps

  • Per-second pricing on a clip you'll iterate. It is very easy to burn a few dollars on one shot: test on a 3-second trim, and set Max cost per run to a number that doesn't hurt.
  • Reference or target with more than one face. Without face_mapping, detection order decides. Run once, look, then map.
  • Hard profiles and heavy occlusion. Turning heads, hands over faces, dark glasses - the swap degrades; that's the model's judgement, not a setting you can raise.
  • Resolution and codec come back as served. Length, motion and the audio track are kept, but don't expect a bit-identical re-encode.
  • No SpicyAPI key is set - key goes in Settings, never in the node, and never into a workflow file or the PNG metadata of your output.
  • Cancelling doesn't stop the job. A cancelled run that completes server-side is charged, and the result waits in your console for up to 14 days.
CategorySpicyAPI/Video/Tools

Inputs (6)

NameTypeDefaultDescription
video_urlVIDEOTarget video. The face of the person in this clip is the one that gets replaced.
reference_image_urlIMAGEReference face image. The facial features from this image are carried onto the person in the video.
face_mappingSTRINGMulti-person swap: which face in the reference image goes onto which face in the target, one entry per face. Faces are numbered from 0 in detection order. Leave it out to swap a single face. JSON. A list of objects with "reference_face_index", "target_face_index".
face_enhanceBOOLEANfalseRun a face-enhancement pass on the swapped face for a sharper, more detailed result.
styleCOMBORealisticFinish applied to the swapped face: realistic keeps natural skin tone and texture, beautify smooths and brightens the skin, lossless holds on to the most facial detail.
seedINT00–2147483647This model takes no seed, so the number is never sent. Changing it makes ComfyUI run the node again: set 'control after generate' to randomize for a new result on every run; every run is billed.

Outputs (2)

NameTypeDescription
videoVIDEO—
task idSTRINGThe SpicyAPI task id, for the console logs or support.