Files
hacksider-Deep-Live-Cam/modules
Max Buckley a6c99607fc Cut paste-back from quartic to linear in face size
_fast_paste_back used to erode and Gaussian-blur the warped alpha mask in
output coordinates with kernel sizes proportional to the on-screen face
bbox. That made the per-frame cost ~O(area * k^2) — a face filling half
the frame took ~8x the compositing work of one filling a quarter, which
is why FPS fell off when leaning into the camera.

Instead, build a feathered alpha template once at aligned-face resolution
(128x128 for inswapper) and warp the soft mask per-frame. The affine
transform preserves the relative feather width, so the visual output is
equivalent; the per-frame cost is now O(crop_area) with no size-scaled
erode/blur and no size-scaled padding.

Also collapses the CPU fallback onto the same shape — it previously did
a full-frame warpAffine twice per call, which scaled with the whole
frame instead of the face crop.
2026-04-22 11:58:02 +02:00
..
2025-05-13 00:14:49 +08:00
2026-02-12 19:44:04 +08:00
2024-09-10 05:40:55 +05:30
2025-10-12 22:33:09 +08:00
2025-01-07 14:04:18 +08:00
2026-02-12 19:44:04 +08:00
2025-10-12 22:33:09 +08:00
2025-10-12 22:33:09 +08:00
2023-09-24 21:36:57 +08:00
2024-09-19 17:38:02 +08:00
2026-04-09 16:25:22 +08:00