Open Roxiun opened 1 year ago
See PR https://github.com/kha-white/manga-ocr/pull/30
Actually MacOS 13.3 is required.
In addition to this if anyone is using mokuro I also have the following patches on comic text detector:
general.py Line 19
CUDA = True if torch.cuda.is_available() else False
DEVICE = 'cuda' if CUDA else 'cpu'
became
DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
basemodel.py Line 13
CUDA = True if torch.cuda.is_available() else False
DEVICE = 'cuda' if CUDA else 'cpu'
became
DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
Add MPS device type so that M1/M2 gpus can be utilised
See: https://pytorch.org/docs/stable/notes/mps.html