[BugFix] Fix Wan2.2-VACE-Fun cache and serving lifecycle (#4667)

Signed-off-by: Ianniu <985683179yzy@gmail.com>
Signed-off-by: david6666666 <530634352@qq.com>
Co-authored-by: Ianniu <985683179yzy@gmail.com>
This commit is contained in:
WeiQing ChenandIanniu authored and GitHub committed 2026-06-25 11:20:58 +08:00
1 parent d612233bef
commit d94108693a
9 files changed
+291 -14

No files matched your search

+8 -9
View File
@@ -574,15 +574,14 @@ async def omni_run_server_worker(listen_address, sock, args, client_config=None,
**uvicorn_kwargs,
)
# NB: Await server shutdown only after the backend context is exited
try:
await shutdown_task
finally:
state = getattr(app, "state", None)
serving_speech = getattr(state, "openai_serving_speech", None) if state is not None else None
if serving_speech is not None:
serving_speech.shutdown()
sock.close()
try:
await shutdown_task
finally:
state = getattr(app, "state", None)
serving_speech = getattr(state, "openai_serving_speech", None) if state is not None else None
if serving_speech is not None:
serving_speech.shutdown()
sock.close()
@asynccontextmanager