Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
# limitations under the License.
"""

from .get_image_preprocessor import get_image_preprocessor
from .image_preprocessor_adaptive import AdaptiveImageProcessor
# Backward compatibility: this module has been migrated to
# fastdeploy.input.image_processors.adaptive_processor
# This file will be removed in a future version.

from fastdeploy.input.image_processors.adaptive_processor import ( # noqa: F401
AdaptiveImageProcessor,
get_image_preprocessor,
)

__all__ = ["get_image_preprocessor", "AdaptiveImageProcessor"]
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,10 @@
# limitations under the License.
"""

"""get image preprocessor"""
# Backward compatibility: this module has been migrated to
# fastdeploy.input.image_processors.adaptive_processor
# This file will be removed in a future version.

from fastdeploy.utils import data_processor_logger

from .image_preprocessor_adaptive import AdaptiveImageProcessor


def get_image_preprocessor(args):
"""
get_image_preprocessor from args
"""

if args.vision_model_name_or_path is None:
return None

data_processor_logger.info("use AdaptiveImageProcessor")
image_preprocess = AdaptiveImageProcessor.from_pretrained(args.vision_model_name_or_path)
return image_preprocess
from fastdeploy.input.image_processors.adaptive_processor import ( # noqa: F401
get_image_preprocessor,
)
Loading
Loading