Clean up imports (#5467)
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
"""DetokenizerManager is a process that detokenizes the token ids."""
|
||||
|
||||
import dataclasses
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
"""
|
||||
Multi-modality utils
|
||||
Multi-modality utils
|
||||
"""
|
||||
|
||||
import logging
|
||||
from abc import abstractmethod
|
||||
from typing import Callable, List, Optional, Tuple
|
||||
|
||||
@@ -12,11 +13,11 @@ from sglang.srt.managers.schedule_batch import (
|
||||
MultimodalDataItem,
|
||||
MultimodalInputs,
|
||||
global_server_args_dict,
|
||||
logger,
|
||||
)
|
||||
from sglang.srt.model_executor.forward_batch_info import ForwardBatch
|
||||
from sglang.srt.utils import print_warning_once
|
||||
from sglang.utils import logger
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MultiModalityDataPaddingPattern:
|
||||
|
||||
@@ -5,8 +5,6 @@ import logging
|
||||
import pkgutil
|
||||
from functools import lru_cache
|
||||
|
||||
from transformers import PROCESSOR_MAPPING
|
||||
|
||||
from sglang.srt.managers.multimodal_processors.base_processor import (
|
||||
BaseMultimodalProcessor,
|
||||
)
|
||||
|
||||
@@ -8,8 +8,6 @@ from typing import List, Optional
|
||||
|
||||
import numpy as np
|
||||
import PIL
|
||||
from decord import VideoReader, cpu
|
||||
from PIL import Image
|
||||
from transformers import BaseImageProcessorFast
|
||||
|
||||
from sglang.srt.managers.schedule_batch import Modality
|
||||
@@ -102,6 +100,9 @@ class BaseMultimodalProcessor(ABC):
|
||||
"""
|
||||
estimate the total frame count from all visual input
|
||||
"""
|
||||
# Lazy import because decord is not available on some arm platforms.
|
||||
from decord import VideoReader, cpu
|
||||
|
||||
# Before processing inputs
|
||||
estimated_frames_list = []
|
||||
for image in image_data:
|
||||
|
||||
Reference in New Issue
Block a user