From a397fdbd25634c142d37bb1eaf1a4d8417d0d820 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:32:08 +1100 Subject: [PATCH] chore: ruff --- invokeai/backend/util/devices.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/invokeai/backend/util/devices.py b/invokeai/backend/util/devices.py index 44d25de025..0be53c842a 100644 --- a/invokeai/backend/util/devices.py +++ b/invokeai/backend/util/devices.py @@ -27,10 +27,12 @@ def choose_torch_device() -> torch.device: else: return torch.device(config.device) + def get_torch_device_name() -> str: device = choose_torch_device() return torch.cuda.get_device_name(device) if device.type == "cuda" else device.type.upper() + # We are in transition here from using a single global AppConfig to allowing multiple # configurations. It is strongly recommended to pass the app_config to this function. def choose_precision(