HUB
Sign inSign up

jamiekyu/immich-forge

By jamiekyu

•Updated 2 days ago

FastAPI service that pulls an original from Immich and runs a GPU image enhancement pipeline.

Image
1

5.1K

jamiekyu/immich-forge repository overview

⁠Forge for Immich — Server

Repair and enhance old, blurry, noisy or low-resolution photos in your self-hosted Immich⁠ library

Open a photo in Immich, click the Forge icon, and Forge can:

  • Enlarge small photos (×2 / ×4)
  • Restore faces that are small or soft
  • Colorize black-and-white and sepia photos
  • Clean up JPEG blocks, reduce noise, and brighten dark shots

You will also need the Forge for Immich⁠ Chrome extension.


⁠Getting started

⁠Step 1 — Start the server

Quick start — works on any Intel/AMD computer, with or without a GPU:

docker run -d --name immich-forge -p 8000:8000 \
  -v immich-forge-weights:/app/weights --restart unless-stopped \
  jamiekyu/immich-forge

Adjust for your computer:

Install the NVIDIA Container Toolkit⁠, then add --gpus all:

docker run -d --name immich-forge --gpus all -p 8000:8000 \
  -v immich-forge-weights:/app/weights --restart unless-stopped \
  jamiekyu/immich-forge

Use Docker Desktop⁠ (WSL 2 backend, the default) with a current NVIDIA driver. In PowerShell:

docker run -d --name immich-forge --gpus all -p 8000:8000 `
  -v immich-forge-weights:/app/weights --restart unless-stopped `
  jamiekyu/immich-forge
⁠🍎 Mac with Apple Silicon

In Docker Desktop → Settings → General, turn on "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" (much faster than the default emulation), then:

docker pull --platform linux/amd64 jamiekyu/immich-forge
docker run -d --name immich-forge --platform linux/amd64 -p 8000:8000 \
  -v immich-forge-weights:/app/weights --restart unless-stopped \
  jamiekyu/immich-forge

Without --platform linux/amd64, Docker fails with "no matching manifest for linux/arm64/v8". Expect enhancements to be slow (minutes per photo).

⁠💻 Intel Mac, or any computer without an NVIDIA GPU

Use the quick start command as-is.

⁠Step 2 — Open the setup page

In your browser, go to http://YOUR_FORGE_IP:8000 (or http://localhost:8000 on the same computer).

  • AI models are downloaded in the background on first start (about 2.3 GB, once).
  • Connect to Immich:
    1. Immich address — the address you open Immich at, e.g. http://192.168.1.50:2283.
      ⚠️ Use the computer's network IP address, not localhost
    2. Immich API key — in Immich: your avatar (top-right) → Account Settings → API Keys → New API Key. Copy it.
    3. Click Test connection, then Save.
  • Copy your Forge token. Forge creates one when you save (or paste your own, 16+ characters) — you'll paste it into the extension.

Come back to the same address any time to manage server settings.

⁠Step 3 — Connect the Chrome extension
  1. Install Forge for Immich⁠ from the Chrome Web Store.
  2. Click the Forge toolbar icon → Set up Forge server.
  3. Enter the server address — http://YOUR_FORGE_IP:8000 (or http://localhost:8000 if Forge runs on the same computer as your browser) — and your Forge token from step 2, then click Save & test. Allow access when Chrome asks.
  4. Open any photo in Immich and click the Forge icon. 🎉

Forging starts working once the AI models have finished downloading.


⁠Using Forge

  • Auto (the default) suggests enhancements for each photo, with the reason under every option. Custom starts from your own defaults, set on the extension's options page. Change anything per photo before you forge.
  • Click Forge, then compare before / after by dragging across the image.
  • Save to Immich adds the result as the primary photo of a stack, with your original kept inside it. Discard throws the result away.

⁠docker compose

Save as docker-compose.yml, run docker compose up -d, then continue from step 2 above:

services:
  forge:
    image: jamiekyu/immich-forge:latest
    # platform: linux/amd64         # uncomment on Apple Silicon Macs
    ports:
      - "8000:8000"
    volumes:
      - immich-forge-weights:/app/weights
    # Delete this "deploy" block if you have no NVIDIA GPU:
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    restart: unless-stopped

volumes:
  immich-forge-weights:

⁠Troubleshooting

