mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 00:28:10 +08:00
fix bug
Former-commit-id: 6e19e56000dd18d5faf84ceabce8d7708ff21e4d
This commit is contained in:
parent
7e4c5d4bb3
commit
559b84dceb
@ -93,7 +93,7 @@ class MultiModalDataCollatorForSeq2Seq(DataCollatorForSeq2Seq):
|
||||
else:
|
||||
image_grid_thw.append(torch.tensor(feature["image_grid_thw"], dtype=torch.long))
|
||||
|
||||
extra_features["image_grid_thw"] = torch.cat(pixel_values, dim=0)
|
||||
extra_features["image_grid_thw"] = torch.cat(image_grid_thw, dim=0)
|
||||
if extra_features["image_grid_thw"].numel() == 0:
|
||||
extra_features["image_grid_thw"] = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user