mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
Cleanup
This commit is contained in:
+10
-7
@@ -33,13 +33,16 @@ def get_gpu_info():
|
||||
return ''
|
||||
|
||||
if not torch.cuda.is_available():
|
||||
if hasattr(shared.cmd_opts, "use_openvino") and shared.cmd_opts.use_openvino:
|
||||
from importlib.metadata import version as libmodule_version
|
||||
return {
|
||||
'device': get_openvino_device(),
|
||||
'openvino': libmodule_version("openvino"),
|
||||
}
|
||||
else:
|
||||
try:
|
||||
if shared.cmd_opts.use_openvino:
|
||||
from importlib.metadata import version as libmodule_version
|
||||
return {
|
||||
'device': get_openvino_device(),
|
||||
'openvino': libmodule_version("openvino"),
|
||||
}
|
||||
else:
|
||||
return {}
|
||||
except Exception:
|
||||
return {}
|
||||
else:
|
||||
try:
|
||||
|
||||
@@ -90,7 +90,7 @@ def get_openvino_device():
|
||||
core = Core()
|
||||
try:
|
||||
return core.get_property(get_device(), "FULL_DEVICE_NAME")
|
||||
except:
|
||||
except Exception:
|
||||
return "OpenVINO"
|
||||
|
||||
def cache_root_path():
|
||||
|
||||
Reference in New Issue
Block a user