Cache ArcFace ONNX session + remove redundant resize in _extract_arcface_embedding #8
Labels
No labels
blocked:needs-attention
blocked:needs-decision
blocked:needs-decompose
blocked:needs-design
blocked:needs-triage
blocked:preflight
blocked:unclassified
bug
documentation
enhancement
gsd-spec
in-progress
lint-cleanup
needs-decompose
priority:high
priority:low
priority:medium
quickfix
test
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_local_ai_image_enhancer#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
_extract_arcface_embedding() in face_swapper.py has two performance issues:
Fix: Cache the ArcFace ONNX session on self._arcface_session. Remove the redundant resize.
Files: auraframe/models/face_swapper.py lines 245-268
Test: Existing tests pass. Benchmark to verify speedup.
Fixed in
218e013:self._arcface_session(keyed by model path) to avoid hundreds-of-ms session re-creation per swapcv2.resize(face_bgr, (112, 112))—warp_and_crop_facealready guarantees 112x112 output