Merge pull request 'fix(P0): 移除 MCI 插帧,60fps 视频直接输出 25fps 避免超时 504' (#2008) from fix/remove-mci-interpolation into develop
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m50s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 2m47s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m11s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 3m18s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 4m17s
CI/CD Pipeline / CI Gate (pull_request) Successful in 41s
AI Code Review / AI Code Review (pull_request) Successful in 7m7s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 2m58s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 3m20s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m21s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m48s
CI/CD Pipeline / Integration Tests (push) Successful in 11m50s
CI/CD Pipeline / Validate - Style (push) Successful in 12m26s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 10m56s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 15m10s
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (push) Has been skipped
CI/CD Pipeline / Unit Tests (push) Successful in 19m18s
CI/CD Pipeline / Validate - Security (push) Successful in 40m0s
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped

This commit was merged in pull request #2008.
This commit is contained in:
2026-09-21 21:21:43 +08:00
+7 -19
View File
@@ -3,8 +3,8 @@
部署在 RTX2060 本地,接收 gpu_worker.py 的推理请求,调用 MuseTalk 生成口型同步视频。
Bug 修复(2026-09-21):
- Bug1: 60fps降帧逻辑 — 输入视频 >30fps 时先降帧至 25fps 推理,推理后用
minterpolate MCI 插帧回原帧率,并记录 input_fps/inference_fps
- Bug1: 60fps降帧逻辑 — 输入视频 >30fps 时先降帧至 25fps 推理,直接输出 25fps 结果
(MCI 运动补偿插帧已移除,CPU密集且口型场景 25fps 足够)
- Bug2: 超时终止机制 — 推理线程改为 daemon + abort_event 机制,超时时 set event
让推理循环检测退出,同时 kill 所有活跃 ffmpeg 子进程,等线程退出后再释放锁和清理目录
- Bug3: /health 接口增加 gfpgan_loaded 和 gfpgan_load_error 字段
@@ -977,25 +977,13 @@ def _run_inference(
pass
raise
# ── Step 8: 高帧率视频插帧还原(如输入 >30fps,从 25fps 插帧回原帧率)──
# ── Step 8: 高帧率视频处理 ──
# 对口型数字人视频,25fps 完全够用。
# MCI 运动补偿插帧极其耗时(343帧>6分钟),已移除。
# 直接输出 25fps 推理结果,后续封装音频后播放器自动适配帧率。
final_video = silent_video_path
if video_downsampled:
upscaled_video = video_path.parent / "output_upscaled.mp4"
logger.info("将推理结果从 %.1f fps 插帧还原至 %.1f fps", inference_fps, original_fps)
try:
_run_ffmpeg([
"ffmpeg", "-y", "-v", "warning",
"-i", str(silent_video_path),
"-vf", f"minterpolate=mi_mode=mci:mc_mode=aobmc:me_mode=bidir:vsbmc=1:fps={int(original_fps)}",
"-c:v", "libx264", "-preset", "veryfast",
"-crf", "18", "-pix_fmt", "yuv420p",
str(upscaled_video),
], timeout=max(300, int(original_fps * 10)))
final_video = upscaled_video
logger.info("插帧还原完成: %.1f fps", original_fps)
except Exception as e:
logger.warning("插帧还原失败,使用 %.1f fps 结果: %s", inference_fps, e)
final_video = silent_video_path
logger.info("输入视频 %.1f fps,降帧至 %.1f fps 推理后直接输出(不做插帧还原)", original_fps, inference_fps)
shutil.copy2(str(final_video), str(output_path))