Unverified Commit fde60ee7 authored by hfan's avatar hfan Committed by GitHub
Browse files

[Model] Fix a check for None but the return value was empty list in Gemma3 MM...


[Model] Fix a check for None but the return value was empty list in Gemma3 MM vision_embeddings (#21479)
Signed-off-by: default avatarHongmin Fan <fanhongmin@google.com>
parent b38bc652
...@@ -627,7 +627,7 @@ class Gemma3ForConditionalGeneration(nn.Module, SupportsMultiModal, SupportsPP, ...@@ -627,7 +627,7 @@ class Gemma3ForConditionalGeneration(nn.Module, SupportsMultiModal, SupportsPP,
inputs_embeds = self.get_input_embeddings(input_ids, inputs_embeds = self.get_input_embeddings(input_ids,
vision_embeddings) vision_embeddings)
if vision_embeddings is not None: if (vision_embeddings is not None) and len(vision_embeddings) != 0:
kwargs = self.prepare_attn_masks( kwargs = self.prepare_attn_masks(
input_ids, input_ids,
positions, positions,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment