Browse Source

[to #42322933] fix bug of CPU running error for multimodal model GEMM

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9756849
master
lingchen.zlm yingda.chen 3 years ago
parent
commit
c5a06c259c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      modelscope/models/multi_modal/gemm/gemm_model.py

+ 1
- 0
modelscope/models/multi_modal/gemm/gemm_model.py View File

@@ -45,6 +45,7 @@ class GEMMForMultiModalEmbedding(TorchModel):
self.gemm_model.to('cuda:{}'.format(self.device_id))
logger.info('Use GPU: {}'.format(self.device_id))
else:
self.device_id = -1
logger.info('Use CPU for inference')
self.img_preprocessor = T.Compose([
T.Resize(224),


Loading…
Cancel
Save