Skip to content

Commit 84d5734

Browse files
authored
[BugFix][MM] Fix Nonetype error when video is cache in qwen2.5-omni-thinker (#26004)
Signed-off-by: wwl2755 <[email protected]>
1 parent 57b46d7 commit 84d5734

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

vllm/model_executor/models/qwen2_5_omni_thinker.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,15 @@ def _maybe_apply_prompt_updates(
323323
mm_item_counts = mm_items.get_all_counts()
324324
self._validate_mm_kwargs(mm_kwargs, mm_item_counts)
325325

326-
use_audio_in_video = (all(
327-
item["use_audio_in_video"].data
328-
for item in mm_kwargs["video"]) if "video" in mm_kwargs else False)
326+
use_audio_in_video = False
327+
if "video" in mm_kwargs:
328+
video_items = [
329+
item for item in mm_kwargs["video"] if item is not None
330+
]
331+
# only check video items (if there are any)
332+
if video_items:
333+
use_audio_in_video = all(item["use_audio_in_video"].data
334+
for item in video_items)
329335

330336
if is_update_applied:
331337
mm_placeholders = self._find_mm_placeholders(

0 commit comments

Comments
 (0)