[BugFix] AttributeError: 'AsyncOmniDiffusion' object has no attribute 'abort' (#624)

Signed-off-by: ZeldaHuang <hzm414167@alibaba-inc.com>
This commit is contained in:
Ziming Huang authored and GitHub committed 2026-01-05 14:53:10 +08:00
1 parent 4cc28275f9
commit f9b8bfd7bb
2 files changed
+11 -2

No files matched your search

+6 -1
View File
@@ -4,7 +4,7 @@
import multiprocessing as mp import multiprocessing as mp
import time import time
import weakref import weakref
from collections.abc import Callable from collections.abc import Callable, Iterable
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any from typing import Any
@@ -361,3 +361,8 @@ class DiffusionEngine:
def close(self) -> None: def close(self) -> None:
self._finalizer() self._finalizer()
def abort(self, request_id: str | Iterable[str]) -> None:
# TODO implement it
logger.warning("DiffusionEngine abort is not implemented yet")
pass
@@ -10,7 +10,7 @@ enabling concurrent request handling and streaming generation.
import asyncio import asyncio
import uuid import uuid
from collections.abc import AsyncGenerator from collections.abc import AsyncGenerator, Iterable
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
from dataclasses import fields from dataclasses import fields
from typing import Any from typing import Any
@@ -263,6 +263,10 @@ class AsyncOmniDiffusion:
except Exception: except Exception:
pass pass
async def abort(self, request_id: str | Iterable[str]) -> None:
"""Abort a request."""
self.engine.abort(request_id)
@property @property
def is_running(self) -> bool: def is_running(self) -> bool:
"""Check if the engine is running.""" """Check if the engine is running."""