restore_face: double face_alpha mask produces shadow frame in top/left of face output #20
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#20
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?
RestoreFaceNode at auraframe/pipeline/nodes/restore_face.py lines 158 and 166 applies face_alpha mask BEFORE (line 158) and AFTER (line 166) GFPGAN. The pre-multiply darkens the GFPGAN input (top-of-head and side fades), so the output inherits those dark edges. The post-multiply compounds them. Only the below-chin region got repaired (line 181-183 chin fill). Measured: top-edge/center ratio = 0.22 after warp-back (was 78% darker). Fix: remove both masks (lines 158 and 166) -- feed GFPGAN the full aligned face. The blend mask (ellipse * face_alpha_warped) at line 241 already handles hair exclusion at paste-back time, matching the reference GFPGAN implementation. Verification: run the diagnostic and check restored_warped top-edge ratio > 0.8.