MCPcopy Create free account
hub / github.com/easydiffusion/easydiffusion / get_variant_name

Function get_variant_name

ui/easydiffusion/backends/sdkit3.py:247–261  ·  view source on GitHub ↗
(platform_name)

Source from the content-addressed store, hash-verified

245
246
247def get_variant_name(platform_name):
248 if platform_name == "cuda":
249 # deduce the variant from gpu compute capability
250 from torchruntime.device_db import get_gpus
251 from torchruntime.gpu_db import get_nvidia_arch
252 from torchruntime.consts import NVIDIA
253
254 gpus = get_gpus()
255 for gpu in gpus:
256 if gpu.vendor_id == NVIDIA and gpu.is_discrete:
257 arch = get_nvidia_arch([gpu.device_name]) # 7.5, 12 etc
258 arch = int(arch * 10)
259 return f"sm{arch}"
260
261 return "any"

Callers 1

get_targetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected