- Introduced `OmniModelRunnerOutput` and `OmniRequestOutput` classes for handling multimodal outputs. - Implemented `OmniEngineCoreRequest` and `OmniInputPreprocessor` to manage prompt embeddings and additional information. - Created `OmniTokensPrompt`, `OmniTokenInputs`, and `OmniEmbedsPrompt` for enhanced token handling. - Added parsing and preprocessing functions to support new input structures. - Removed the obsolete `diffusion_engine.py` file as part of the refactor.
15 lines
405 B
Python
15 lines
405 B
Python
from vllm.v1.outputs import ModelRunnerOutput
|
|
from vllm.outputs import RequestOutput
|
|
from typing import Optional
|
|
from dataclasses import dataclass
|
|
import torch
|
|
|
|
|
|
class OmniModelRunnerOutput(ModelRunnerOutput):
|
|
multimodal_outputs: Optional[dict[str, torch.Tensor]] = None
|
|
|
|
@dataclass
|
|
class OmniRequestOutput(RequestOutput):
|
|
stage_id: int
|
|
final_output_type: str
|
|
request_output: RequestOutput |