vllm.model_executor.models.lfm3_omni
¶
Inference-only LFM3-Omni model: images, videos and speech in, text out.
Prompts follow the Transformers processor: every image, video and clip is wrapped
in one span pair, a video is a series of timestamped frame groups, and with
use_audio_in_video each video takes the first clip after it as its soundtrack,
split across its frame groups. The speech output head is not served and its
weights are skipped on load.
Classes:
Lfm3OmniMultiModalProcessor
¶
Bases: Lfm3VlMultiModalProcessor
_soundtracks(prompt)
¶
The audio item each video takes as its soundtrack: the first clip after the video that no earlier video took.
_with_soundtrack(video, num_tokens)
¶
Splits the soundtrack's encoder tokens at the first frame of each group, after the group.
_with_soundtrack_placeholders(prompt, num_audios)
¶
The chat parser adds each video's decoded soundtrack as the audio
item right after it; the openai content format puts no placeholder for
it in the prompt. When the audio items outnumber the placeholders by
exactly one per video, put that placeholder right after every video,
as HF's load_audio_from_video does; otherwise the prompt is kept.
_VideoGroups
dataclass
¶
Bases: PromptUpdateDetails
A video placeholder that takes a soundtrack, kept as frame groups until the prompt shows which clip that is.