feat: harden pipeline UX — preprocess, rembg alpha, remix/lightbox

Downscale to 2000px JPEG before rembg, random blend opacity, timeout
retries, per-variant remix prefill, lightbox, and longer SFTP idle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-16 23:35:06 +02:00
parent 8ef123393a
commit 83d4468b69
16 changed files with 594 additions and 50 deletions
+4 -2
View File
@@ -25,6 +25,7 @@ ARG GMIC_DEB_URL=https://gmic.eu/get_file.php?file=linux/gmic_4.0.2_debian12_boo
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
imagemagick \
python3 \
python3-pip \
&& curl -fsSL "$GMIC_DEB_URL" -o /tmp/gmic.deb \
@@ -49,9 +50,10 @@ RUN pip install --break-system-packages -r requirements.txt
COPY app ./app
# rembg downloads its ONNX model (u2net, ~176MB) from GitHub on first use
# rembg downloads its ONNX model (default u2net) from GitHub on first use
# and caches it under $HOME/.u2net — persisted via the `rembg_cache`
# volume in compose.yml so it survives container restarts.
# volume in compose.yml so it survives container restarts. Alpha matting
# is enabled by default (REMBG_ALPHA=1).
# Overridden per-service in compose.yml (`worker` -> python -m app.worker,
# `web` -> uvicorn app.main:app).