[VLM] fix LFM2-VL offline inference and GPU JPEG decode (#22448)
This commit is contained in:
@@ -274,7 +274,7 @@ class Lfm2VlForConditionalGeneration(nn.Module):
|
|||||||
|
|
||||||
return projected_packed
|
return projected_packed
|
||||||
|
|
||||||
@torch.inference_mode()
|
@torch.no_grad()
|
||||||
def forward(
|
def forward(
|
||||||
self,
|
self,
|
||||||
input_ids: torch.Tensor,
|
input_ids: torch.Tensor,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class Lfm2VlImageProcessor(SGLangBaseProcessor):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
models = [Lfm2VlForConditionalGeneration]
|
models = [Lfm2VlForConditionalGeneration]
|
||||||
|
gpu_image_decode = False
|
||||||
|
|
||||||
def __init__(self, hf_config, server_args, _processor, *args, **kwargs):
|
def __init__(self, hf_config, server_args, _processor, *args, **kwargs):
|
||||||
super().__init__(hf_config, server_args, _processor, *args, **kwargs)
|
super().__init__(hf_config, server_args, _processor, *args, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user