Skip to content

Commit 1f78885

Browse files
JustinTong0323xwu-intel
authored andcommitted
Remove unused method calculate_num_image_tokens from qwen2_vl.py (sgl-project#5783)
1 parent ce6119c commit 1f78885

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

python/sglang/srt/models/qwen2_vl.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -442,18 +442,6 @@ class Qwen2VLForConditionalGeneration(nn.Module):
442442
"up_proj": ("gate_up_proj", 1),
443443
}
444444

445-
def calculate_num_image_tokens(self, image_grid_thw: Tuple[int, int, int]):
446-
processor = cached_get_processor(self.config._name_or_path)
447-
grid_t, grid_h, grid_w = image_grid_thw
448-
num_image_tokens = (
449-
grid_t
450-
* grid_h
451-
* grid_w
452-
// processor.image_processor.merge_size
453-
// processor.image_processor.merge_size
454-
)
455-
return num_image_tokens
456-
457445
def __init__(
458446
self,
459447
config: Qwen2VLConfig,

0 commit comments

Comments
 (0)