[BugFix] Revert incorrect MM keep_on_cpu=True changes (#52881)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user