mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
fix first launch
This commit is contained in:
+5
-1
@@ -83,7 +83,11 @@ class Agent:
|
||||
|
||||
|
||||
def get_version_torch() -> Union[str, None]:
|
||||
version_ = importlib.metadata.version("torch")
|
||||
version_ = None
|
||||
try:
|
||||
version_ = importlib.metadata.version("torch")
|
||||
except importlib.metadata.PackageNotFoundError:
|
||||
return None
|
||||
if "+rocm" not in version_: # unofficial build, non-rocm torch.
|
||||
return None
|
||||
return version_.split("+rocm")[1]
|
||||
|
||||
Reference in New Issue
Block a user