Remove unused method calculate_num_image_tokens from qwen2_vl.py (#5783)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user