[Perf][Multimodal] Avoid duplicate text embedding in Qwen2.5-Omni (#55415)
Signed-off-by: waizuichougou <2082431897@qq.com>
This commit is contained in:
@@ -1473,14 +1473,12 @@ class Qwen2_5OmniThinkerForConditionalGeneration(
|
|||||||
if multimodal_embeddings is None or is_multimodal is None:
|
if multimodal_embeddings is None or is_multimodal is None:
|
||||||
return super().embed_input_ids(input_ids)
|
return super().embed_input_ids(input_ids)
|
||||||
|
|
||||||
inputs_embeds = self._embed_text_input_ids(
|
|
||||||
input_ids,
|
|
||||||
self.get_language_model().embed_input_ids,
|
|
||||||
is_multimodal=is_multimodal,
|
|
||||||
)
|
|
||||||
|
|
||||||
if len(multimodal_embeddings) == 0:
|
if len(multimodal_embeddings) == 0:
|
||||||
return inputs_embeds
|
return super().embed_input_ids(
|
||||||
|
input_ids,
|
||||||
|
multimodal_embeddings=multimodal_embeddings,
|
||||||
|
is_multimodal=is_multimodal,
|
||||||
|
)
|
||||||
|
|
||||||
# Check for audio-in-video: interleaved video and audio tokens
|
# Check for audio-in-video: interleaved video and audio tokens
|
||||||
# in the multimodal region. Only use the interleaved path when
|
# in the multimodal region. Only use the interleaved path when
|
||||||
|
|||||||
Reference in New Issue
Block a user