@@ -638,12 +638,12 @@ def _process_mm_features(self, request_list: List[Request]):
638638 image_features_output is not None
639639 ), f"image_features_output is None, images_lst length: { len (multi_vision_inputs ['images_lst' ])} "
640640 grid_thw = multi_vision_inputs ["grid_thw_lst_batches" ][index ][thw_idx ]
641- mm_token_lenght = inputs ["mm_num_token_func" ](grid_thw = grid_thw )
642- mm_feature = image_features_output [feature_idx : feature_idx + mm_token_lenght ]
641+ mm_token_length = inputs ["mm_num_token_func" ](grid_thw = grid_thw )
642+ mm_feature = image_features_output [feature_idx : feature_idx + mm_token_length ]
643643
644644 # add feature to encoder cache
645645 self .encoder_cache [mm_hash ] = mm_feature .detach ().cpu ()
646- feature_idx += mm_token_lenght
646+ feature_idx += mm_token_length
647647 thw_idx += 1
648648
649649 feature_start = feature_position .offset
@@ -663,13 +663,13 @@ def _process_mm_features(self, request_list: List[Request]):
663663 merge_image_features , thw_idx = [], 0
664664 for feature_position in feature_position_item :
665665 grid_thw = grid_thw_lst [thw_idx ]
666- mm_token_lenght = inputs ["mm_num_token_func" ](grid_thw = grid_thw )
667- mm_feature = image_features_output [feature_idx : feature_idx + mm_token_lenght ]
666+ mm_token_length = inputs ["mm_num_token_func" ](grid_thw = grid_thw )
667+ mm_feature = image_features_output [feature_idx : feature_idx + mm_token_length ]
668668
669669 feature_start = feature_position .offset
670670 feature_end = feature_position .offset + feature_position .length
671671 merge_image_features .append (mm_feature [feature_start :feature_end ])
672- feature_idx += mm_token_lenght
672+ feature_idx += mm_token_length
673673 thw_idx += 1
674674 image_features_list .append (paddle .concat (merge_image_features , axis = 0 ))
675675 for idx , index in req_idx_img_index_map .items ():
0 commit comments