[Bugfix] Always apply MM processor even when no MM items are passed (#26240)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -507,8 +507,8 @@ class Phi3VMultiModalProcessor(BaseMultiModalProcessor[Phi3VProcessingInfo]):
|
||||
)
|
||||
|
||||
# Keep the behavior in line with HF processor
|
||||
if token_ids[:2] == tokenizer.encode("<s> <|image|>",
|
||||
add_special_tokens=False):
|
||||
if len(mm_prompt_updates) and (token_ids[:2] == tokenizer.encode(
|
||||
"<s> <|image|>", add_special_tokens=False)):
|
||||
token_ids = [token_ids[0], *token_ids[2:]]
|
||||
placeholders = {
|
||||
modality: [
|
||||
|
||||
Reference in New Issue
Block a user