MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / is_available

Method is_available

lightx2v_platform/base/nvidia.py:21–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19
20 @staticmethod
21 def is_available() -> bool:
22 try:
23 import torch
24
25 return torch.cuda.is_available()
26 except ImportError:
27 return False
28
29 @staticmethod
30 def get_device() -> str:

Callers 15

_decompose_to_loraFunction · 0.45
run_depth_midas_smallFunction · 0.45
__init__.pyFile · 0.45
check_ai_deviceFunction · 0.45
__init__Method · 0.45
_sync_if_cudaMethod · 0.45
is_main_processFunction · 0.45
barrierMethod · 0.45
initMethod · 0.45
stop_taskFunction · 0.45
stop_all_running_tasksFunction · 0.45
fi_sm_archFunction · 0.45

Calls

no outgoing calls

Tested by 3

_skip_cuda_unavailableFunction · 0.36
mainFunction · 0.36