@@ -391,7 +391,6 @@ def __init__(self,
391
391
self .sliding_window = self .runner .sliding_window
392
392
self .block_size = self .runner .block_size
393
393
self .enable_lora = self .runner .lora_config is not None
394
- self .multi_modal_input_mapper = self .runner .multi_modal_input_mapper
395
394
self .finished_requests_ids = finished_requests_ids
396
395
self .decode_only = True
397
396
self .is_encoder_decoder = self .runner .model_config .is_encoder_decoder
@@ -786,23 +785,15 @@ def _compute_lora_input(self, inter_data: InterDataForSeqGroup,
786
785
def _compute_multi_modal_input (self , inter_data : InterDataForSeqGroup ,
787
786
seq_group_metadata : SequenceGroupMetadata ):
788
787
"""If multi-modal data is given, add it to the input."""
789
- # NOTE: mm_data only includes the subset of multi-modal items that
788
+ # NOTE: mm_kwargs only includes the subset of multi-modal items that
790
789
# intersect with the current prefill positions.
791
790
positions = inter_data .input_positions [0 ]
792
- mm_data , placeholder_maps = MultiModalPlaceholderMap .from_seq_group (
791
+ mm_kwargs , placeholder_maps = MultiModalPlaceholderMap .from_seq_group (
793
792
seq_group_metadata ,
794
793
range (positions [0 ], positions [0 ] + len (positions )))
795
- if not mm_data :
794
+ if not mm_kwargs :
796
795
return
797
796
798
- if self .runner .mm_registry .has_processor (self .runner .model_config ):
799
- mm_kwargs = mm_data
800
- else :
801
- mm_kwargs = self .multi_modal_input_mapper (
802
- mm_data ,
803
- seq_group_metadata .mm_processor_kwargs ,
804
- )
805
-
806
797
inter_data .multi_modal_kwargs = mm_kwargs
807
798
inter_data .multi_modal_placeholder_maps = placeholder_maps
808
799
@@ -918,9 +909,6 @@ def __init__(
918
909
# Multi-modal data support
919
910
self .input_registry = input_registry
920
911
self .mm_registry = mm_registry
921
- self .multi_modal_input_mapper = mm_registry \
922
- .create_input_mapper (model_config )
923
- self .mm_registry .init_mm_limits_per_prompt (self .model_config )
924
912
925
913
# Lazy initialization
926
914
self .model : nn .Module # Set after load_model
@@ -1116,8 +1104,8 @@ def profile_run(self) -> None:
1116
1104
1117
1105
dummy_data = self .input_registry \
1118
1106
.dummy_data_for_profiling (self .model_config ,
1119
- seq_len ,
1120
- self .mm_registry )
1107
+ seq_len ,
1108
+ self .mm_registry )
1121
1109
1122
1110
seq = SequenceGroupMetadata (
1123
1111
request_id = str (group_id ),
0 commit comments