Zhang Zelun 6 mēneši atpakaļ
vecāks
revīzija
cace3f7dc0
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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"
         )