修复LAMA模式100%卡死:帧区间扩展超出视频总帧数导致FramePrefetcher死锁

- 限制字幕区间end不超过frame_count,防止内循环消费哨兵后外层永久阻塞
- LAMA批量推理改为mini-batch(4帧),避免GPU OOM
- 各inpaint模型空inpaint_area时返回原始帧
- FFmpeg子进程添加600s超时保护

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
flavioy
2026-04-08 23:34:53 +08:00
parent 99788e875b
commit 93d822d067
6 changed files with 46 additions and 26 deletions

View File

@@ -97,4 +97,8 @@ class FFmpegVideoWriter:
self._process.stdin.close()
except BrokenPipeError:
pass
self._process.wait()
try:
self._process.wait(timeout=600)
except subprocess.TimeoutExpired:
self._process.terminate()
self._process.wait(timeout=5)