[Bugfix] embed_is_patch for Idefics3 (#15696)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-03-28 23:27:52 +08:00
committed by GitHub
parent 3b00ff9138
commit 541d1df486
5 changed files with 320 additions and 188 deletions

View File

@@ -160,7 +160,7 @@ class Qwen2AudioMultiModalProcessor(
mm_kwargs: Mapping[str, Any],
) -> BatchFeature:
# Text-only input not supported in composite processor
if not mm_data or not mm_data.get("audios", []):
if not mm_data.get("audios", []):
prompt_ids = self.info.get_tokenizer().encode(prompt)
prompt_ids = self._apply_hf_processor_tokens_only(prompt_ids)
return BatchFeature(dict(input_ids=[prompt_ids]), tensor_type="pt")