min and max mixed up?

#49
by kanttouchthis - opened

I'm getting this errror when running the video chat example.

File "C:\Users\<user>\.cache\huggingface\modules\transformers_modules\openbmb\MiniCPM-V-2_6\4719557d673e9e2b4b3f083801626098f51441a8\processing_minicpmv.py", line 121, in _convert
    image_bounds = torch.hstack(
                   ^^^^^^^^^^^^^
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 124 but got size 123 for tensor number 1 in the list.

processing_minicpmv.py:119 containts valid_image_nums = max(len(image_start_tokens), len(image_end_tokens)). changing this to min instead of max seems to fix this and unless i'm misunderstanding the code, seems like how it was intended.

Sign up or log in to comment