[Frontend] Add video embeds input support (#54242)
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
This commit is contained in:
@@ -14,6 +14,7 @@ from vllm.distributed.ec_transfer.ec_connector.base import (
|
||||
ECConnectorRole,
|
||||
)
|
||||
from vllm.logger import init_logger
|
||||
from vllm.utils.collection_utils import is_list_of
|
||||
from vllm.v1.core.sched.output import SchedulerOutput
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -221,11 +222,15 @@ class ECExampleConnector(ECConnectorBase):
|
||||
# back to processing the media itself.
|
||||
if feature.data is not None:
|
||||
wanted = self._placeholder_metadata_fields(feature.modality)
|
||||
metadata = {
|
||||
key: value.tolist()
|
||||
for key, value in feature.data.get_data().items()
|
||||
if key in wanted and isinstance(value, torch.Tensor)
|
||||
}
|
||||
for key, value in feature.data.get_data().items():
|
||||
if key not in wanted:
|
||||
continue
|
||||
if isinstance(value, torch.Tensor):
|
||||
metadata[key] = value.tolist()
|
||||
elif is_list_of(value, (int, float)):
|
||||
# Some metadata (e.g. Qwen3-VL video timestamps) is
|
||||
# produced as a plain list rather than a tensor.
|
||||
metadata[key] = value
|
||||
items.append({"mm_hash": feature.identifier, **metadata})
|
||||
|
||||
if not items:
|
||||
|
||||
Reference in New Issue
Block a user