ProblemFix
no matching manifest for linux/arm64/v8You're on an Apple Silicon Mac. Add --platform linux/amd64 (see step 2).
"The requested image's platform (linux/amd64) does not match…" warningHarmless on Apple Silicon — it's running through emulation. Add --platform linux/amd64 to silence it.
The setup page won't openCheck the container is running (docker ps) and you're using port 8000. From another computer, use the Forge machine's IP, not localhost.
Test connection can't reach ImmichUse your Immich computer's IP address (not localhost — inside the container that means the container itself) and port 2283.
Extension says the server isn't set up yetFinish step 2 on the setup page. Until then Forge refuses all requests — this keeps your library private.
Extension says token rejectedPaste the Forge token again. If you made a new one on the setup page, the old one stopped working.
Lost your Forge tokenSign in to the setup page with your Immich address and API key and copy it from there. Or run docker exec immich-forge python -m app.reset_token to make a new one.
Forging says models still downloadingWait for the download to finish — progress is on the setup page. If a download failed, click Retry there.
Extension can't reach the serverCheck the container is running (docker ps), the address uses port 8000, and no firewall blocks it. From another computer, use the Forge machine's IP, not localhost.
"cuda_available": false on an NVIDIA machineAdd --gpus all (or the compose deploy block), and install the NVIDIA Container Toolkit on Linux.
Out of GPU memoryLower FORGE_TILE_SIZE to 256, and FORGE_LOW_LIGHT_MAX_PIXELS to 2000000.
Auto says "face detection unavailable"The face model hasn't downloaded. Check the setup page, and click Retry if it failed.
Changed a -e setting but nothing happenedEnvironment settings are read at start: recreate the container (docker rm -f + run again, or docker compose up -d). A plain docker restart keeps the old settings. (Changes on the setup page apply straight away.)

⁠Settings

Set these with -e NAME=value (or under environment: in compose).

Essentials

VariableDefaultWhat it does
FORGE_DEVICEcudacuda uses an NVIDIA GPU when one is available, and the CPU otherwise — no change needed without a GPU. cpu forces the CPU even when a GPU is present.

Connection (optional) — normally set on the setup page. If you set them here instead, they're used as-is and shown on the page as read-only (handy for scripted installs).

VariableDefaultWhat it does
IMMICH_BASE_URL(set on the page)Your Immich address.
IMMICH_API_KEY(set on the page)Your Immich API key.
FORGE_API_TOKEN(created on the page)The token the extension must send. Until one exists, Forge refuses all requests.

Performance and limits

VariableDefaultWhat it does
FORGE_TILE_SIZE512Images are processed in tiles this big. Lower (e.g. 256) if the GPU runs out of memory; 0 turns tiling off.
FORGE_LOW_LIGHT_MAX_PIXELS4000000Largest photo brightened in one piece (~1.35 GB VRAM per megapixel). Bigger photos use a downscale carried back to full size. Raise on a big GPU (e.g. 12000000 on 24 GB).
FORGE_MAX_IMAGE_PIXELS40000000Largest photo Forge accepts (40 MP).
FORGE_MAX_OUTPUT_PIXELS100000000Largest result (100 MP). Enlarge ×4 drops to ×2 (or off) to fit.
FORGE_MAX_CONCURRENT_GPU_JOBS1Jobs processed at once.
FORGE_JOB_TTL_SECONDS3600How long a forge result is kept (counted from when the job started) before it's discarded if not saved.

AI models — each can be swapped, and most turned off (none greys that option out in the extension)

VariableDefaultOptions
FORGE_DEJPEG_BACKENDfbcnnfbcnn (FBCNN, Apache-2.0) · none
FORGE_DENOISE_BACKENDscunetscunet (SCUNet) · nlm (classic non-AI denoiser) · none
FORGE_LOW_LIGHT_BACKENDhvicidnethvicidnet (HVI-CIDNet, MIT) · classical (CLAHE + gamma)
FORGE_UPSCALE_BACKENDrealesrganrealesrgan (Real-ESRGAN) · lanczos (classic resize)
FORGE_FACE_BACKENDcodeformercodeformer (best results; non-commercial S-Lab license) · gfpgan (Apache-2.0) · gfpgan+codeformer · none
FORGE_COLORIZE_BACKENDddcolorddcolor (DDColor) · none

Auto mode

VariableDefaultWhat it does
FORGE_AUTO_FACE_DETECTIONtrueLook for faces (on the CPU) to decide whether to suggest Restore faces. false skips it.
FORGE_AUTO_*—Fine-tune when Auto suggests each enhancement (e.g. FORGE_AUTO_NOISE_SIGMA_MIN). See the full list⁠ and how the rules work⁠.

Advanced

VariableDefaultWhat it does
FORGE_SKIP_WEIGHT_DOWNLOAD01 skips the model download (for offline hosts with a pre-filled weights volume). Forging then doesn't wait for downloads.
FORGE_WEIGHTS_DIRweightsWhere the AI models — and the setup page's saved settings — are stored inside the container (/app/weights). Keep the volume mounted there, or your setup is lost when the container is recreated.
FORGE_CORS_ORIGINS(empty)Leave empty. The extension doesn't need it; set only for a custom web client.

Tag summary

Content type

Image

Digest

sha256:2a0c325d8…

Size

3.8 GB

Last updated

2 days ago

docker pull jamiekyu/immich-forge