[VLM] Adopt fast image processor by default (#5065)
This commit is contained in:
@@ -222,10 +222,10 @@ class MultimodalDataItem:
|
||||
# memoryview() doesn't support PyTorch's BFloat16 dtype
|
||||
tensor = tensor.float()
|
||||
|
||||
assert isinstance(tensor, torch.Tensor)
|
||||
if tensor.is_cuda:
|
||||
tensor_cpu = torch.frombuffer(
|
||||
tensor.storage().untyped(), dtype=tensor.dtype, count=tensor.numel()
|
||||
).clone()
|
||||
# TODO: improve this
|
||||
tensor_cpu = tensor.cpu()
|
||||
else:
|
||||
tensor_cpu = tensor
|
||||
|
||||
@@ -321,7 +321,6 @@ class MultimodalInputs:
|
||||
item.set_pad_value()
|
||||
|
||||
optional_args = [
|
||||
"modalities",
|
||||
"im_token_id",
|
||||
"im_start_id",
|
||||
"im_end_id",
|
||||
|
||||
Reference in New Issue
Block a user