DEV Community

Ege Bese
Ege Bese

Posted on

How AI Face Swap Video Actually Works: First Frame + Motion Control (With the Cost Math)

"Face swap" sounds like one model doing one trick. In practice, the good results today come from a two-stage pipeline: build a clean first frame with the new person in it, then drive that frame with the motion from the original clip. Understanding the two stages explains almost every failure you'll hit, and it also explains the pricing.

This post breaks the pipeline down, gives a pre-flight checklist for source clips, and works through the per-second cost. For the full guide with examples, see the original write-up on AI face swap video.

Stage 1: Place the person (the first frame)

The first step takes a still from your source video and an image of the person you want to insert, and produces a single frame where that person stands in the original pose, lighting and framing. On Pixelrope this step runs on Nano Banana Pro and costs a flat 16 credits.

Why it matters: everything after this inherits the first frame. If the face is slightly off here, it'll be slightly off for every second of the video. Spend your rerolls at this stage, where they're cheap, not later.

Stage 2: Transfer the motion

The second step takes that new first frame and the original clip, and uses Kling v3 motion control to make the new person move exactly like the person in the source: head turns, gestures, walking, dancing. It runs in two modes:

  • Standard, 720p: 12.6 credits per second
  • Pro, 1080p: 16.8 credits per second

Because it's motion transfer rather than pixel-pasting a face, you get consistent identity through turns and partial occlusion, which is exactly where classic face-swap tools glitch.

The cost math

Total = 16 (first frame) + seconds × per-second rate.

Clip length 720p (Standard) 1080p (Pro)
5 s 16 + 63 = 79 16 + 84 = 100
10 s 16 + 126 = 142 16 + 168 = 184
15 s 16 + 189 = 205 16 + 252 = 268

For scale: one credit maps to $0.01 of the model's list price, and depending on plan or top-up you pay roughly $0.0215–$0.025 per credit. A 10-second 720p swap at 142 credits is therefore around $3–3.50. If a job fails or gets blocked, the credits come back automatically.

Pre-flight checklist for the source clip

Most bad outputs are bad inputs. Before you spend credits:

  1. One main subject. Crowds confuse the motion stage.
  2. Face visible in the first frame. Stage 1 needs something to replace.
  3. Steady framing. Heavy handheld shake or fast zoom cuts reduce quality.
  4. No hard cuts. Trim to a single continuous shot.
  5. Similar body type and framing in your reference photo. A head-and-shoulders selfie for a full-body dance clip forces the model to invent too much.
  6. Even lighting on the reference. Harsh shadows get baked in.
  7. Start with 5 seconds at 720p. At 79 credits it's the cheapest test. Scale to 1080p only once the first frame looks right.

A simple workflow

1. Trim source → single shot, 5–10 s
2. Generate first frame (16 credits) → reroll until the face is right
3. Run motion transfer at 720p → review
4. Re-run at 1080p only for the final version
Enter fullscreen mode Exit fullscreen mode

Doing the 720p pass first saves 4.2 credits per second on every iteration that doesn't make the cut.

Ethics and consent

Only swap faces you have permission to use: your own, or people who agreed. Label the result as AI-generated when you publish it. Beyond being the right thing to do, most platforms now require it.

Further reading

Written by the Pixelrope Team.

Top comments (0)