-
Stefy Lanza (nextime / spora ) authored
Make video enhancement fully AI-on-CoderAI and rework township outcomes. Upscaling (Real-ESRGAN / SD upscalers): - Support diffusers-style .safetensors weights + config.json (e.g. hlky/RealESRGAN_*), not just classic .pth; infer RRDBNet arch/scale from config. fp16 + tiling for performance. - AI-or-fail: no ffmpeg fallback. Auto-select a configured upscaler when the request omits a model (find_capable_model). - Fix a registry-pollution bug: cache upscalers in a private dict, never under a synthetic 'upscale:<id>' key in multi_model_manager.models (which made a later request_model() resolve/reload the bogus key -> 400). - Per-frame progress + a first-class "upscale" task (pause/cancel/thermal), with a periodic thermal re-check through the frame loop. Interpolation (RIFE): - AI-or-fail: removed the ffmpeg minterpolate fallback. Resolve the rife-ncnn-vulkan binary + bundled model robustly, pass exact -n frame count, and pin -g to the SAME GPU CoderAI uses (matched by CUDA device name, not a hardcoded index). Progress + "interpolate" task + thermal guard. Township generator: - One draw per match (not per fighter); longer, configurable outcome videos built as a finish -> victory two-shot sequence; richer, more brutal, camera-aware prompts (finish/victory templates editable on the Prompts page). - Stream large results via response_format=url instead of base64-in-JSON; per-frame progress for both upscale and interpolate. Configurable temp dir: - New --tmp CLI flag and config.tmp_dir (+ admin Settings field, applied live). Sets tempfile.tempdir and TMPDIR/TMP/TEMP so all scratch (frame extraction, upscaling, interpolation) and child processes use it — fixes "[Errno 28] No space left on device" when /tmp is small. Co-Authored-By:Claude Opus 4.8 <noreply@anthropic.com>
cc2436ed