修复check_health
This commit is contained in:
@@ -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"
|
lipsync_video_path = settings.OUTPUT_DIR / f"{task_id}_lipsync.mp4"
|
||||||
|
|
||||||
# Check health and generate
|
# Check health and generate
|
||||||
if await lipsync.check_health():
|
health = await lipsync.check_health()
|
||||||
await lipsync.generate(str(input_material_path), str(audio_path), str(lipsync_video_path))
|
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:
|
else:
|
||||||
# Skip lipsync if not available
|
# Skip lipsync if not available
|
||||||
import shutil
|
print(f"[LipSync] MuseTalk not ready, copying original video")
|
||||||
shutil.copy(str(input_material_path), lipsync_video_path)
|
import shutil
|
||||||
|
shutil.copy(str(input_material_path), lipsync_video_path)
|
||||||
|
|
||||||
tasks[task_id]["progress"] = 80
|
tasks[task_id]["progress"] = 80
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user