7c23c3f4c7
- Telegram-Bot (Polling) mit Inline-Menue: Klarbild x2/x4, Freistellen, kombiniert - Upscaling via OpenCV dnn_superres (FSRCNN default, EDSR optional), gekachelt - Freistellen via rembg (isnet-general-use, Alpha-Matting) - Picdrop-Batch via SFTP (/picdrop) - Health-Server (aiohttp) fuer Coolify, Zugriffsschutz via ALLOWED_USER_IDS - Dockerfile backt Modelle (SR von raw.githubusercontent, rembg von HF-Mirror) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
30 lines
1.1 KiB
Bash
30 lines
1.1 KiB
Bash
# --- Pflicht ---
|
|
BOT_TOKEN=123456:AA... # Telegram Bot-Token (@BotFather)
|
|
|
|
# --- Zugriffsschutz (empfohlen) ---
|
|
# Kommagetrennte Telegram-User-IDs. Leer = jeder darf. /start zeigt die eigene ID.
|
|
ALLOWED_USER_IDS=
|
|
|
|
# --- Bild-Pipeline ---
|
|
UPSCALE_MODEL=fsrcnn # fsrcnn (schnell) | edsr (Detail, aber CPU-lahm)
|
|
REMBG_MODEL=isnet-general-use # u2net | u2netp | isnet-general-use | birefnet-general
|
|
MAX_INPUT_EDGE=1600 # laengste Kante vor dem Upscalen (Speicherschutz)
|
|
TILE_SIZE=256 # Kachelgroesse Upscaling (kleiner = weniger RAM)
|
|
MAX_OUTPUT_MP=80 # Deckel Ausgabe-Megapixel
|
|
POST_DENOISE=1 # leichte Entrauschung nach Upscale
|
|
POST_SHARPEN=1 # Unsharp-Mask nach Upscale
|
|
JPEG_QUALITY=95
|
|
|
|
# --- Optionales Real-ESRGAN-ONNX-Backend (starke Box/GPU) ---
|
|
ENABLE_REALESRGAN=0
|
|
# REALESRGAN_ONNX=/app/models/realesrgan_x4.onnx
|
|
|
|
# --- Health-Server / Coolify ---
|
|
PORT=8080
|
|
|
|
# --- Picdrop-Batch (optional) ---
|
|
PICDROP_HOST=ftps.picdrop.com
|
|
PICDROP_PORT=22
|
|
PICDROP_USER=
|
|
PICDROP_PASSWORD=
|