mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-17 20:30:36 +08:00
[misc] update internvl constants (#7801)
This commit is contained in:
@@ -552,9 +552,9 @@ class InternVLPlugin(BasePlugin):
|
||||
|
||||
if len(images) != 0 or len(videos) != 0:
|
||||
pixel_values_list = _concatenate_list(image_video_patches)
|
||||
mm_inputs["pixel_values"] = torch.stack(
|
||||
[torch.tensor(patch_ndarray) for patch_ndarray in pixel_values_list]
|
||||
)
|
||||
# in the latest version of transformers,
|
||||
# the pixel_values is a list of tensors not ndarray
|
||||
mm_inputs["pixel_values"] = torch.stack(pixel_values_list)
|
||||
|
||||
if len(images) != 0:
|
||||
mm_inputs.update({"image_num_patches": image_num_patches})
|
||||
|
||||
Reference in New Issue
Block a user