[Misc] Keep serving changes out of example refactor
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
39e1c70aea
commit
0db924bc54
4 files changed
+5
-51
No files matched your search
@@ -30,7 +30,6 @@ from vllm_omni.entrypoints.openai.stage_params import (
|
||||
from vllm_omni.entrypoints.openai.utils import get_stage_type, parse_lora_request
|
||||
from vllm_omni.entrypoints.openai.video_api_utils import _encode_video_bytes, encode_video_base64
|
||||
from vllm_omni.inputs.data import OmniDiffusionSamplingParams, OmniTextPrompt
|
||||
from vllm_omni.model_extras import build_image_to_video_prompt
|
||||
from vllm_omni.outputs.output_metadata import (
|
||||
DiffusionMetadataMapping,
|
||||
DiffusionMultimodalOutput,
|
||||
@@ -101,14 +100,11 @@ class OmniOpenAIServingVideo:
|
||||
if self._stage_configs is None and stage_configs is not None:
|
||||
self._stage_configs = stage_configs
|
||||
|
||||
def _get_diffusion_od_config(self) -> object | None:
|
||||
get_od_config = getattr(self._engine_client, "get_diffusion_od_config", None)
|
||||
return get_od_config() if callable(get_od_config) else getattr(self._engine_client, "od_config", None)
|
||||
|
||||
@property
|
||||
def supports_mixed_reference_inputs(self) -> bool:
|
||||
"""Return whether the configured diffusion model accepts mixed refs."""
|
||||
od_config = self._get_diffusion_od_config()
|
||||
get_od_config = getattr(self._engine_client, "get_diffusion_od_config", None)
|
||||
od_config = get_od_config() if callable(get_od_config) else getattr(self._engine_client, "od_config", None)
|
||||
if od_config is None:
|
||||
return False
|
||||
|
||||
@@ -256,18 +252,6 @@ class OmniOpenAIServingVideo:
|
||||
loggable = {**loggable, **redacted}
|
||||
logger.info("Applied extra_params: %s", loggable)
|
||||
|
||||
model_class_name = getattr(self._get_diffusion_od_config(), "model_class_name", None)
|
||||
prompt = cast(
|
||||
OmniTextPrompt,
|
||||
build_image_to_video_prompt(
|
||||
model_class_name=model_class_name,
|
||||
prompt=prompt,
|
||||
height=gen_params.height,
|
||||
width=gen_params.width,
|
||||
num_frames=gen_params.num_frames,
|
||||
),
|
||||
)
|
||||
|
||||
self._apply_lora(request.lora, gen_params)
|
||||
|
||||
logger.info(
|
||||
|
||||
Reference in new issue
Block a user