Zhang Zelun 6 달 전
부모
커밋
cace3f7dc0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      paddlex/inference/models/doc_vlm/predictor.py

+ 1 - 1
paddlex/inference/models/doc_vlm/predictor.py

@@ -47,7 +47,7 @@ class DocVLMPredictor(BasePredictor):
         self.dtype = (
             "bfloat16"
             if ("npu" in get_device_type() or paddle.amp.is_bfloat16_supported())
-            and (self.device is not None and "cpu" not in self.device)
+            and (self.device is None or "cpu" not in self.device)
             else "float32"
         )