Skip to content

Commit ae9f305

Browse files
alex-jw-brooksjimpang
authored and
jimpang
committed
[Misc] Rename Audios -> Audio in Qwen2audio Processing (vllm-project#17507)
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
1 parent ff304e1 commit ae9f305

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

vllm/model_executor/models/qwen2_audio.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,15 @@ def _call_hf_processor(
150150
mm_data: Mapping[str, object],
151151
mm_kwargs: Mapping[str, Any],
152152
) -> BatchFeature:
153+
# NOTE - we rename audios -> audio in mm data because transformers has
154+
# deprecated audios for the qwen2audio processor and will remove
155+
# support for it in transformers 4.54.
156+
audios = mm_data.pop("audios", [])
157+
if audios:
158+
mm_data["audio"] = audios
159+
153160
# Text-only input not supported in composite processor
154-
if not mm_data.get("audios", []):
161+
if not mm_data.get("audio", []):
155162
prompt_ids = self.info.get_tokenizer().encode(prompt)
156163
prompt_ids = self._apply_hf_processor_tokens_only(prompt_ids)
157164
return BatchFeature(dict(input_ids=[prompt_ids]), tensor_type="pt")

0 commit comments

Comments
 (0)