Make process_image return 2D grid_thw [[t,h,w]] for multi-image support

This commit is contained in:
Daniel Maddern 2026-08-19 22:04:12 +07:00
parent 6866263631
commit 67e4b12246

View file

@ -103,7 +103,7 @@ def process_image(
grid_h = h_bar // patch_size grid_h = h_bar // patch_size
grid_w = w_bar // patch_size grid_w = w_bar // patch_size
grid_thw = torch.tensor([1, grid_h, grid_w], device=device, dtype=torch.long) grid_thw = torch.tensor([[1, grid_h, grid_w]], device=device, dtype=torch.long)
pixel_values = normalized pixel_values = normalized
channel = pixel_values.shape[0] channel = pixel_values.shape[0]