Add LaMa Core ML model for AI-powered inpainting

- Add LaMaFP16_512.mlpackage (~90MB) for high-quality object removal
- Add LaMaInpainter.swift wrapper with image preprocessing and merging
- Modify InpaintEngine to use LaMa first, gradient fill as fallback
- Fix brush mask size (use scale 1.0 instead of screen scale)
- Fix LaMa output size (use scale 1.0 in merge function)
- Add model loading wait with 5 second timeout

The LaMa model provides significantly better inpainting quality compared
to the gradient fill method, especially for complex backgrounds.
This commit is contained in:
2026-01-24 14:31:54 -05:00
parent 14e2502cf4
commit eb047e27b8
7 changed files with 132598 additions and 3 deletions

1
.gitignore vendored
View File

@@ -54,3 +54,4 @@ logs/
# Temporary files
*.tmp
*.temp
inpaint-ios-reference/