修复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"
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user