From bdadea97912f2eebb4387901e634c93816ac42db Mon Sep 17 00:00:00 2001 From: "yichang.zyc" Date: Thu, 27 Oct 2022 16:02:44 +0800 Subject: [PATCH] [to #42322933]fix image_open func, support url Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10548014 * fix image_open func --- modelscope/preprocessors/multi_modal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelscope/preprocessors/multi_modal.py b/modelscope/preprocessors/multi_modal.py index 256c5243..557b469a 100644 --- a/modelscope/preprocessors/multi_modal.py +++ b/modelscope/preprocessors/multi_modal.py @@ -157,7 +157,7 @@ class MPlugPreprocessor(Preprocessor): def image_open(self, path: str) -> Tuple[Image.Image, int]: if path not in self._image_map: index = len(self._image_map) - self._image_map[path] = (Image.open(path), index) + self._image_map[path] = (load_image(path), index) return self._image_map[path] def __call__(