Unverified Commit dd2b5633 authored by Woosuk Kwon's avatar Woosuk Kwon Committed by GitHub
Browse files

[V1][Bugfix] Skip hashing empty or None mm_data (#11386)


Signed-off-by: default avatarWoosuk Kwon <woosuk.kwon@berkeley.edu>
parent 47a0b615
...@@ -180,6 +180,10 @@ class MMHasher: ...@@ -180,6 +180,10 @@ class MMHasher:
return None return None
mm_data = prompt["multi_modal_data"] mm_data = prompt["multi_modal_data"]
if not mm_data:
# mm_data can be None or an empty dict.
return None
image_inputs = mm_data["image"] image_inputs = mm_data["image"]
return self.hash_images(image_inputs) return self.hash_images(image_inputs)
......
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