Every face swap demo looks fine at thumbnail size. Then someone opens the export at 100% and the swap reads as a sticker. In almost every case I have looked at, the model was not the problem. The composite was.
Here is the seam, in the order it usually goes wrong.
1. The mask is a hard cut in sRGB
A mask that is correct in geometry still produces a visible edge if you blend two sRGB images by simple alpha. sRGB values are gamma-encoded, so a 50/50 blend of two pixels is not the average of the light they represent. At the boundary, where the swapped face and the original skin meet, you get a line that is slightly too dark or too light depending on which side dominates.
Do the blend in linear light: decode both images, composite with the alpha, re-encode. The edge stops having a direction.
2. The feather width is fixed while the detail scale is not
A 4 px feather is invisible on a 1000 px portrait and a smear on a 4000 px export. Feather in proportion to the face box, and clamp it to something small: 0.4–1.2% of the face width covers most cases. Too wide and the swap bleeds the target's skin texture through; too narrow and the cut shows.
3. The mask edge runs through hair
Skin-to-skin boundaries are forgiving. Skin-to-hair is not, because hair is high frequency and semi-transparent at the edge. A mask that cuts through hair leaves a clean arc of skin where strands should be. If the swap has to cross hair, take the mask inward rather than outward: a slightly small mask hidden under hair reads better than a slightly large one over it.
4. Colour match is applied after the composite
If you match tone and white balance before compositing, the composite step undoes part of it. Match the swapped region to the target's local colour statistics, then composite, then do a final low-frequency correction on the boundary band only. Two passes is usually enough; a global colour transfer across the whole frame is what makes a swap look like a filter.
5. The export is where sharpening bites
Most pipelines sharpen at the end. Sharpening a seam is the worst case for it: the edge is a step function and unsharp masking turns it into a bright-dark pair. Either exclude the boundary band from sharpening, or sharpen before compositing and leave the blend alone.
A quick check that catches most of it
Composite the same swap twice, once with the real mask and once with the mask dilated by 2 px. Put them side by side at 100%. Where the difference is a line rather than a texture, your mask edge is doing the work the model should be doing.
None of this is specific to one model. It is the part of the pipeline that runs after the face has been generated, and it is the part users actually see. If you want to see the difference a composite makes, the same two photos through a browser tool are enough: https://deepswapai.com/?utm_source=devto&utm_medium=social&utm_campaign=composite-seam&utm_content=deepswapai
Disclosure: I work on that tool. The compositing notes above are what we changed after looking at 100% exports, not a claim that the result is perfect.
