Skip to content

Commit e08b47f

Browse files
committed
fix: comment out unused functions
1 parent 8a6ded4 commit e08b47f

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

cellpose/contrib/directml.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@
5757

5858
# return model
5959

60-
def setup_directML(model):
61-
"""
62-
Sets up the Cellpose model to use DirectML for inference.
60+
# def setup_directML(model):
61+
# """
62+
# Sets up the Cellpose model to use DirectML for inference.
6363

64-
Args:
65-
model (cellpose.CellposeModel|cellpse.Cellpos): Cellpose model. Should work for v2, v3 and custom.
64+
# Args:
65+
# model (cellpose.CellposeModel|cellpse.Cellpos): Cellpose model. Should work for v2, v3 and custom.
6666

67-
Returns:
68-
model (cellpose.CellposeModel|cellpse.Cellpos): Cellpose model with DirectML set as the device.
69-
"""
70-
print(
71-
'Using DirectML GPU for Cellpose model inference'
72-
)
73-
import torch_directml
74-
directml_device = torch_directml.device()
75-
model = setup_custom_device(model, directml_device)
76-
return model
67+
# Returns:
68+
# model (cellpose.CellposeModel|cellpse.Cellpos): Cellpose model with DirectML set as the device.
69+
# """
70+
# print(
71+
# 'Using DirectML GPU for Cellpose model inference'
72+
# )
73+
# import torch_directml
74+
# directml_device = torch_directml.device()
75+
# model = setup_custom_device(model, directml_device)
76+
# return model
7777

7878
def fix_sparse_directML(verbose=True):
7979
"""DirectML does not support sparse tensors, so we need to fallback to CPU.

0 commit comments

Comments
 (0)