mirror of
https://github.com/OpenBMB/MiniCPM-V.git
synced 2026-02-05 10:19:18 +08:00
Update dataset.py
fix image_id_cnt
This commit is contained in:
@@ -329,7 +329,7 @@ def preprocess(
|
|||||||
for j in range(len(patches[0])):
|
for j in range(len(patches[0])):
|
||||||
images.append(patches[i][j])
|
images.append(patches[i][j])
|
||||||
if use_image_id:
|
if use_image_id:
|
||||||
image_placeholder = f'{tokenizer.im_id_start}{idx}{tokenizer.im_id_end}' + image_placeholder
|
image_placeholder = f'{tokenizer.im_id_start}{image_id_cnt}{tokenizer.im_id_end}' + image_placeholder
|
||||||
image_id_cnt += 1
|
image_id_cnt += 1
|
||||||
image_placeholder += get_grid_placeholder(
|
image_placeholder += get_grid_placeholder(
|
||||||
tokenizer, best_grid, query_nums, new_schema = new_schema)
|
tokenizer, best_grid, query_nums, new_schema = new_schema)
|
||||||
|
|||||||
Reference in New Issue
Block a user