feat: AI photo enhancement (Real-ESRGAN container) + restore original
- new photo-ai service: FastAPI + Real-ESRGAN x2plus on CPU, internal only - async job queue in server (POST enhance-ai / GET status), 5min timeout, sequential processing - keep original photo backup (entries.photo_original_path, uploads/.originals), restore-original endpoint - UI: AI button and restore-original button in enhance modal - db: photo_original_path column (init.sql, migration.sql, runtime ensure)
This commit is contained in:
@@ -37,6 +37,7 @@ services:
|
||||
AI_MODEL: ${AI_MODEL:-qwen2.5-1.5b-instruct-q4_k_m.gguf}
|
||||
AI_PROMPT: ${AI_PROMPT:-}
|
||||
AI_REQUEST_TIMEOUT_MS: ${AI_REQUEST_TIMEOUT_MS:-120000}
|
||||
PHOTO_AI_URL: ${PHOTO_AI_URL:-http://photo-ai:8080}
|
||||
NODE_ENV: production
|
||||
TZ: Europe/Moscow
|
||||
depends_on:
|
||||
@@ -113,7 +114,20 @@ services:
|
||||
- "8080:8080"
|
||||
|
||||
|
||||
# ИИ-улучшение фотографий (Real-ESRGAN x2, CPU).
|
||||
# Поднимается вместе со стеком; если не нужен — PHOTO_AI_URL пустой в .env.
|
||||
photo-ai:
|
||||
build: ./photo-ai
|
||||
container_name: photo-ai
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MODEL_PATH: /models/RealESRGAN_x2plus.pth
|
||||
MAX_INPUT_PIXELS: ${PHOTO_AI_MAX_PIXELS:-4000000}
|
||||
TZ: Europe/Moscow
|
||||
volumes:
|
||||
- photo-ai-models:/models
|
||||
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
photo-ai-models:
|
||||
|
||||
Reference in New Issue
Block a user