File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change 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
7878def fix_sparse_directML (verbose = True ):
7979 """DirectML does not support sparse tensors, so we need to fallback to CPU.
You can’t perform that action at this time.
0 commit comments