mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 13:42:51 +08:00
fix bug
Former-commit-id: 64cb947c60398dfdfc2877f898147b0240089ea3
This commit is contained in:
parent
cb776752f6
commit
413a206652
@ -93,7 +93,7 @@ class MultiModalDataCollatorForSeq2Seq(DataCollatorForSeq2Seq):
|
|||||||
else:
|
else:
|
||||||
image_grid_thw.append(torch.tensor(feature["image_grid_thw"], dtype=torch.long))
|
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:
|
if extra_features["image_grid_thw"].numel() == 0:
|
||||||
extra_features["image_grid_thw"] = None
|
extra_features["image_grid_thw"] = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user