Skip to content

Commit 06b2c61

Browse files
fcakyonCopilot
andauthored
commit copilot suggestion
Co-authored-by: Copilot <[email protected]>
1 parent c574d15 commit 06b2c61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sahi/utils/torch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def select_device(device: Optional[str] = None) -> device:
7272
7373
Inspired by https://github.com/ultralytics/yolov5/blob/6371de8879e7ad7ec5283e8b95cc6dd85d6a5e72/utils/torch_utils.py#L107
7474
"""
75-
if device == "cuda" or device == None:
75+
if device == "cuda" or device is None:
7676
device = "cuda:0"
7777
device = str(device).strip().lower().replace("cuda:", "").replace("none", "") # to string, 'cuda:0' to '0'
7878
cpu = device == "cpu"

0 commit comments

Comments
 (0)