[BugFix] Revert incorrect MM keep_on_cpu=True changes (#52881)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-08-19 07:07:40 +00:00
committed by GitHub
parent 5a4c8d9924
commit ee11730751
7 changed files with 17 additions and 12 deletions
+3 -1
View File
@@ -961,7 +961,9 @@ class IsaacForConditionalGeneration(
device = next(self.language_model.parameters()).device
dtype = self.vision_embedding.linear_fc1.weight.dtype
pixel_values = pixel_values.to(device=device, dtype=dtype)
spatial_grids = image_grid_thw[:, 1:3].to(device, dtype=torch.int32)
spatial_grids = image_grid_thw[:, 1:3].to(
device, dtype=torch.int32, non_blocking=True
)
vision_embeddings = self.vision_embedding((pixel_values, spatial_grids))
merge_size = self.config.vision_config.pixel_shuffle_scale_factor