MCPcopy
hub / github.com/rsxdalv/TTS-WebUI / get_torch_command

Function get_torch_command

tts_webui/utils/get_torch_command.py:71–83  ·  view source on GitHub ↗

Returns the full pip install command string for torch based on GPU choice. Returns the command string, or the default NVIDIA CUDA command if no GPU choice is set.

()

Source from the content-addressed store, hash-verified

69
70
71def get_torch_command():
72 """
73 Returns the full pip install command string for torch based on GPU choice.
74 Returns the command string, or the default NVIDIA CUDA command if no GPU choice is set.
75 """
76 sources = _get_torch_sources()
77
78 package = sources["package"]
79 index_url = sources["index_url"]
80
81 if index_url:
82 return f"{package} --index-url {index_url}"
83 return package
84
85
86TORCHCODEC_MAPPING = {

Callers 1

fnFunction · 0.90

Calls 1

_get_torch_sourcesFunction · 0.85

Tested by

no test coverage detected