diff --git a/python/sglang/srt/models/qwen2_vl.py b/python/sglang/srt/models/qwen2_vl.py index d29b775fc..7401111d9 100644 --- a/python/sglang/srt/models/qwen2_vl.py +++ b/python/sglang/srt/models/qwen2_vl.py @@ -442,18 +442,6 @@ class Qwen2VLForConditionalGeneration(nn.Module): "up_proj": ("gate_up_proj", 1), } - def calculate_num_image_tokens(self, image_grid_thw: Tuple[int, int, int]): - processor = cached_get_processor(self.config._name_or_path) - grid_t, grid_h, grid_w = image_grid_thw - num_image_tokens = ( - grid_t - * grid_h - * grid_w - // processor.image_processor.merge_size - // processor.image_processor.merge_size - ) - return num_image_tokens - def __init__( self, config: Qwen2VLConfig,