Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion glmocr/layout/layout_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def start(self):
# 2. Auto: cuda:{cuda_visible_devices} if CUDA available, else CPU
if self._config_device is not None:
self._device = self._config_device
elif torch.cuda.is_available() and self.cuda_visible_devices:
elif torch.cuda.is_available() and self.cuda_visible_devices and self.cuda_visible_devices != "cpu":
self._device = f"cuda:{self.cuda_visible_devices}"
else:
self._device = "cpu"
Expand Down
Loading