Skip mm feature pool init to avoid EPD OOM (#16388)

This commit is contained in:
siyu
2026-01-23 10:53:45 +08:00
committed by GitHub
parent 04a10c9bc2
commit 62e6a749b0
3 changed files with 12 additions and 4 deletions

View File

@@ -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):

View File

@@ -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"

View File

@@ -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,