Skip mm feature pool init to avoid EPD OOM (#16388)
This commit is contained in:
@@ -303,7 +303,11 @@ class MMReceiver:
|
||||
else:
|
||||
raise e
|
||||
self.mm_processor = get_mm_processor(
|
||||
hf_config, server_args, _processor, transport_mode
|
||||
hf_config,
|
||||
server_args,
|
||||
_processor,
|
||||
transport_mode,
|
||||
skip_mm_pool=True,
|
||||
)
|
||||
|
||||
def create_req(self, recv_req):
|
||||
|
||||
@@ -41,11 +41,13 @@ def import_processors(package_name: str, overwrite: bool = False):
|
||||
|
||||
|
||||
def get_mm_processor(
|
||||
hf_config, server_args: ServerArgs, processor, transport_mode
|
||||
hf_config, server_args: ServerArgs, processor, transport_mode, **kwargs
|
||||
) -> BaseMultimodalProcessor:
|
||||
for model_cls, processor_cls in PROCESSOR_MAPPING.items():
|
||||
if model_cls.__name__ in hf_config.architectures:
|
||||
return processor_cls(hf_config, server_args, processor, transport_mode)
|
||||
return processor_cls(
|
||||
hf_config, server_args, processor, transport_mode, **kwargs
|
||||
)
|
||||
|
||||
raise ValueError(
|
||||
f"No processor registered for architecture: {hf_config.architectures}.\n"
|
||||
|
||||
@@ -234,7 +234,9 @@ class BaseMultimodalProcessor(ABC):
|
||||
"input_features",
|
||||
]
|
||||
|
||||
if SGL_USE_CUDA_IPC:
|
||||
skip_mm_pool = kwargs.get("skip_mm_pool", False)
|
||||
|
||||
if SGL_USE_CUDA_IPC and not skip_mm_pool:
|
||||
self.cudaipc_mmfeature_pool = MmItemMemoryPool(
|
||||
MM_FEATURE_CACHE_SIZE,
|
||||
MM_ITEM_MEMORY_POOL_RECYCLE_INTERVAL,
|
||||
|
||||
Reference in New Issue
Block a user