标签: Python

ValueError: (‘The batch size of the image embeddings and the input points must be the same. ‘, ‘Got 5 and 1 respectively.’, ‘ if you want to pass multiple points for the same image, make sure

ValueError: ('The batch size of the image embeddings and the input points must be the same. ', 'Got 5 and 1 respectively.', ' if you want to pass multiple points for the same image, make sure

该报错通常出现在使用 Transformers 的 mask-generation pipeline 运行 SAM 模型、并把 crops_n_layers 设为大于 0 的场景。优先排查是否存在“pipeline 在裁剪模式下产生多个输出、与输入点 batch size 不一致”的已知 bug,而