fix: modality length mismatch with image_data (#7887)

This commit is contained in:
杨睿
2025-07-15 14:27:54 +08:00
committed by GitHub
parent 5dc5866e8e
commit 9b560c3e1c

View File

@@ -297,6 +297,9 @@ class GenerateReqInput:
self.modalities.append("image")
elif len(self.image_data[i]) > 1:
self.modalities.append("multi-images")
else:
# Ensure len(self.modalities) == len(self.image_data)
self.modalities.append(None)
# Expand parallel_sample_num
self.image_data = self.image_data * self.parallel_sample_num
self.modalities = self.modalities * self.parallel_sample_num