Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

enabled MPS support for easyOCR

Dillon DuPont6815d8a182d0
diff --git a/libs/som/som/ocr.py b/libs/som/som/ocr.py
index a206e057b8..6d10e85acc 100644
--- a/libs/som/som/ocr.py
+++ b/libs/som/som/ocr.py
@@ -67,17 +67,9 @@ class OCRProcessor:
import easyocr
# Use GPU if available
- use_gpu = self.device in ["cuda"] # MPS not directly supported by EasyOCR
-
- # If using MPS, add warnings to explain why CPU is used
- if self.device == "mps":
- logger.warning("EasyOCR doesn't support MPS directly. Using CPU instead.")
- logger.warning(
- "To silence this warning, set environment variable: PYTORCH_ENABLE_MPS_FALLBACK=1"
- )
-
+ use_gpu = self.device in ["cuda", "mps"]
self.reader = easyocr.Reader(["en"], gpu=use_gpu)
-
+
# Verify reader initialization
if self.reader is None:
raise ValueError("Failed to initialize EasyOCR reader")