Commit e540587c authored by Baber's avatar Baber
Browse files

convert limit_mm_per_prompt to dict

parent 15ffb0da
import ast
import copy import copy
from typing import Dict, List, Optional from typing import Dict, List, Optional
...@@ -36,9 +37,10 @@ class VLLM_VLM(VLLM): ...@@ -36,9 +37,10 @@ class VLLM_VLM(VLLM):
interleave: bool = True, interleave: bool = True,
# TODO<baber>: handle max_images and limit_mm_per_prompt better # TODO<baber>: handle max_images and limit_mm_per_prompt better
max_images: int = 999, max_images: int = 999,
limit_mm_per_prompt: str = "image=1", limit_mm_per_prompt: str = "None",
**kwargs, **kwargs,
): ):
limit_mm_per_prompt = ast.literal_eval(limit_mm_per_prompt)
kwargs["limit_mm_per_prompt"] = simple_parse_args_string(limit_mm_per_prompt) kwargs["limit_mm_per_prompt"] = simple_parse_args_string(limit_mm_per_prompt)
super().__init__( super().__init__(
pretrained=pretrained, pretrained=pretrained,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment