8071fe61c5 feat: AI face enhancement with GFPGAN and CodeFormer (#61)
* feat(shared): add enhance-faces tool definition and i18n strings

* feat(ai): add face enhancement script with GFPGAN and CodeFormer support

Detects faces via MediaPipe dual-model approach, then enhances using
GFPGAN (proven) or CodeFormer (via codeformer-pip) with auto fallback.
Supports strength-based alpha blending with original image.

* feat(ai): add TypeScript bridge for face enhancement

* feat(api): add enhance-faces route with GFPGAN/CodeFormer support

* feat(web): add enhance-faces settings component and register in tool registry

* feat(docker): add CodeFormer dependency and model download

- Add codeformer-pip to both CPU and GPU requirements
- Download CodeFormer model (~375MB) at Docker build time
- Add CodeFormer to smoke test verification

* fix(enhance-faces): address code review findings

- Skip alpha blend for CodeFormer (strength already applied via fidelity weight)
- Hide "only enhance main face" checkbox when Best (CodeFormer) is selected
- Fix sensitivity slider labels (swap More/Fewer faces to match actual behavior)
- Register EnhanceFacesControls in pipeline step settings
- Remove model names from user-facing descriptions

* fix(enhance-faces): fix CodeFormer integration and Docker setup

- Add codeformer-pip install to Dockerfile with --no-deps to avoid numpy 2.x conflict
- Re-pin numpy==1.26.4 after codeformer-pip install
- Pin codeformer-pip==0.0.4 in requirements files
- Broaden auto-mode fallback to catch any Exception from CodeFormer

---------

Co-authored-by: stirling-image <stirling-image@users.noreply.github.com>
2026-04-13 21:56:59 +08:00
2026-04-03 23:17:06 +08:00

We're renaming! The Stirling PDF team asked us to pick a new name, and we want you to choose it.
Vote on the new name →
Voting closes April 10, 2026

Stirling Image logo

Stirling Image

Stirling-PDF but for images. 30+ tools and local AI in a single Docker container.

Docker CI License Stars

Stirling Image - Dashboard

Key Features

  • 30+ image tools - Resize, crop, compress, convert, watermark, color adjust, and more
  • Local AI - Remove backgrounds, upscale images, erase objects, blur faces, extract text (OCR). All running on your hardware with pre-downloaded models, no internet required
  • Pipelines - Chain tools into reusable workflows. Batch process up to 200 images at once
  • REST API - Every tool available via API. Interactive docs included at /api/docs
  • Single container - One docker run, no Redis, no Postgres, no external services
  • Multi-arch - Runs on AMD64 and ARM64 (Intel, Apple Silicon, Raspberry Pi)
  • Your data stays yours - No telemetry, no tracking, no external calls. Images never leave your machine

Quick Start

docker run -d -p 1349:1349 -v stirling-data:/data stirlingimage/stirling-image:latest

Open http://localhost:1349 in your browser.

Have an NVIDIA GPU? Click here for GPU acceleration.

Add --gpus all for GPU-accelerated background removal, upscaling, and OCR:

docker run -d -p 1349:1349 --gpus all -v stirling-data:/data stirlingimage/stirling-image:latest

Requires an NVIDIA GPU and Container Toolkit. Falls back to CPU if no GPU is found. See Docker Tags for benchmarks and Docker Compose examples.

Default credentials:

Field Value
Username admin
Password admin

You will be asked to change your password on first login. This is enforced for all new accounts and cannot be skipped in production.

For Docker Compose, persistent storage, and other setup options, see the Getting Started Guide. For GPU acceleration and tag details, see Docker Tags.

Documentation

Feedback

Found a bug or have a feature idea? Open a GitHub Issue. We don't accept pull requests, but your feedback directly shapes the project. See CONTRIBUTING.md for details.

License

This project is dual-licensed under the AGPLv3 and a commercial license.

  • AGPLv3 (free): You may use, modify, and distribute this software under the AGPLv3. If you run a modified version as a network service, you must make your source code available under the AGPLv3. This applies to personal use, open-source projects, and any use that complies with AGPLv3 terms.
  • Commercial license (paid): If you want to use Stirling Image in proprietary software or SaaS without the AGPLv3 source-disclosure requirement, a commercial license is available. Contact me for pricing and terms.
Languages
TypeScript 91%
Python 3.5%
JavaScript 2.4%
Shell 1.6%
Astro 1.1%
Other 0.3%