mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 04:29:22 +01:00
[to #42322933]fix image_open func, support url
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10548014 * fix image_open func
This commit is contained in:
@@ -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__(
|
||||
|
||||
Reference in New Issue
Block a user