Browse Source

[to #42322933]fix image_open func, support url

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10548014

    * fix image_open func
master
yichang.zyc yingda.chen 2 years ago
parent
commit
bdadea9791
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/preprocessors/multi_modal.py

+ 1
- 1
modelscope/preprocessors/multi_modal.py View File

@@ -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__(


Loading…
Cancel
Save