File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,25 @@ def pip_install(package: str) -> None:
1212 )
1313
1414
15+ def try_get_cuda_version () -> str | None :
16+ try :
17+ import torch
18+ return torch .version .cuda
19+ except ImportError or AttributeError :
20+ return None
21+
22+
1523def main () -> None :
16- pip_install ("-e ." )
24+
25+ cuda_version = try_get_cuda_version ()
26+ if cuda_version is not None :
27+ if cuda_version .startswith ("12." ):
28+ pip_install ("-e .[cuda-12]" )
29+ else :
30+ pip_install ("-e .[cuda]" )
31+ else :
32+ # Default install
33+ pip_install ("-e .[cpu]" )
1734
1835
1936if __name__ == "__main__" :
Original file line number Diff line number Diff line change 11__all__ = ("__version__" , "NODE_CLASS_MAPPINGS" , "NODE_DISPLAY_NAME_MAPPINGS" )
22
3- __version__ = "0.2.0 "
3+ __version__ = "0.2.1 "
44
55
66def _get_node_mappings ():
You can’t perform that action at this time.
0 commit comments