Merge branch 'main' into qwen-image-2.1
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
This commit is contained in:
51 files changed
+2189
-70
No files matched your search
@@ -141,7 +141,8 @@ class DuplexSessionTasks:
|
||||
task.cancel()
|
||||
try:
|
||||
await asyncio.wait_for(asyncio.gather(*tasks, return_exceptions=True), timeout=timeout_s)
|
||||
except TimeoutError:
|
||||
# asyncio.TimeoutError is not the builtin TimeoutError before Python 3.11.
|
||||
except (TimeoutError, asyncio.TimeoutError):
|
||||
pass
|
||||
if cancelled_tail is not None and self.append_tail is cancelled_tail:
|
||||
self.append_tail = None
|
||||
|
||||
@@ -699,7 +699,9 @@ class DuplexSessionManager:
|
||||
while not shutdown_event.is_set():
|
||||
try:
|
||||
await asyncio.wait_for(shutdown_event.wait(), timeout=interval)
|
||||
except TimeoutError:
|
||||
# The timeout is this loop's tick. asyncio.TimeoutError is not the builtin
|
||||
# TimeoutError before Python 3.11, so catch both or the tick escapes the loop.
|
||||
except (TimeoutError, asyncio.TimeoutError):
|
||||
try:
|
||||
await self.reap_expired()
|
||||
except Exception:
|
||||
|
||||
@@ -1486,7 +1486,8 @@ class DuplexSessionRunner:
|
||||
active_task.cancel()
|
||||
try:
|
||||
await asyncio.wait_for(asyncio.gather(active_task, return_exceptions=True), timeout=0.25)
|
||||
except TimeoutError:
|
||||
# asyncio.TimeoutError is not the builtin TimeoutError before Python 3.11.
|
||||
except (TimeoutError, asyncio.TimeoutError):
|
||||
pass
|
||||
if notify:
|
||||
self.emit(
|
||||
|
||||
@@ -422,7 +422,7 @@ class OmniEngineBase:
|
||||
for client in self.stage_clients
|
||||
]
|
||||
supported_tasks: set[str] = set()
|
||||
if any(getattr(client, "is_comprehension", False) for client in self.stage_clients):
|
||||
if any(getattr(stage_config, "is_comprehension", False) for stage_config in self.stage_configs):
|
||||
supported_tasks.add("generate")
|
||||
if any(meta.final_output_type == "audio" for meta in self.stage_metadata):
|
||||
supported_tasks.add("speech")
|
||||
|
||||
Reference in new issue
Block a user