diff --git a/backend/app/api/videos.py b/backend/app/api/videos.py index 430aff8..9f5fb1a 100644 --- a/backend/app/api/videos.py +++ b/backend/app/api/videos.py @@ -43,12 +43,16 @@ async def _process_video_generation(task_id: str, req: GenerateRequest): lipsync_video_path = settings.OUTPUT_DIR / f"{task_id}_lipsync.mp4" # Check health and generate - if await lipsync.check_health(): - await lipsync.generate(str(input_material_path), str(audio_path), str(lipsync_video_path)) + health = await lipsync.check_health() + print(f"[LipSync] Health check: {health}") + if health.get("ready", False): + print(f"[LipSync] Starting MuseTalk inference...") + await lipsync.generate(str(input_material_path), str(audio_path), str(lipsync_video_path)) else: - # Skip lipsync if not available - import shutil - shutil.copy(str(input_material_path), lipsync_video_path) + # Skip lipsync if not available + print(f"[LipSync] MuseTalk not ready, copying original video") + import shutil + shutil.copy(str(input_material_path), lipsync_video_path) tasks[task_id]["progress"] = 80