finalf0 HwwwH commited on
Commit
6a01741
1 Parent(s): 3a243ee

Fix assert (#5)

Browse files

- Update modeling_minicpmv.py (5ff79733fd3c3f05d4b8eb7f3aee555d92b81cdb)


Co-authored-by: Zhihui He <[email protected]>

Files changed (1) hide show
  1. modeling_minicpmv.py +2 -1
modeling_minicpmv.py CHANGED
@@ -292,7 +292,8 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
292
 
293
  if batched is False:
294
  images_list, msgs_list = [images_list], [msgs_list]
295
- assert len(images_list) == len(msgs_list), "The batch dim of images_list and msgs_list should be the same."
 
296
 
297
  if processor is None:
298
  if self.processor is None:
 
292
 
293
  if batched is False:
294
  images_list, msgs_list = [images_list], [msgs_list]
295
+ if images_list is not None:
296
+ assert len(images_list) == len(msgs_list), "The batch dim of images_list and msgs_list should be the same."
297
 
298
  if processor is None:
299
  if self.processor is None: